]> git.baikalelectronics.ru Git - kernel.git/commit
hfsplus: add error checking for hfs_find_init()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Tue, 5 Jul 2011 22:29:59 +0000 (02:29 +0400)
committerChristoph Hellwig <hch@lst.de>
Thu, 7 Jul 2011 15:45:46 +0000 (17:45 +0200)
commiteda221119b94432c8c2c89882a0ecbc1c504dd8d
treeb5db237ebff38c90b95f01d8cca28bc8c2536e7f
parent6410317630d8f843554b0f1520bdcc7dcb245ba8
hfsplus: add error checking for hfs_find_init()

hfs_find_init() may fail with ENOMEM, but there are places, where
the returned value is not checked. The consequences can be very
unpleasant, e.g. kfree uninitialized pointer and
inappropriate mutex unlocking.

The patch adds checks for errors in hfs_find_init().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/hfsplus/catalog.c
fs/hfsplus/dir.c
fs/hfsplus/extents.c
fs/hfsplus/inode.c
fs/hfsplus/super.c