summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2020-09-09 01:27:40 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-01 20:40:01 +0200
commit48668eb1ede2fff6648420a8e8f626622e29b1ee (patch)
tree110856f7bc94c676e8658f1597d860dcf48f9082 /include/linux
parent9429a6b7e94eef4473ab2e5a6fbaddd8a65e24e9 (diff)
downloadlinux-stable-48668eb1ede2fff6648420a8e8f626622e29b1ee.tar.gz
linux-stable-48668eb1ede2fff6648420a8e8f626622e29b1ee.tar.bz2
linux-stable-48668eb1ede2fff6648420a8e8f626622e29b1ee.zip
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/linux')
-rw-r--r--include/linux/skbuff.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index e37112ac332f..fe4b7e488343 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2795,7 +2795,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;