iw_cxgb4: avoid freeing skb twice in arp failure case
Subsystems (2)
Potnuri Bharat Teja
maintainerPATCH 1/1 iw_cxgb4: avoid freeing skb twice in arp failure case
_put_ep_safe() and _put_pass_ep_safe() free the skb before it is freed by process_work(). fix double free by freeing the skb only in process_work().
Fixes 1dad0ebeea1c ("iw_cxgb4: Avoid touch after free error in ARP failure handlers")
Signed-off-by Dakshaja Uppalapati <[email protected]>
Signed-off-by Potnuri Bharat Teja <[email protected]>
--- drivers/infiniband/hw/cxgb4/cm.c | 2 -- 1 file changed, 2 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +0 -2
@@ -495,7 +495,6 @@ static int _put_ep_safe(struct c4iw_dev *dev, struct sk_buff *skb) ep = *((struct c4iw_ep **)(skb->cb +2 *sizeof (void *)));release_ep_resources (ep); -kfree_skb (skb);return 0 ; }
@@ -506,7 +505,6 @@ static int _put_pass_ep_safe(struct c4iw_dev *dev, struct sk_buff *skb) ep = *((struct c4iw_ep **)(skb->cb +2 *sizeof (void *)));c4iw_put_ep (&ep->parent_ep->com);release_ep_resources (ep); -kfree_skb (skb);return 0 ; }
Signature · 1 line
2.3.9
Jason Gunthorpe
AppliedQuoted 9 lines · Potnuri Bharat Teja
_put_ep_safe()and_put_pass_ep_safe()free the skb before it is freed byprocess_work(). fix double free by freeing the skb only inprocess_work().Fixes 1dad0ebeea1c ("iw_cxgb4: Avoid touch after free error in ARP failure handlers")Signed-off-by Dakshaja Uppalapati <[email protected]>Signed-off-by Potnuri Bharat Teja <[email protected]>--- drivers/infiniband/hw/cxgb4/cm.c | 2 -- 1 file changed, 2 deletions(-)
Applied to for-rc, thanks
Jason