torture.c (36970bb91d89618d3495babf44b934e9c9db6bbc) torture.c (fac480efcba6a9f0aea91947f151fd569538b0af)
1/*
2 * Common functions for in-kernel torture tests.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 424 unchanged lines hidden (view full) ---

433
434/*
435 * Detect and respond to a system shutdown.
436 */
437static int torture_shutdown_notify(struct notifier_block *unused1,
438 unsigned long unused2, void *unused3)
439{
440 mutex_lock(&fullstop_mutex);
1/*
2 * Common functions for in-kernel torture tests.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 424 unchanged lines hidden (view full) ---

433
434/*
435 * Detect and respond to a system shutdown.
436 */
437static int torture_shutdown_notify(struct notifier_block *unused1,
438 unsigned long unused2, void *unused3)
439{
440 mutex_lock(&fullstop_mutex);
441 if (fullstop == FULLSTOP_DONTSTOP)
441 if (fullstop == FULLSTOP_DONTSTOP) {
442 VERBOSE_TOROUT_STRING("Unscheduled system shutdown detected");
442 fullstop = FULLSTOP_SHUTDOWN;
443 fullstop = FULLSTOP_SHUTDOWN;
443 else
444 } else {
444 pr_warn("Concurrent rmmod and shutdown illegal!\n");
445 pr_warn("Concurrent rmmod and shutdown illegal!\n");
446 }
445 mutex_unlock(&fullstop_mutex);
446 return NOTIFY_DONE;
447}
448
449static struct notifier_block torture_shutdown_nb = {
450 .notifier_call = torture_shutdown_notify,
451};
452

--- 71 unchanged lines hidden ---
447 mutex_unlock(&fullstop_mutex);
448 return NOTIFY_DONE;
449}
450
451static struct notifier_block torture_shutdown_nb = {
452 .notifier_call = torture_shutdown_notify,
453};
454

--- 71 unchanged lines hidden ---