Consistently use the shorter name 'obj' for the new object. Set OBJ_POSIXSHM flag outside if, it is set on both pathes. Suggested by: alc
Details
Details
- Reviewers
alc markj - Commits
- rGe578fd853a25: shm_alloc(): cleanup
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
I think that unlocked assignment to swp/phys_priv is fine,the field is never changed after the initialization. I would even set the flag lockless, since the object is not yet visible, but I think the consistency is useful there, e.g. for sanitizers.
sys/kern/uipc_shm.c | ||
---|---|---|
947–948 | The assignment to shmfd->shm_object here isn't needed. |