forked from Minki/linux
21feadd024
The i2c_client structure can be fairly large, which leads to
a warning about possible kernel stack overflow in some
configurations:
drivers/char/ipmi/ipmb_dev_int.c:115:16: error: stack frame size of 1032 bytes in function 'ipmb_write' [-Werror,-Wframe-larger-than=]
There is no real reason to even declare an i2c_client, as we can simply
call i2c_smbus_xfer() directly instead of the i2c_smbus_write_block_data()
wrapper.
Convert the ipmb_write() to use an open-coded i2c_smbus_write_block_data()
here, without changing the behavior.
It seems that there is another problem with this implementation;
when user space passes a length of more than I2C_SMBUS_BLOCK_MAX
bytes, all the rest is silently ignored. This should probably be
addressed in a separate patch, but I don't know what the intended
behavior is here.
Fixes:
|
||
---|---|---|
.. | ||
bt-bmc.c | ||
ipmb_dev_int.c | ||
ipmi_bt_sm.c | ||
ipmi_devintf.c | ||
ipmi_dmi.c | ||
ipmi_dmi.h | ||
ipmi_kcs_sm.c | ||
ipmi_msghandler.c | ||
ipmi_plat_data.c | ||
ipmi_plat_data.h | ||
ipmi_powernv.c | ||
ipmi_poweroff.c | ||
ipmi_si_hardcode.c | ||
ipmi_si_hotmod.c | ||
ipmi_si_intf.c | ||
ipmi_si_mem_io.c | ||
ipmi_si_parisc.c | ||
ipmi_si_pci.c | ||
ipmi_si_platform.c | ||
ipmi_si_port_io.c | ||
ipmi_si_sm.h | ||
ipmi_si.h | ||
ipmi_smic_sm.c | ||
ipmi_ssif.c | ||
ipmi_watchdog.c | ||
Kconfig | ||
kcs_bmc_aspeed.c | ||
kcs_bmc_npcm7xx.c | ||
kcs_bmc.c | ||
kcs_bmc.h | ||
Makefile |