#include #include #include #include "notifier-error-inject.h" static int priority; module_param(priority, int, 0); MODULE_PARM_DESC(priority, "specify memory notifier priority"); static struct notifier_err_inject memory_notifier_err_inject = { .actions = { { NOTIFIER_ERR_INJECT_ACTION(MEM_GOING_ONLINE) }, { NOTIFIER_ERR_INJECT_ACTION(MEM_GOING_OFFLINE) }, {} } }; static struct dentry *dir; static int err_inject_init(void) { int err; dir = notifier_err_inject_init("memory", notifier_err_inject_dir, &memory_notifier_err_inject, priority); if (IS_ERR(dir)) return PTR_ERR(dir); err = register_memory_notifier(&memory_notifier_err_inject.nb); if (err) debugfs_remove_recursive(dir); return err; } static void err_inject_exit(void) { unregister_memory_notifier(&memory_notifier_err_inject.nb); debugfs_remove_recursive(dir); } module_init(err_inject_init); module_exit(err_inject_exit); MODULE_DESCRIPTION("memory notifier error injection module"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Akinobu Mita "); ove net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
AgeCommit message (Expand)AuthorFilesLines
2017-02-10switchdev: bridge: Offload mc router portsNogah Frankel1-0/+15
2017-02-10bridge: mcast: Merge the mc router ports deletions to one functionNogah Frankel1-15/+9
2017-02-10switchdev: bridge: Offload multicast disabledNogah Frankel1-0/+16
2017-02-08bridge: vlan tunnel id info range fill size calc cleanupsRoopa Prabhu1-18/+16
2017-02-07bridge: avoid unnecessary read of jiffiesstephen hemminger2-4/+8
2017-02-07bridge: remove unnecessary check for vtbegin in br_fill_vlan_tinfo_rangeRoopa Prabhu1-1/+1
2017-02-07bridge: tunnel: fix attribute checks in br_parse_vlan_tunnel_infoNikolay Aleksandrov1-4/+4
2017-02-07net: bridge: remove redundant check to see if err is setColin Ian King1-3/+0
2017-02-06bridge: fdb: write to used and updated at most once per jiffyNikolay Aleksandrov2-2/+4
2017-02-06bridge: move write-heavy fdb members in their own cache lineNikolay Aleksandrov1-4/+6
2017-02-06bridge: move to workqueue gcNikolay Aleksandrov10-23/+29
2017-02-06bridge: modify bridge and port to have often accessed fields in one cache lineNikolay Aleksandrov1-23/+20
2017-02-06net: remove ndo_neigh_{construct, destroy} from stacked devicesIdo Schimmel1-2/+0
2017-02-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-nextDavid S. Miller3-32/+49
2017-02-03bridge: vlan dst_metadata hooks in ingress and egress pathsRoopa Prabhu6-2/+82
2017-02-03bridge: per vlan dst_metadata netlink supportRoopa Prabhu7-48/+641
2017-02-02netfilter: allow logging from non-init namespacesMichal Kubeček1-1/+1