]> git.ipfire.org Git - people/arne_f/kernel.git/commit
HID: intel-ish-hid: avoid binding wrong ishtp_cl_device
authorHong Liu <hong.liu@intel.com>
Tue, 12 Feb 2019 12:05:20 +0000 (20:05 +0800)
committerJiri Kosina <jkosina@suse.cz>
Fri, 15 Feb 2019 21:47:21 +0000 (22:47 +0100)
commit0d28f49412405d87d3aae83da255070a46e67627
tree3c1d05758fa2731275e2449e6687037f69d8f1d9
parent1475af255e18f35dc46f8a7acc18354c73d45149
HID: intel-ish-hid: avoid binding wrong ishtp_cl_device

When performing a warm reset in ishtp bus driver, the ishtp_cl_device
will not be removed, its fw_client still points to the already freed
ishtp_device.fw_clients array.

Later after driver finishing ishtp client enumeration, this dangling
pointer may cause driver to bind the wrong ishtp_cl_device to the new
client, causing wrong callback to be called for messages intended for
the new client.

This helps in development of firmware where frequent switching of
firmwares is required without Linux reboot.

Signed-off-by: Hong Liu <hong.liu@intel.com>
Tested-by: Hongyan Song <hongyan.song@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/intel-ish-hid/ishtp/bus.c