diff options
author | 2022-07-06 16:45:07 +0800 | |
---|---|---|
committer | 2022-07-07 12:18:18 +0200 | |
commit | c8e27a4a5136e7230f9e4ffcf132705bf56864cc (patch) | |
tree | 76b9c9125ccfb8459b96efd4e84951ac978adc9e /net/unix/sysctl_net_unix.c | |
parent | gpio: vf610: fix compilation error (diff) | |
download | wireguard-linux-c8e27a4a5136e7230f9e4ffcf132705bf56864cc.tar.xz wireguard-linux-c8e27a4a5136e7230f9e4ffcf132705bf56864cc.zip |
gpiolib: cdev: fix null pointer dereference in linereq_free()
Fix a kernel NULL pointer dereference reported by gpio kselftests.
linereq_free() can be called as part of the cleanup of a failed request,
at which time the desc for a line may not have been determined, so it
is unsafe to dereference without a check.
Add a check prior to dereferencing the line desc.
Fixes: 2068339a6c35 ("gpiolib: cdev: Add hardware timestamp clock type")
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions