https://github.com/torvalds/linux
Revision 2dc958fa2fe6987e7ab106bd97029a09a82fcd8d authored by Stanislav Kinsbursky on 01 April 2013, 07:40:51 UTC, committed by Linus Torvalds on 02 April 2013, 17:09:01 UTC
Make sure that msg pointer is set back to error value in case of
MSG_COPY flag is set and desired message to copy wasn't found.  This
garantees that msg is either a error pointer or a copy address.

Otherwise the last message in queue will be freed without unlinking from
the queue (which leads to memory corruption) and the dummy allocated
copy won't be released.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 118c9a4
History
Tip revision: 2dc958fa2fe6987e7ab106bd97029a09a82fcd8d authored by Stanislav Kinsbursky on 01 April 2013, 07:40:51 UTC
ipc: set msg back to -EAGAIN if copy wasn't performed
Tip revision: 2dc958f
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 93.0 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 244.0 KB
Makefile -rw-r--r-- 47.0 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top