Skip to content

Commit bd9f534

Browse files
author
Wolfram Sang
committed
i2c: mark HostNotify target address as used
I2C core handles the local target for receiving HostNotify alerts. There is no separate driver bound to that address. That means userspace can access it if desired, leading to further complications if controllers are not capable of reading their own local target. Bind the local target to the dummy driver so it will be marked as "handled by the kernel" if the HostNotify feature is used. That protects aginst userspace access and prevents other drivers binding to it. Fixes: 2a71593 ("i2c: smbus: add core function handling SMBus host-notify") Signed-off-by: Wolfram Sang <[email protected]>
1 parent 6dfe0ab commit bd9f534

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/i2c/i2c-core-base.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,7 @@ EXPORT_SYMBOL(i2c_find_device_by_fwnode);
10671067

10681068
static const struct i2c_device_id dummy_id[] = {
10691069
{ "dummy", 0 },
1070+
{ "smbus_host_notify", 0 },
10701071
{ },
10711072
};
10721073

0 commit comments

Comments
 (0)