mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
ib_srpt: Clear the cm_id->context pointer before freeing a channel
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4071 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2609,6 +2609,7 @@ free_ring:
|
||||
ch->max_rsp_size, DMA_TO_DEVICE);
|
||||
|
||||
free_ch:
|
||||
cm_id->context = NULL;
|
||||
kfree(ch);
|
||||
|
||||
reject:
|
||||
@@ -2723,6 +2724,8 @@ static int srpt_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
|
||||
{
|
||||
int ret;
|
||||
|
||||
BUG_ON(!cm_id->context);
|
||||
|
||||
ret = 0;
|
||||
switch (event->event) {
|
||||
case IB_CM_REQ_RECEIVED:
|
||||
|
||||
Reference in New Issue
Block a user