Ishai Rabinovitz 454e8957eb [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>
2006-06-30 21:28:35 -05:00
..
2006-06-25 10:01:16 -07:00
2006-06-23 07:43:06 -07:00
2006-05-03 20:05:41 -07:00
2006-06-20 01:21:29 -07:00
2006-06-26 18:35:02 +02:00
2006-06-27 17:32:39 -07:00
2006-06-28 14:06:39 -04:00
2006-06-27 17:32:39 -07:00
2006-06-19 13:06:05 +01:00
2006-06-27 19:13:56 -07:00
2006-06-27 17:32:39 -07:00
2006-06-27 17:32:39 -07:00
2006-06-27 17:32:40 -07:00
2006-06-27 17:32:39 -07:00
2006-06-27 17:32:39 -07:00
2006-06-23 07:43:06 -07:00
2006-06-17 21:18:43 -07:00