mirror of
https://github.com/opnsense/src.git
synced 2026-04-21 22:27:47 -04:00
After rewriting powerpc atomic we decided to commit at the constraint
that for _ptr operations, when not used directly with uintptr_t, we needed to manually cast. Use the cast on the _ptr version, where it actually wasn't (please note that i386 doesn't get it right, while amd64 doesn't seem to compile cfi neither in LINT, that is why it doesn't fail). Reported by: sbruno
This commit is contained in:
parent
bceb221f78
commit
3f8fdcfde3
1 changed files with 2 additions and 1 deletions
|
|
@ -145,7 +145,8 @@ cfi_devopen(struct cdev *dev, int oflags, int devtype, struct thread *td)
|
|||
|
||||
sc = dev->si_drv1;
|
||||
/* We allow only 1 open. */
|
||||
if (!atomic_cmpset_acq_ptr(&sc->sc_opened, NULL, td->td_proc))
|
||||
if (!atomic_cmpset_acq_ptr((uintptr_t *)&sc->sc_opened,
|
||||
(uintptr_t)NULL, (uintptr_t)td->td_proc))
|
||||
return (EBUSY);
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue