diff options
author | 2021-06-08 17:42:37 +0300 | |
---|---|---|
committer | 2021-06-09 14:40:48 +0200 | |
commit | 7c3e8d9df265bd0bdf6e328174cdfba26eb22f1c (patch) | |
tree | 1922b3ae5ce8a097b22546dacfc2b35173b427d5 /net/unix/af_unix.c | |
parent | Linux 5.13-rc4 (diff) | |
download | wireguard-linux-7c3e8d9df265bd0bdf6e328174cdfba26eb22f1c.tar.xz wireguard-linux-7c3e8d9df265bd0bdf6e328174cdfba26eb22f1c.zip |
serial: 8250_exar: Avoid NULL pointer dereference at ->exit()
It's possible that during ->exit() the private_data is NULL,
for instance when there was no GPIO device instantiated.
Due to this we may not dereference it. Add a respective check.
Note, for now ->exit() only makes sense when GPIO device
was instantiated, that's why we may use the check for entire
function.
Fixes: 81171e7d31a6 ("serial: 8250_exar: Constify the software nodes")
Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20210608144239.12697-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions