RE: [patch] [SCSI] scsi_dh: potential null dereference in scsi_dh_activate()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Moger, Babu
Date: Tuesday, January 4, 2011 - 12:50 pm

> -----Original Message-----

You are right. This check may not be required.

But I am not sure why there is a check in scsi_device_from_queue. 
Is there a possibility of request_fn other than scsi_request_fn for scsi device?  I don’t know.  Here is the code..

struct scsi_device *scsi_device_from_queue(struct request_queue *q)
{
        struct scsi_device *sdev = NULL;

        if (q->request_fn == scsi_request_fn)
                sdev = q->queuedata;

        return sdev;
}
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [patch] [SCSI] scsi_dh: potential null dereference in ..., Moger, Babu, (Tue Jan 4, 12:50 pm)