mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
net: add __must_check to skb_put_padto()
[ Upstream commit 4a009cb04a ]
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user