All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] i40iw: Do not set self-referencing pointer to NULL after kfree
@ 2016-08-23  0:01 Shiraz Saleem
       [not found] ` <1471910507-83104-1-git-send-email-shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Shiraz Saleem @ 2016-08-23  0:01 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Mustafa Ismail,
	Shiraz Saleem

From: Mustafa Ismail <mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

In i40iw_free_virt_mem(), do not set mem->va to NULL
after freeing it as mem->va is a self-referencing pointer
to mem.

Fixes: 4e9042e647ff ("i40iw: add hw and utils files")

Reported-by: Stefan Assmann <sassmann-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Mustafa Ismail <mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---

V2: Fix typo in subject line.

 drivers/infiniband/hw/i40iw/i40iw_utils.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_utils.c b/drivers/infiniband/hw/i40iw/i40iw_utils.c
index 0e8db0a..d5f5de2 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_utils.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_utils.c
@@ -674,7 +674,6 @@ enum i40iw_status_code i40iw_free_virt_mem(struct i40iw_hw *hw,
 	if (!mem)
 		return I40IW_ERR_PARAM;
 	kfree(mem->va);
-	mem->va = NULL;
 	return 0;
 }
 
-- 
2.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-08-24 16:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-23  0:01 [PATCH V2] i40iw: Do not set self-referencing pointer to NULL after kfree Shiraz Saleem
     [not found] ` <1471910507-83104-1-git-send-email-shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-08-23  1:41   ` Leon Romanovsky
     [not found]     ` <20160823014135.GF15065-2ukJVAZIZ/Y@public.gmane.org>
2016-08-23 16:00       ` Shiraz Saleem
     [not found]         ` <20160823160030.GA37288-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2016-08-23 16:51           ` Doug Ledford
     [not found]             ` <a65ff978-0790-24aa-d0c9-0e5aaaf7b301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-23 18:46               ` Leon Romanovsky
     [not found]                 ` <20160823184623.GN15065-2ukJVAZIZ/Y@public.gmane.org>
2016-08-23 19:00                   ` Shiraz Saleem
     [not found]                     ` <20160823190022.GA76544-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2016-08-23 19:05                       ` Doug Ledford
     [not found]                         ` <66032524-b459-6429-93f9-101da7809f7e-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-23 21:03                           ` Leon Romanovsky
     [not found]                             ` <20160823210347.GP15065-2ukJVAZIZ/Y@public.gmane.org>
2016-08-24 16:51                               ` Shiraz Saleem
2016-08-24 15:27   ` Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.