android_kernel_xiaomi_sm8450/drivers/nfc/pn533
Chengfeng Ye 727c812433 nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails
[ Upstream commit 9fec40f850658e00a14a7dd9e06f7fbc7e59cc4a ]

skb is already freed by dev_kfree_skb in pn533_fill_fragment_skbs,
but follow error handler branch when pn533_fill_fragment_skbs()
fails, skb is freed again, results in double free issue. Fix this
by not free skb in error path of pn533_fill_fragment_skbs.

Fixes: 963a82e07d ("NFC: pn533: Split large Tx frames in chunks")
Fixes: 93ad42020c ("NFC: pn533: Target mode Tx fragmentation support")
Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 14:04:27 +01:00
..
i2c.c nfc: No need to set .owner platform_driver_register 2020-01-14 11:58:11 -08:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile nfc: pn533: add UART phy driver 2019-10-29 21:05:26 -07:00
pn533.c nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails 2021-11-18 14:04:27 +01:00
pn533.h nfc: pn533: pn533_phy_ops dev_[up, down] return int 2019-11-13 12:15:03 -08:00
uart.c nfc: pn533: pn533_phy_ops dev_[up, down] return int 2019-11-13 12:15:03 -08:00
usb.c nfc: pn533/usb.c: fix spelling of "functions" 2020-09-08 20:25:51 -07:00