Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipmi: Disable sysfs access and requests in maintenance mode

If the driver goes into any maintenance mode, disable sysfs access until
it is done.

If the driver goes into reset maintenance mode, disable all messages
until it is done.

Signed-off-by: Corey Minyard <corey@minyard.net>
Tested-by: Frederick Lawler <fred@cloudflare.com>

+11
+11
drivers/char/ipmi/ipmi_msghandler.c
··· 2319 2319 2320 2320 if (!run_to_completion) 2321 2321 mutex_lock(&intf->users_mutex); 2322 + if (intf->maintenance_mode_state == IPMI_MAINTENANCE_MODE_STATE_RESET) { 2323 + /* No messages while the BMC is in reset. */ 2324 + rv = -EBUSY; 2325 + goto out_err; 2326 + } 2322 2327 if (intf->in_shutdown) { 2323 2328 rv = -ENODEV; 2324 2329 goto out_err; ··· 2619 2614 if (intf->in_bmc_register || 2620 2615 (bmc->dyn_id_set && time_is_after_jiffies(bmc->dyn_id_expiry))) 2621 2616 goto out_noprocessing; 2617 + 2618 + /* Don't allow sysfs access when in maintenance mode. */ 2619 + if (intf->maintenance_mode_state) { 2620 + rv = -EBUSY; 2621 + goto out_noprocessing; 2622 + } 2622 2623 2623 2624 prev_guid_set = bmc->dyn_guid_set; 2624 2625 __get_guid(intf);