mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
iscsi: Fix iscsi endpoints leak
When creating a new endpoint, we look for a free id for the new endpoint. We baisically loop on possible ids and use the first id that class_find_device() returns NULL. However, we are missing a reference put when class_find_device() does find an existing device for a given id. Reported-by: Alex Lyakas <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
e03c2da657
commit
4ce30874f5
1 changed files with 2 additions and 0 deletions
|
|
@ -204,6 +204,8 @@ iscsi_create_endpoint(int dd_size)
|
|||
iscsi_match_epid);
|
||||
if (!dev)
|
||||
break;
|
||||
else
|
||||
put_device(dev);
|
||||
}
|
||||
if (id == ISCSI_MAX_EPID) {
|
||||
printk(KERN_ERR "Too many connections. Max supported %u\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue