skbuff: introduce skb_pull_data
[ Upstream commit 13244ccc ] 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> Stable-dep-of: cda0d6a1 ("Bluetooth: qca: fix info leak when fetching fw build id") Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading