[Patch net] net: remove the bogus overflow debug check in pskb_may_pull()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Cong Wang <cong.wang@xxxxxxxxxxxxx>

Commit 219eee9c0d16 ("net: skbuff: add overflow debug check to pull/push
helpers") introduced an overflow debug check for pull/push helpers.
For __skb_pull() this makes sense because its callers rarely check its
return value. But for pskb_may_pull() it does not make sense, since its
return value is properly taken care of. Remove the one in
pskb_may_pull(), we can continue rely on its return value.

Fixes: 219eee9c0d16 ("net: skbuff: add overflow debug check to pull/push helpers")
Reported-by: syzbot+0c4150bff9fff3bf023c@xxxxxxxxxxxxxxxxxxxxxxxxx
Cc: Florian Westphal <fw@xxxxxxxxx>
Signed-off-by: Cong Wang <cong.wang@xxxxxxxxxxxxx>
---
 include/linux/skbuff.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 1c2902eaebd3..9fd49bab6595 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2735,8 +2735,6 @@ void *__pskb_pull_tail(struct sk_buff *skb, int delta);
 static inline enum skb_drop_reason
 pskb_may_pull_reason(struct sk_buff *skb, unsigned int len)
 {
-	DEBUG_NET_WARN_ON_ONCE(len > INT_MAX);
-
 	if (likely(len <= skb_headlen(skb)))
 		return SKB_NOT_DROPPED_YET;
 
-- 
2.34.1





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux