Commit ec990306 authored by Pan Bian's avatar Pan Bian Committed by Martin K. Petersen
Browse files

scsi: fnic: fix use after free

The memory chunk io_req is released by mempool_free. Accessing
io_req->start_time will result in a use after free bug. The variable
start_time is a backup of the timestamp. So, use start_time here to
avoid use after free.


Signed-off-by: default avatarPan Bian <>
Reviewed-by: default avatarSatish Kharat <>
Signed-off-by: default avatarMartin K. Petersen <>
parent b1335f5b
......@@ -1024,7 +1024,8 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
io_duration_time = jiffies_to_msecs(jiffies) - jiffies_to_msecs(io_req->start_time);
io_duration_time = jiffies_to_msecs(jiffies) -
if(io_duration_time <= 10)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment