]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xen/blkback: fix reference counting
authorVegard Nossum <vegard.nossum@oracle.com>
Thu, 5 Sep 2013 11:00:14 +0000 (13:00 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 15 Oct 2013 20:13:13 +0000 (14:13 -0600)
commit7a0ec70cb371209513784d24fcd8961841bd0da8
treeec12bb4fe9a8708aac6901759ac0bb6b4db3834b
parent86e49440fce831ef0a37b6461dccaa627a52c892
xen/blkback: fix reference counting

If the permission check fails, we drop a reference to the blkif without
having taken it in the first place. The bug was introduced in commit
604c499cbbcc3d5fe5fb8d53306aa0fae1990109 (xen/blkback: Check device
permissions before allowing OP_DISCARD).

Cc: stable@vger.kernel.org
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/xen-blkback/blkback.c