All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] misc: st_core: Fix skb double free corruption
@ 2018-04-28  6:07 Pengcheng Li
  0 siblings, 0 replies; 3+ messages in thread
From: Pengcheng Li @ 2018-04-28  6:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: lipengcheng8, yaobaofeng, lijiangxiong, kongfei

When some failures happened in hci_recv_frame() function,
skb is freed by both hci_recv_frame and st_send_frame

Signed-off-by: Li Pengcheng <lipengcheng8@huawei.com>
Signed-off-by: Yao Baofeng <yaobaofeng@huawei.com>
Signed-off-by: Li Jiangxiong <lijiangxiong@hisilicon.com>
---
 drivers/misc/ti-st/st_core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c
index 0005159..f4ce211 100644
--- a/drivers/misc/ti-st/st_core.c
+++ b/drivers/misc/ti-st/st_core.c
@@ -124,7 +124,6 @@ static void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata)
 			(st_gdata->list[chnl_id]->priv_data, st_gdata->rx_skb)
 			     != 0)) {
 			pr_err(" proto stack %d's ->recv failed", chnl_id);
-			kfree_skb(st_gdata->rx_skb);
 			return;
 		}
 	} else {
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] misc: st_core: Fix skb double free corruption
@ 2018-05-23  2:39 Pengcheng Li
  2018-05-23  3:18 ` John Stultz
  0 siblings, 1 reply; 3+ messages in thread
From: Pengcheng Li @ 2018-05-23  2:39 UTC (permalink / raw)
  To: amira, pavan_savoy, x0153368, gigi.joseph, marcel, johan.hedberg,
	arnd, gregkh, guodong.xu, john.stultz, dimitrysh, linux-kernel
  Cc: lipengcheng8, yaobaofeng, lijiangxiong, kongfei

St_gdata->list[chnl_id]->recv function pointer to hci_recv_frame interface,
hci_recv_frame interface releases skb buffer in case of exception.

Signed-off-by: Li Pengcheng <lipengcheng8@huawei.com>
Signed-off-by: Yao Baofeng <yaobaofeng@huawei.com>
Signed-off-by: Li Jiangxiong <lijiangxiong@hisilicon.com>
---
 drivers/misc/ti-st/st_core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c
index 0005159..f4ce211 100644
--- a/drivers/misc/ti-st/st_core.c
+++ b/drivers/misc/ti-st/st_core.c
@@ -124,7 +124,6 @@ static void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata)
 			(st_gdata->list[chnl_id]->priv_data, st_gdata->rx_skb)
 			     != 0)) {
 			pr_err(" proto stack %d's ->recv failed", chnl_id);
-			kfree_skb(st_gdata->rx_skb);
 			return;
 		}
 	} else {
-- 
2.8.0

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

end of thread, other threads:[~2018-05-23  3:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-28  6:07 [PATCH] misc: st_core: Fix skb double free corruption Pengcheng Li
2018-05-23  2:39 Pengcheng Li
2018-05-23  3:18 ` John Stultz

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.