ipc/msg: lockless security checks for msgsnd
authorDavidlohr Bueso <dave@stgolabs.net>
Sat, 10 Sep 2016 10:34:32 +0000 (20:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sat, 10 Sep 2016 10:34:32 +0000 (20:34 +1000)
commit523f261a8083485b9ef63b0ccb663908a1a664ef
tree3e1ddd0d6705fa90ecaf3a44c7234d8003d5db43
parente80897fb68aba5e2be982528eac9ac19d0ce565a
ipc/msg: lockless security checks for msgsnd

Just as with msgrcv (along with the rest of sysvipc since a few years
ago), perform the security checks without holding the ipc object lock.
This also reduces the hogging of the lock for the entire duration of a
sender, as we drop the lock upon every iteration -- and this is exactly
why we also check for racing with RMID in the first place.

Link: http://lkml.kernel.org/r/1469748819-19484-5-git-send-email-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/msg.c
This page took 0.025938 seconds and 5 git commands to generate.