* [withdrawn] ipc-msg-lockless-security-checks-for-msgsnd.patch removed from -mm tree
@ 2016-10-06 21:11 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-10-06 21:11 UTC (permalink / raw)
To: dave, bigeasy, dbueso, manfred, peterz, mm-commits
The patch titled
Subject: ipc/msg: lockless security checks for msgsnd
has been removed from the -mm tree. Its filename was
ipc-msg-lockless-security-checks-for-msgsnd.patch
This patch was dropped because it was withdrawn
------------------------------------------------------
From: Davidlohr Bueso <dave@stgolabs.net>
Subject: 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 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff -puN ipc/msg.c~ipc-msg-lockless-security-checks-for-msgsnd ipc/msg.c
--- a/ipc/msg.c~ipc-msg-lockless-security-checks-for-msgsnd
+++ a/ipc/msg.c
@@ -623,14 +623,14 @@ long do_msgsnd(int msqid, long mtype, vo
goto out_unlock1;
}
- ipc_lock_object(&msq->q_perm);
-
for (;;) {
struct msg_sender s;
err = -EACCES;
if (ipcperms(ns, &msq->q_perm, S_IWUGO))
- goto out_unlock0;
+ goto out_unlock1;
+
+ ipc_lock_object(&msq->q_perm);
/* raced with RMID? */
if (!ipc_valid_object(&msq->q_perm)) {
@@ -681,6 +681,7 @@ long do_msgsnd(int msqid, long mtype, vo
goto out_unlock0;
}
+ ipc_unlock_object(&msq->q_perm);
}
msq->q_lspid = task_tgid_vnr(current);
msq->q_stime = get_seconds();
_
Patches currently in -mm which might be from dave@stgolabs.net are
ipc-msg-batch-queue-sender-wakeups.patch
ipc-msg-make-ss_wakeup-kill-arg-boolean.patch
ipc-msg-avoid-waking-sender-upon-full-queue.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-06 21:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06 21:11 [withdrawn] ipc-msg-lockless-security-checks-for-msgsnd.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).