gpiolib: cdev: fix null pointer dereference in linereq_free()
commit e6391dd38aaa576d5d1db52a30a7f7f7292a3111 from https://nv-tegra.nvidia.com/r/3rdparty/canonical/linux-jammy.git jetson_36.3 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. Bug 3961133 Change-Id: I30bf608c3ee816547a3641968e721cd2155a5960 Fixes: 2068339a ("gpiolib: cdev: Add hardware timestamp clock type") Signed-off-by:Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl> Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-jammy/+/3088861 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com> Tested-by:
Gautham Srinivasan <gauthams@nvidia.com> Reviewed-by:
Gautham Srinivasan <gauthams@nvidia.com> Reviewed-by:
svcacv <svcacv@nvidia.com> Reviewed-by:
Jon Hunter <jonathanh@nvidia.com> Signed-off-by:
Rajeshkumar Ramasamy <rajeshkumar.ramasamy@windriver.com>
Loading
Please register or sign in to comment