summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorRodrigo Rivas Costa <rodrigorivascosta@gmail.com>2018-05-22 22:10:06 +0200
committerSiarhei Vishniakou <svv@google.com>2019-11-08 10:20:02 -0600
commit9403c8f430c498a321fd66fb60c12789c84e7c79 (patch)
treea29ded650e950ce47c83e09118faf1f8f9fb030b /net/ipv4/tcp_ipv4.c
parentecd6878cca81ec4639ab50800739fd9ccff1e4a2 (diff)
UPSTREAM: HID: steam: use hid_device.driver_data instead of hid_set_drvdata()
When creating the low-level hidraw device, the reference to steam_device was stored using hid_set_drvdata(). But this value is not guaranteed to be kept when set before calling probe. If this pointer is reset, it crashes when opening the emulated hidraw device. It looks like hid_set_drvdata() is for users "avobe" this hid_device, while hid_device.driver_data it for users "below" this one. In this case, we are creating a virtual hidraw device, so we must use hid_device.driver_data. Signed-off-by: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> Tested-by: Mariusz Ceier <mceier+kernel@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> (cherry picked from commit 4bff980f920693693d7a529c06a1bd1e7f77603a ("HID: steam: use hid_device.driver_data instead of hid_set_drvdata()") https://github.com/torvalds/linux/commit/4bff980f920693693d7a529c06a1bd1e7f77603a Change-Id: I650db1803c53bc055be4574b9190df57b6b8aad3 Signed-Off-By: Siarhei Vishniakou <svv@google.com> Bug: 136263708 Test: connect steam controller
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
0 files changed, 0 insertions, 0 deletions