The patch titled Subject: ipc/shm: properly return EIDRM in shm_lock() has been added to the -mm tree. Its filename is ipc-shm-properly-return-eidrm-in-shm_lock.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ipc-shm-properly-return-eidrm-in-shm_lock.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ipc-shm-properly-return-eidrm-in-shm_lock.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Davidlohr Bueso <dave@xxxxxxxxxxxx> Subject: ipc/shm: properly return EIDRM in shm_lock() When getting rid of the general ipc_lock(), this was missed furthermore, making the comment around the ipc object validity check bogus. Under EIDRM conditions, callers will in turn not see the error and continue with the operation. Link: http://lkml.kernel.org/r/20180824030920.GD3677@linux-r8p5 Link: http://lkml.kernel.org/r/20180823024051.GC13343@shao2-debian Fixes: 82061c57ce9 ("ipc: drop ipc_lock()") Signed-off-by: Davidlohr Bueso <dbueso@xxxxxxx> Reported-by: kernel test robot <rong.a.chen@xxxxxxxxx> Cc: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- ipc/shm.c | 1 + 1 file changed, 1 insertion(+) --- a/ipc/shm.c~ipc-shm-properly-return-eidrm-in-shm_lock +++ a/ipc/shm.c @@ -199,6 +199,7 @@ static inline struct shmid_kernel *shm_l } ipc_unlock_object(ipcp); + ipcp = ERR_PTR(-EIDRM); err: rcu_read_unlock(); /* _ Patches currently in -mm which might be from dave@xxxxxxxxxxxx are ipc-shm-properly-return-eidrm-in-shm_lock.patch