diff mbox series

[net-next,v2] net: remove BUG_ON from __pskb_pull_tail

Message ID 1542071812-14338-1-git-send-email-lirongqing@baidu.com
State Accepted, archived
Delegated to: David Miller
Headers show
Series [net-next,v2] net: remove BUG_ON from __pskb_pull_tail | expand

Commit Message

Li RongQing Nov. 13, 2018, 1:16 a.m. UTC
if list is NULL pointer, and the following access of list
will trigger panic, which is same as BUG_ON

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 net/core/skbuff.c | 2 --
 1 file changed, 2 deletions(-)

Comments

David Miller Nov. 15, 2018, 11:08 p.m. UTC | #1
From: Li RongQing <lirongqing@baidu.com>
Date: Tue, 13 Nov 2018 09:16:52 +0800

> if list is NULL pointer, and the following access of list
> will trigger panic, which is same as BUG_ON
> 
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Applied.
diff mbox series

Patch

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 396fcb3baad0..d69503d66021 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1925,8 +1925,6 @@  void *__pskb_pull_tail(struct sk_buff *skb, int delta)
 		struct sk_buff *insp = NULL;
 
 		do {
-			BUG_ON(!list);
-
 			if (list->len <= eat) {
 				/* Eaten as whole. */
 				eat -= list->len;