scsi: iscsi: start endpoint ID allocation from 1
PATCH 1/1 scsi: iscsi: start endpoint ID allocation from 1
ktransport_ep_connect() (defined in open-iscsi/usr/netlink.c) returns -EIO if endpoint ID is 0.
intktransport_ep_connect(iscsi_conn_t *conn, int non_blocking)
{
...
rc = __kipc_call(iov, 2);
if (rc < 0)
return rc;
if (!ev->r.ep_connect_ret.handle)
return -EIO;
conn->transport_ep_handle = ev->r.ep_connect_ret.handle;
...
}--- drivers/scsi/scsi_transport_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_transport_iscsi.c +1 -1
@@ -212,7 +212,7 @@ iscsi_create_endpoint(int dd_size)return NULL ;mutex_lock (&iscsi_ep_idr_mutex); - id =idr_alloc (&iscsi_ep_idr, ep,0 ,-1 ,GFP_NOIO ); + id =idr_alloc (&iscsi_ep_idr, ep,1 ,-1 ,GFP_NOIO );if (id <0 ) {mutex_unlock (&iscsi_ep_idr_mutex); printk(KERN_ERR "Could not allocate endpoint ID. Error %d.\n",
Signature · 1 line
2.27.0
Quoted 18 lines · Varun Prakash
ktransport_ep_connect()(defined inopen-iscsi/usr/netlink.c) returns-EIOif endpoint ID is 0.int
ktransport_ep_connect(iscsi_conn_t *conn, int non_blocking){ ... rc = __kipc_call(iov, 2); if (rc < 0) return rc; if (!ev->r.ep_connect_ret.handle) return -EIO; conn->transport_ep_handle = ev->r.ep_connect_ret.handle; ... }
Quoted 2 lines
Fixes 3c6ae371b8a1 ("scsi: iscsi: Release endpoint ID when its freed")Signed-off-by Varun Prakash <[email protected]>
Thanks.
Ccing Nilesh because qedi was hitting this. I had just sent him a patch for this with some other patches.
[email protected]
maintainerQuoted 22 lines · Mike Christie
Quoted 18 lines · Varun Prakash
ktransport_ep_connect()(defined inopen-iscsi/usr/netlink.c) returns-EIOif endpoint ID is 0.int
ktransport_ep_connect(iscsi_conn_t *conn, int non_blocking){ ... rc = __kipc_call(iov, 2); if (rc < 0) return rc; if (!ev->r.ep_connect_ret.handle) return -EIO; conn->transport_ep_handle = ev->r.ep_connect_ret.handle; ... }Quoted 2 lines
Fixes 3c6ae371b8a1 ("scsi: iscsi: Release endpoint ID when its freed")Signed-off-by Varun Prakash <[email protected]>
Quoted 6 lines
Thanks.
Ccing Nilesh because qedi was hitting this. I had just sent him a patch for this with some other patches.
Reviewed-by Mike Christie <[email protected]>
Martin, Ignore my review-by. We are going to go with Sergey's patch:
[PATCH] scsi: iscsi: Exclude zero from the endpoint ID range