linux/drivers/char/ipmi
Feng Tang b1bc8753ee ipmi: use vzalloc instead of kmalloc for user creation
[ Upstream commit 7c47a219b9 ]

We met mulitple times of failure of staring bmc-watchdog,
due to the runtime memory allocation failure of order 4.

     bmc-watchdog: page allocation failure: order:4, mode:0x40cc0(GFP_KERNEL|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0-1
     CPU: 1 PID: 2571 Comm: bmc-watchdog Not tainted 5.5.0-00045-g7d6bb61d6188c #1
     Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.00.01.0015.110720180833 11/07/2018
     Call Trace:
      dump_stack+0x66/0x8b
      warn_alloc+0xfe/0x160
      __alloc_pages_slowpath+0xd3e/0xd80
      __alloc_pages_nodemask+0x2f0/0x340
      kmalloc_order+0x18/0x70
      kmalloc_order_trace+0x1d/0xb0
      ipmi_create_user+0x55/0x2c0 [ipmi_msghandler]
      ipmi_open+0x72/0x110 [ipmi_devintf]
      chrdev_open+0xcb/0x1e0
      do_dentry_open+0x1ce/0x380
      path_openat+0x305/0x14f0
      do_filp_open+0x9b/0x110
      do_sys_open+0x1bd/0x250
      do_syscall_64+0x5b/0x1f0
      entry_SYSCALL_64_after_hwframe+0x44/0xa9

Using vzalloc/vfree for creating ipmi_user heals the
problem

Thanks to Stephen Rothwell for finding the vmalloc.h
inclusion issue.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:28 +02:00
..
Kconfig Some small fixes for various things, nothing huge, mostly found 2019-07-13 15:07:02 -07:00
Makefile Add support for IPMB driver 2019-06-10 14:47:10 -05:00
bt-bmc.c
ipmb_dev_int.c drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write 2020-02-19 19:53:05 +01:00
ipmi_bt_sm.c
ipmi_devintf.c
ipmi_dmi.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_dmi.h ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_kcs_sm.c
ipmi_msghandler.c ipmi: use vzalloc instead of kmalloc for user creation 2020-06-24 17:50:28 +02:00
ipmi_plat_data.c
ipmi_plat_data.h
ipmi_powernv.c
ipmi_poweroff.c
ipmi_si.h ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si_hardcode.c
ipmi_si_hotmod.c
ipmi_si_intf.c ipmi_si_intf: Fix race in timer shutdown handling 2019-09-12 16:03:18 -05:00
ipmi_si_mem_io.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si_parisc.c
ipmi_si_pci.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si_platform.c ipmi_si: Avoid spurious errors for optional IRQs 2020-03-18 07:17:52 +01:00
ipmi_si_port_io.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si_sm.h ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_smic_sm.c
ipmi_ssif.c ipmi:ssif: Handle a possible NULL pointer reference 2020-03-05 16:43:35 +01:00
ipmi_watchdog.c
kcs_bmc.c
kcs_bmc.h
kcs_bmc_aspeed.c
kcs_bmc_npcm7xx.c