summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/user.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2024-07-29 14:04:43 +0200
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-07-30 14:27:57 +0200
commite075c3b13a0a142dcd3151b25d29a24f31b7b640 (patch)
treea4f0fb0ba5bf81a3408fb973b6fee95d613bfd00 /include/asm-generic/user.h
parentLinux 6.11-rc1 (diff)
downloadlinux-e075c3b13a0a142dcd3151b25d29a24f31b7b640.tar.xz
linux-e075c3b13a0a142dcd3151b25d29a24f31b7b640.zip
platform/x86: intel-vbtn: Protect ACPI notify handler against recursion
Since commit e2ffcda16290 ("ACPI: OSL: Allow Notify () handlers to run on all CPUs") ACPI notify handlers like the intel-vbtn notify_handler() may run on multiple CPU cores racing with themselves. This race gets hit on Dell Venue 7140 tablets when undocking from the keyboard, causing the handler to try and register priv->switches_dev twice, as can be seen from the dev_info() message getting logged twice: [ 83.861800] intel-vbtn INT33D6:00: Registering Intel Virtual Switches input-dev after receiving a switch event [ 83.861858] input: Intel Virtual Switches as /devices/pci0000:00/0000:00:1f.0/PNP0C09:00/INT33D6:00/input/input17 [ 83.861865] intel-vbtn INT33D6:00: Registering Intel Virtual Switches input-dev after receiving a switch event After which things go seriously wrong: [ 83.861872] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/INT33D6:00/input/input17' ... [ 83.861967] kobject: kobject_add_internal failed for input17 with -EEXIST, don't try to register things with the same name in the same directory. [ 83.877338] BUG: kernel NULL pointer dereference, address: 0000000000000018 ... Protect intel-vbtn notify_handler() from racing with itself with a mutex to fix this. Fixes: e2ffcda16290 ("ACPI: OSL: Allow Notify () handlers to run on all CPUs") Reported-by: En-Wei Wu <en-wei.wu@canonical.com> Closes: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2073001 Tested-by: Kostadin Stoilov <kmstoilov@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240729120443.14779-1-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'include/asm-generic/user.h')
0 files changed, 0 insertions, 0 deletions