https://github.com/torvalds/linux
Revision 8074b26f67165bf045d92e778c9c10dc5e207fc6 authored by Miklos Szeredi on 24 February 2011, 14:49:53 UTC, committed by Linus Torvalds on 24 February 2011, 16:55:01 UTC
Grab a reference to bdev before calling blkdev_get(), which expects
the refcount to be already incremented and either returns success or
decrements the refcount and returns an error.

The bug was introduced by e525fd89 (block: make blkdev_get/put()
handle exclusive access), which didn't take into account this behavior
of blkdev_get().

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3c522ce
History
Tip revision: 8074b26f67165bf045d92e778c9c10dc5e207fc6 authored by Miklos Szeredi on 24 February 2011, 14:49:53 UTC
mm: fix refcounting in swapon
Tip revision: 8074b26
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-- 941 bytes
.mailmap -rw-r--r-- 4.0 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.7 KB
Kbuild -rw-r--r-- 2.4 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 186.8 KB
Makefile -rw-r--r-- 50.9 KB
README -rw-r--r-- 17.1 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top