]> www.infradead.org Git - users/hch/xfs.git/commit
i2c: mark HostNotify target address as used
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 10 Jul 2024 08:55:07 +0000 (10:55 +0200)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 11 Jul 2024 09:27:30 +0000 (11:27 +0200)
commitbd9f5348089b65612e5ca976e2ae22f005340331
treea05491d9e8675e9022bc2473ce89e01737b30668
parent6dfe0aba99e544326583aa20ef760370f03ec3b9
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: 2a71593da34d ("i2c: smbus: add core function handling SMBus host-notify")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-core-base.c