Re: [PATCH] NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error
From: David Miller
Date: Tue Nov 12 2019 - 00:42:42 EST
From: Stephan Gerhold <stephan@xxxxxxxxxxx>
Date: Sun, 10 Nov 2019 17:19:15 +0100
> I2C communication errors (-EREMOTEIO) during the IRQ handler of nxp-nci
> result in a NULL pointer dereference at the moment:
...
> Change the code to call only nxp_nci_fw_recv_frame() in case of an error.
> Make sure to log it so it is obvious that a communication error occurred.
> The error above then becomes:
>
> nxp-nci_i2c i2c-NXP1001:00: NFC: Read failed with error -121
> nci: __nci_request: wait_for_completion_interruptible_timeout failed 0
> nxp-nci_i2c i2c-NXP1001:00: NFC: Read failed with error -121
>
> Fixes: 6be88670fc59 ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver")
> Signed-off-by: Stephan Gerhold <stephan@xxxxxxxxxxx>
Applied and queued up for -stable.