diff options
author | Eric Dumazet <edumazet@google.com> | 2020-09-09 01:27:40 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-01 11:11:49 +0200 |
commit | c17c9e3e7cadfbdf11d6d340d0e37254a7e94ece (patch) | |
tree | 4d7db004302c2aa1038d67212f914b4aea68f002 /include | |
parent | 6afd3e4010e57d278c3e79b4fbe323ade9c14f93 (diff) |
net: add __must_check to skb_put_padto()
[ Upstream commit 4a009cb04aeca0de60b73f37b102573354214b52 ]
skb_put_padto() and __skb_put_padto() callers
must check return values or risk use-after-free.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/skbuff.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 735ff1525f48..2528f712b8c0 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2651,7 +2651,7 @@ static inline int skb_padto(struct sk_buff *skb, unsigned int len) * is untouched. Otherwise it is extended. Returns zero on * success. The skb is freed on error. */ -static inline int skb_put_padto(struct sk_buff *skb, unsigned int len) +static inline int __must_check skb_put_padto(struct sk_buff *skb, unsigned int len) { unsigned int size = skb->len; |