linux-stable/net/nfc
Lin Ma a799de0e59 net: nfc: remove inappropriate attrs check
Revert "NFC: fix attrs checks in netlink interface"
This reverts commit 18917d5147.

Our checks found weird attrs present check in function
nfc_genl_dep_link_down() and nfc_genl_llc_get_params(), which are
introduced by commit 18917d5147 ("NFC: fix attrs checks in netlink
interface").

According to its message, it should add checks for functions
nfc_genl_deactivate_target() and nfc_genl_fw_download(). However, it
didn't do that. In fact, the expected checks are added by
(1) commit 385097a367 ("nfc: Ensure presence of required attributes in
the deactivate_target handler") and
(2) commit 280e3ebdaf ("nfc: Ensure presence of NFC_ATTR_FIRMWARE_NAME
attribute in nfc_genl_fw_download()"). Perhaps something went wrong.

Anyway, the attr NFC_ATTR_TARGET_INDEX is never accessed in callback
nfc_genl_dep_link_down() and same for NFC_ATTR_FIRMWARE_NAME and
nfc_genl_llc_get_params(). Thus, remove those checks.

Signed-off-by: Lin Ma <linma@zju.edu.cn>
Link: https://lore.kernel.org/r/20240410034846.167421-1-linma@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-04-12 18:52:35 -07:00
..
hci nfc: hci: Save a few bytes of memory when registering a 'nfc_llc' engine 2024-02-06 15:36:06 +01:00
nci nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet 2024-03-22 09:41:39 +00:00
af_nfc.c nfc: fix error handling of nfc_proto_register() 2021-10-13 17:32:38 -07:00
core.c nfc: core: make nfc_class constant 2024-03-05 11:21:18 -08:00
digital.h
digital_core.c net: fill in MODULE_DESCRIPTION()s for NFC 2024-01-11 16:16:08 -08:00
digital_dep.c net:nfc:digital: Fix a double free in digital_tg_recv_dep_req 2021-04-27 15:36:10 -07:00
digital_technology.c NFC: digital: fix possible memory leak in digital_in_send_sdd_req() 2021-10-13 17:44:29 -07:00
Kconfig net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
llcp.h net: nfc: Fix use-after-free caused by nfc_llcp_find_local 2023-06-26 10:57:23 +01:00
llcp_commands.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-27 09:45:22 -07:00
llcp_core.c nfc: llcp_core: Hold a ref to llcp_local->dev when holding a ref to llcp_local 2023-12-25 07:29:04 +00:00
llcp_sock.c nfc: llcp: fix nfc_llcp_setsockopt() unsafe copies 2024-04-09 17:01:01 -07:00
Makefile
netlink.c net: nfc: remove inappropriate attrs check 2024-04-12 18:52:35 -07:00
nfc.h net: nfc: Fix use-after-free caused by nfc_llcp_find_local 2023-06-26 10:57:23 +01:00
rawsock.c nfc: Add KCOV annotations 2022-11-02 11:58:13 +00:00