mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
isert-scst: Fail login if max_sge is too small
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9090 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1302,7 +1302,10 @@ static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id,
|
||||
isert_conn->max_sge = isert_dev->device_attr.max_recv_sge - 3;
|
||||
#endif
|
||||
|
||||
WARN_ON(isert_conn->max_sge < 1);
|
||||
if (WARN_ON(isert_conn->max_sge < 1)) {
|
||||
err = -ENODEV;
|
||||
goto fail_login_req_pdu;
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&isert_conn->rx_buf_list);
|
||||
INIT_LIST_HEAD(&isert_conn->tx_free_list);
|
||||
|
||||
Reference in New Issue
Block a user