aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorIshai Rabinovitz <ishai@mellanox.co.il>2006-06-29 16:39:54 +0300
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-30 21:28:35 -0500
commit454e8957eb60841016deb319dbbf83042fb32a39 (patch)
tree0b638af6bd2ac0083e244d228adfd12a8f6b4585 /drivers/message
parent[SCSI] 53c700: fix breakage caused by the autosense update (diff)
downloadlinux-dev-454e8957eb60841016deb319dbbf83042fb32a39.tar.xz
linux-dev-454e8957eb60841016deb319dbbf83042fb32a39.zip
[SCSI] sg.c: Fix bad error handling in
I got a NULL derefrence in cdev_del+1 when called from sg_remove. By looking at the code of sg_add, sg_alloc and sg_remove (all in drivers/scsi/sg.c) I found out that sg_add is calling sg_alloc but if it fails afterwards it does not deallocate the space that was allocated in sg_alloc and the redundant entry has NULL in cdev. When sg_remove is being called, it tries to perform cdev_del to this NULL cdev and fails. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Acked-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message')
0 files changed, 0 insertions, 0 deletions