Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uipc_shm: Fix double check for shmfd->shm_path #1250

Conversation

ricardobranco777
Copy link
Contributor

Fix double check for shmfd->shm_path != NULL

Copy link
Contributor

@gmshake gmshake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@emaste
Copy link
Member

emaste commented May 21, 2024

Looks like this used to have double-checked locking:

9696feebe2320 (John Baldwin            2014-09-22 16:20:47 +0000 1088)  if (shmfd->shm_path != NULL) {
9696feebe2320 (John Baldwin            2014-09-22 16:20:47 +0000 1089)          sx_slock(&shm_dict_lock);
9696feebe2320 (John Baldwin            2014-09-22 16:20:47 +0000 1090)          if (shmfd->shm_path != NULL)

The lock was removed in 56d0e33

sys/kern/uipc_shm.c Outdated Show resolved Hide resolved
@emaste
Copy link
Member

emaste commented May 21, 2024

Looks good, one style(9) nit that can be cleaned up now that there's less indentation

@emaste emaste added the merged label May 21, 2024
@emaste
Copy link
Member

emaste commented May 21, 2024

Pushed as 7975f57

@emaste emaste closed this May 21, 2024
@bsdimp bsdimp reopened this May 21, 2024
@bsdimp bsdimp closed this May 21, 2024
@bsdimp bsdimp force-pushed the fix_shm_fill_kinfo_locked branch from e23ed04 to 7975f57 Compare May 21, 2024 14:41
@bsdimp
Copy link
Member

bsdimp commented May 21, 2024

Hmmm, OK. pushing after the fact definitely doesn't work to get to merged.

@ricardobranco777 ricardobranco777 deleted the fix_shm_fill_kinfo_locked branch May 21, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants