Searched hist:"13244 ccc" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/include/linux/ |
H A D | skbuff.h | 13244ccc Wed Dec 01 12:54:52 CST 2021 Luiz Augusto von Dentz <luiz.von.dentz@intel.com> 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>
|
/openbmc/linux/net/core/ |
H A D | skbuff.c | 13244ccc Wed Dec 01 12:54:52 CST 2021 Luiz Augusto von Dentz <luiz.von.dentz@intel.com> 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>
|