projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
464c7ff
)
ipc/shm: properly return EIDRM in shm_lock()
author
Davidlohr Bueso
<
[email protected]
>
Tue, 4 Sep 2018 22:46:02 +0000
(15:46 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 4 Sep 2018 23:45:02 +0000
(16:45 -0700)
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 <
[email protected]
>
Reported-by: kernel test robot <
[email protected]
>
Cc: Manfred Spraul <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
ipc/shm.c
patch
|
blob
|
history
diff --git
a/ipc/shm.c
b/ipc/shm.c
index b0eb3757ab895d07970bec60b55f9bd895f7bd8a..4cd402e4cfeb603e2417a3796c3d9b22f3022f89 100644
(file)
--- a/
ipc/shm.c
+++ b/
ipc/shm.c
@@
-199,6
+199,7
@@
static inline struct shmid_kernel *shm_lock(struct ipc_namespace *ns, int id)
}
ipc_unlock_object(ipcp);
+ ipcp = ERR_PTR(-EIDRM);
err:
rcu_read_unlock();
/*