https://github.com/torvalds/linux
Revision b8f42738acaddf67731c34935c0994e09a588ca7 authored by Michael J. Ruhl on 26 September 2017, 13:06:28 UTC, committed by Doug Ledford on 27 September 2017, 15:10:36 UTC
During base context setup, if setup_base_ctxt() fails, the context is
deallocated. This is incorrect because the context is referenced on
return, to notify any waiting subcontext.  If there are no subcontexts
the pointer will be invalid.

Reorganize the error path so that deallocate_ctxt() is called after all
the possible subcontexts have been notified.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent 612601d
History
Tip revision: b8f42738acaddf67731c34935c0994e09a588ca7 authored by Michael J. Ruhl on 26 September 2017, 13:06:28 UTC
IB/hfi1: On error, fix use after free during user context setup
Tip revision: b8f4273
File Mode Size
Documentation
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.3 KB
.mailmap -rw-r--r-- 8.1 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 96.1 KB
Kbuild -rw-r--r-- 2.2 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 420.1 KB
Makefile -rw-r--r-- 58.2 KB
README -rw-r--r-- 722 bytes

README

back to top