aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts-by-pid.py
diff options
context:
space:
mode:
authorKrishnasamy, Somasundaram <[email protected]>2011-02-28 18:13:22 -0500
committerJames Bottomley <[email protected]>2011-03-23 11:36:01 -0500
commitd1e12de804f9d8ad114786ca7c2ce593cba79891 (patch)
tree0a61f39b6a1765c7bd5e5659efd6a697d947725f /tools/perf/scripts/python/syscall-counts-by-pid.py
parent463b8977ecebf8cf590c33191d43ea0b059381c6 (diff)
[SCSI] ses: Avoid kernel panic when lun 0 is not mapped
During device discovery, scsi mid layer sends INQUIRY command to LUN 0. If the LUN 0 is not mapped to host, it creates a temporary scsi_device with LUN id 0 and sends REPORT_LUNS command to it. After the REPORT_LUNS succeeds, it walks through the LUN table and adds each LUN found to sysfs. At the end of REPORT_LUNS lun table scan, it will delete the temporary scsi_device of LUN 0. When scsi devices are added to sysfs, it calls add_dev function of all the registered class interfaces. If ses driver has been registered, ses_intf_add() of ses module will be called. This function calls scsi_device_enclosure() to check the inquiry data for EncServ bit. Since inquiry was not allocated for temporary LUN 0 scsi_device, it will cause NULL pointer exception. To fix the problem, sdev->inquiry is checked for NULL before reading it. Signed-off-by: Somasundaram Krishnasamy <[email protected]> Signed-off-by: Babu Moger <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions