Re: [PATCH] ipmi: ipmb: initialise event handler read bytes
From: Matt Johnston
Date: Tue Jan 13 2026 - 21:10:37 EST
Hi Corey,
On Tue, 2026-01-13 at 10:00 -0600, Corey Minyard wrote:
> On Tue, Jan 13, 2026 at 05:41:34PM +0800, Matt Johnston wrote:
> > IPMB doesn't use i2c reads, but the handler needs to set a value.
> > Otherwise an i2c read will return an uninitialised value from the bus
> > driver.
>
> This is fine, I suppose. It's probably better to do this.
>
> Are you actually using this code? How was it found?
I'm not using IPMB, so haven't tested the patch on hardware.
We received a patch for mctp-i2c read handling, that made me notice
the uninitialised value problem there. I had a look over other
i2c_slave_register() kernel users to see if the problem was common
(mctp-i2c used ipmi-ipmb as a bit of a reference during development too).
https://lore.kernel.org/netdev/20260108101829.1140448-1-
zhangjian.3032@xxxxxxxxxxxxx/
https://lore.kernel.org/netdev/20260113-mctp-read-fix-v1-1-
70c4b59c741c@xxxxxxxxxxxxxxxxxxxx/
Cheers,
Matt