diff options
author | SuperBo | 2017-05-06 17:13:01 +0700 |
---|---|---|
committer | SuperBo | 2017-05-06 17:13:01 +0700 |
commit | 1206283a3e00c689f688a0f6e61f6ef5eb9e5578 (patch) | |
tree | 07498614ec887441d259ddd136a0c680e97a6161 /0005-ipts-fix-NULL-pointer-dereference.patch | |
parent | 206b410774e218ee71e81f5423e7dd5555bb49ac (diff) | |
download | aur-linux-lts-surface4.tar.gz |
Update to Linux 4.9.26
Diffstat (limited to '0005-ipts-fix-NULL-pointer-dereference.patch')
-rw-r--r-- | 0005-ipts-fix-NULL-pointer-dereference.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/0005-ipts-fix-NULL-pointer-dereference.patch b/0005-ipts-fix-NULL-pointer-dereference.patch new file mode 100644 index 000000000000..6148effc3a02 --- /dev/null +++ b/0005-ipts-fix-NULL-pointer-dereference.patch @@ -0,0 +1,31 @@ +From bab1e5b308acfa7572906e70ae959d8db5080b3e Mon Sep 17 00:00:00 2001 +From: Anton Vorontsov <anton@enomsg.org> +Date: Thu, 29 Dec 2016 15:15:38 -0800 +Subject: [PATCH] misc: ipts: Fix NULL pointer dereference in + ipts_hid_release() + +If we failed to add a hid device (e.g. firmware failed to load), +ipts_hid_release() will still be called (by mei_cl_device_remove()) on +shutdown, which in turn will cause ipts->hid to be dereferenced. + +Signed-off-by: Anton Vorontsov <anton@enomsg.org> +--- + drivers/misc/ipts/ipts-hid.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/misc/ipts/ipts-hid.c b/drivers/misc/ipts/ipts-hid.c +index cc3ad0d..afa740f 100644 +--- a/drivers/misc/ipts/ipts-hid.c ++++ b/drivers/misc/ipts/ipts-hid.c +@@ -286,8 +286,9 @@ int ipts_hid_init(ipts_info_t *ipts) + + void ipts_hid_release(ipts_info_t *ipts) + { +- struct hid_device *hid = ipts->hid; +- hid_destroy_device(hid); ++ if (!ipts->hid) ++ return; ++ hid_destroy_device(ipts->hid); + } + + int ipts_handle_hid_data(ipts_info_t *ipts, |