]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtip32xx: fix potential crash on SEC_ERASE_UNIT
authorSelvan Mani <smani@micron.com>
Wed, 7 Nov 2012 13:03:37 +0000 (06:03 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 Nov 2012 18:59:21 +0000 (19:59 +0100)
commit0c24ac06ed56373d6d5b7a5f29ada6f3af7555ee
tree83ad3d3b6c1e0ede845623efdd838a11472f1e91
parent8ca211056519ac06bc96fb134dca1f8eb2141407
mtip32xx: fix potential crash on SEC_ERASE_UNIT

The mtip driver lifted this code from elsewhere and then added a special
handling check for SEC_ERASE_UNIT. If the caller tries to do a security
erase but passes no output data for the command then outbuf is not
allocated and the driver duly explodes.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Selvan Mani <smani@micron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/mtip32xx/mtip32xx.c