On Wed, 6 Dec 2017, Rolf Eike Beer wrote:
> Mikulas Patocka wrote: > > This patch fixes ipmi crash on parisc introduced in the kernel 4.15-rc. > > The pointer io.io_setup is not initialized and thus it causes crash in > > try_smi_init when attempting to call new_smi->io.io_setup. > > > > Signed-off-by: Mikulas Patocka <[email protected]> > > > > --- > > drivers/char/ipmi/ipmi_si_parisc.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > Index: linux-4.15-rc2/drivers/char/ipmi/ipmi_si_parisc.c > > =================================================================== > > --- linux-4.15-rc2.orig/drivers/char/ipmi/ipmi_si_parisc.c 2017-12-06 > > 01:19:49.000000000 +0100 > > +++ linux-4.15-rc2/drivers/char/ipmi/ipmi_si_parisc.c 2017-12-06 > > 06:40:12.000000000 +0100 > > @@ -10,6 +10,8 @@ static int __init ipmi_parisc_probe(stru > > { > > struct si_sm_io io; > > > > + memset(&io, 0, sizeof(io)); > > + > > io.si_type = SI_KCS; > > io.addr_source = SI_DEVICETREE; > > io.addr_type = IPMI_MEM_ADDR_SPACE; > > Can't this be a C99 initializer for the whole struct? AFAIK this would set all > remaining members to 0 anyway. > > Eike It can - but all the other functions that call ipmi_si_add_smi also use memset. Mikulas ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openipmi-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openipmi-developer
