[PATCH] cleanup of ipc/msg.c
From: Manfred Spraul
Date: Sat Jul 03 2004 - 17:11:46 EST
Hi,
Attached is a cleanup of the main loops in sys_msgrcv and sys_msgsnd,
based on ipc_lock_by_ptr(). Most backward gotos are gone, instead normal
"for(;;)" loops until a suitable message is found.
Additionally, the patch
- reintroduces lockless receive, same implementation as in ipc/mqueue.c.
- fixes a rare BUG(): if queue settings are changed with
msgctl(,IPC_SET,) while a thread is sleeping in msgrcv() and the queue
is then destroyed with msgctl(,IPC_RMID,) before the sleeping thread
noticed the new configuration, then the BUG() is line 764 would trigger.
Andrew, could you add it to -mm? If it's too large then I'll split out
the bugfix, it's a oneliner [remove the BUG()].
Signed-Off-By: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/