summaryrefslogtreecommitdiff
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorLinmao Li <lilinmao@kylinos.cn>2026-07-10 14:12:54 +0800
committerDavid Heidelberg <david@ixit.cz>2026-08-17 19:27:49 +0200
commit78fd8c38219d920f1bb1ebdfb26913d8c515c0f7 (patch)
tree06d7c5e088063a91c3195c0305033f1bd6dada22 /scripts/objdiff
parent4b992fb2ce3e7bb394b3d57e2bf22928e70cfb83 (diff)
downloadlinux-next-78fd8c38219d920f1bb1ebdfb26913d8c515c0f7.tar.gz
linux-next-78fd8c38219d920f1bb1ebdfb26913d8c515c0f7.zip
nfc: digital: Do not dump a NULL response in command completion
digital_wq_cmd_complete() dumps the response data whenever cmd->resp is not an error pointer. However, a driver can legitimately complete a command with no response skb at all. digital_tg_send_psl_res() is the only caller that passes timeout=0, meaning no response is expected once the command has been transmitted. On that path trf7970a completes the command with trf->rx_skb = ERR_PTR(0); which evaluates to NULL. IS_ERR(NULL) is false, so the NULL response passes the !IS_ERR() check and cmd->resp->data and cmd->resp->len are dereferenced whenever the debug print site is enabled. The driver guards its own dump with "trf->rx_skb && !IS_ERR(trf->rx_skb)"; the digital layer is missing the NULL half of that test. Use IS_ERR_OR_NULL() so that NULL responses are skipped as well. The callback on that path, digital_tg_send_psl_res_complete(), never dereferences resp and dev_kfree_skb() accepts NULL, so only the debug dump needs fixing. Fixes: 59ee2361c924 ("NFC Digital: Implement driver commands mechanism") Signed-off-by: Linmao Li <lilinmao@kylinos.cn> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Link: https://patch.msgid.link/20260710061254.80975-1-lilinmao@kylinos.cn Signed-off-by: David Heidelberg <david@ixit.cz>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions