Files
linux-st/include/linux
Luiz Augusto von Dentz 13244cccc2 skbuff: introduce skb_pull_data
Like skb_pull but returns the original data pointer before pulling the
data after performing a check against sbk->len.

This allows to change code that does "struct foo *p = (void *)skb->data;"
which is hard to audit and error prone, to:

        p = skb_pull_data(skb, sizeof(*p));
        if (!p)
                return;

Which is both safer and cleaner.

Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2021-12-07 17:05:38 +01:00
..
2021-11-12 10:19:09 -08:00
2021-11-15 07:53:10 -08:00
2021-11-23 12:18:48 +00:00
2021-11-10 21:16:56 +00:00
2021-11-16 19:07:53 -08:00
2021-11-16 19:07:54 -08:00
2021-12-07 17:05:38 +01:00
2021-11-16 13:10:34 +00:00