]> 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)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 6 Sep 2013 13:37:49 +0000 (09:37 -0400)
commit7c90aaee7aa2e023124f1861dea98347e4864a84
treeec40ad54abb3fcfbe620da9fab5553ae2a88c783
parent06a3b60386570f1f240399325653bbb5a89ab8db
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>
drivers/block/xen-blkback/blkback.c