FAILED: patch "[PATCH] iio: pressure: dps310: fix NULL pointer dereference on ACPI" failed to apply to 6.1-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 26e9213898fc949923188ef0aeea31fc87708836
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026090922-unread-confused-555a@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 26e9213898fc949923188ef0aeea31fc87708836 Mon Sep 17 00:00:00 2001
From: Rupesh Majhi <[email protected]>
Date: Sun, 19 Jul 2026 03:07:52 +0300
Subject: [PATCH] iio: pressure: dps310: fix NULL pointer dereference on ACPI
probe
When the device is enumerated through its ACPI HID (IFX3100), i2c_client_get_device_id() returns NULL: the ACPI-derived client name does not match the driver's i2c_device_id table. dps310_probe() then dereferences that NULL pointer in "iio->name = id->name" and crashes the kernel during probe.
The IIO device name is always "dps310", so set it directly and drop the now-unused device-id lookup.
drivers/iio/pressure/dps310.c +1 -2
@@ -845,7 +845,6 @@ static const struct iio_info dps310_info = {static int dps310_probe (struct i2c_client *client) { -const struct i2c_device_id *id =i2c_client_get_device_id (client);struct dps310_data *data;struct iio_dev *iio;int rc;
@@ -858,7 +857,7 @@ static int dps310_probe(struct i2c_client *client) data->client = client;mutex_init (&data->lock); - iio->name = id->name; + iio->name =DPS310_DEV_NAME ; iio->channels = dps310_channels; iio->num_channels =ARRAY_SIZE (dps310_channels); iio->info = &dps310_info;
Sasha Levin
maintainerPATCH 1/1 iio: pressure: dps310: fix NULL pointer dereference on ACPI probe
From: Rupesh Majhi <[email protected]>
[ Upstream commit 26e9213898fc949923188ef0aeea31fc87708836 ]
When the device is enumerated through its ACPI HID (IFX3100), i2c_client_get_device_id() returns NULL: the ACPI-derived client name does not match the driver's i2c_device_id table. dps310_probe() then dereferences that NULL pointer in "iio->name = id->name" and crashes the kernel during probe.
The IIO device name is always "dps310", so set it directly and drop the now-unused device-id lookup.
--- drivers/iio/pressure/dps310.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/pressure/dps310.c +1 -1
@@ -843,7 +843,7 @@ static int dps310_probe(struct i2c_client *client, data->client = client;mutex_init (&data->lock); - iio->name = id->name; + iio->name =DPS310_DEV_NAME ; iio->channels = dps310_channels; iio->num_channels =ARRAY_SIZE (dps310_channels); iio->info = &dps310_info;
Signature · 1 line
2.53.0