path: root/kernel/notifier.c
AgeCommit message (Collapse)AuthorLines
2015-09-01Merge branch 'x86-asm-for-linus' of ↵Linus Torvalds-0/+2
git:// Pull x86 asm changes from Ingo Molnar: "The biggest changes in this cycle were: - Revamp, simplify (and in some cases fix) Time Stamp Counter (TSC) primitives. (Andy Lutomirski) - Add new, comprehensible entry and exit handlers written in C. (Andy Lutomirski) - vm86 mode cleanups and fixes. (Brian Gerst) - 32-bit compat code cleanups. (Brian Gerst) The amount of simplification in low level assembly code is already palpable: arch/x86/entry/entry_32.S | 130 +---- arch/x86/entry/entry_64.S | 197 ++----- but more simplifications are planned. There's also the usual laudry mix of low level changes - see the changelog for details" * 'x86-asm-for-linus' of git:// (83 commits) x86/asm: Drop repeated macro of X86_EFLAGS_AC definition x86/asm/msr: Make wrmsrl() a function x86/asm/delay: Introduce an MWAITX-based delay with a configurable timer x86/asm: Add MONITORX/MWAITX instruction support x86/traps: Weaken context tracking entry assertions x86/asm/tsc: Add rdtscll() merge helper selftests/x86: Add syscall_nt selftest selftests/x86: Disable sigreturn_64 x86/vdso: Emit a GNU hash x86/entry: Remove do_notify_resume(), syscall_trace_leave(), and their TIF masks x86/entry/32: Migrate to C exit path x86/entry/32: Remove 32-bit syscall audit optimizations x86/vm86: Rename vm86->v86flags and v86mask x86/vm86: Rename vm86->vm86_info to user_vm86 x86/vm86: Clean up vm86.h includes x86/vm86: Move the vm86 IRQ definitions to vm86.h x86/vm86: Use the normal pt_regs area for vm86 x86/vm86: Eliminate 'struct kernel_vm86_struct' x86/vm86: Move fields from 'struct kernel_vm86_struct' to 'struct vm86' x86/vm86: Move vm86 fields out of 'thread_struct' ...
2015-07-07notifiers, RCU: Assert that RCU is watching in notify_die()Andy Lutomirski-0/+2
Low-level arch entries often call notify_die(), and it's easy for arch code to fail to exit an RCU quiescent state first. Assert that we're not quiescent in notify_die(). Signed-off-by: Andy Lutomirski <> Cc: Andy Lutomirski <> Cc: Borislav Petkov <> Cc: Brian Gerst <> Cc: Denys Vlasenko <> Cc: Denys Vlasenko <> Cc: Frederic Weisbecker <> Cc: H. Peter Anvin <> Cc: Paul E. McKenney <> Cc: Kees Cook <> Cc: Linus Torvalds <> Cc: Oleg Nesterov <> Cc: Peter Zijlstra <> Cc: Rik van Riel <> Cc: Thomas Gleixner <> Cc: Link: Signed-off-by: Ingo Molnar <>
2015-01-06rcu: Make SRCU optional by using CONFIG_SRCUPranith Kumar-0/+3
SRCU is not necessary to be compiled by default in all cases. For tinification efforts not compiling SRCU unless necessary is desirable. The current patch tries to make compiling SRCU optional by introducing a new Kconfig option CONFIG_SRCU which is selected when any of the components making use of SRCU are selected. If we do not select CONFIG_SRCU, srcu.o will not be compiled at all. text data bss dec hex filename 2007 0 0 2007 7d7 kernel/rcu/srcu.o Size of arch/powerpc/boot/zImage changes from text data bss dec hex filename 831552 64180 23944 919676 e087c arch/powerpc/boot/zImage : before 829504 64180 23952 917636 e0084 arch/powerpc/boot/zImage : after so the savings are about ~2000 bytes. Signed-off-by: Pranith Kumar <> CC: Paul E. McKenney <> CC: Josh Triplett <> CC: Lai Jiangshan <> Signed-off-by: Paul E. McKenney <> [ paulmck: resolve conflict due to removal of arch/ia64/kvm/Kconfig. ]
2014-04-24kprobes, notifier: Use NOKPROBE_SYMBOL macro in notifierMasami Hiramatsu-9/+13
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in notifier. Signed-off-by: Masami Hiramatsu <> Reviewed-by: Steven Rostedt <> Reviewed-by: Josh Triplett <> Cc: Paul E. McKenney <> Link: Signed-off-by: Ingo Molnar <>
2014-02-26notifier: Substitute rcu_access_pointer() for rcu_dereference_raw()Paul E. McKenney-1/+1
(Trivial patch.) If the code is looking at the RCU-protected pointer itself, but not dereferencing it, the rcu_dereference() functions can be downgraded to rcu_access_pointer(). This commit makes this downgrade in __blocking_notifier_call_chain() which simply compares the RCU-protected pointer against NULL with no dereferencing. Signed-off-by: Paul E. McKenney <> Cc: Andrew Morton <> Cc: Linus Torvalds <> Reviewed-by: Josh Triplett <>
2011-10-31kernel: Map most files to use export.h instead of module.hPaul Gortmaker-1/+1
The changed files were only including linux/module.h for the EXPORT_SYMBOL infrastructure, and nothing else. Revector them onto the isolated export header for faster compile times. Nothing to see here but a whole lot of instances of: -#include <linux/module.h> +#include <linux/export.h> This commit is only changing the kernel dir; next targets will probably be mm, fs, the arch dirs, etc. Signed-off-by: Paul Gortmaker <>
2011-07-25notifiers: sys: move reboot notifiers into reboot.hAmerigo Wang-31/+0
It is not necessary to share the same notifier.h. This patch already moves register_reboot_notifier() and unregister_reboot_notifier() from kernel/notifier.c to kernel/sys.c. [ make allyesconfig succeed on ppc64] Signed-off-by: WANG Cong <> Cc: David Miller <> Cc: "Rafael J. Wysocki" <> Cc: Greg KH <> Signed-off-by: WANG Cong <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2010-02-25sched: Use lockdep-based checking on rcu_dereference()Paul E. McKenney-3/+3
Update the rcu_dereference() usages to take advantage of the new lockdep-based checking. Signed-off-by: Paul E. McKenney <> Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: LKML-Reference: <> [ -v2: fix allmodconfig missing symbol export build failure on x86 ] Signed-off-by: Ingo Molnar <>
2009-08-30kprobes: Fix to add __kprobes to notify_dieMasami Hiramatsu-1/+1
Add __kprobes to notify_die() because do_int3() calls notify_die() instead of atomic_notify_call_chain() which is already marked as __kprobes. Signed-off-by: Masami Hiramatsu <> Acked-by: Ananth N Mavinakayanahalli <> Cc: Ingo Molnar <> LKML-Reference: <20090827172318.8246.53702.stgit@localhost.localdomain> Signed-off-by: Frederic Weisbecker <>
2008-11-24Merge branches 'core/debug', 'core/futexes', 'core/locking', 'core/rcu', ↵Ingo Molnar-0/+8
'core/signal', 'core/urgent' and 'core/xen' into core/core
2008-10-14ftrace: ignore functions that cannot be kprobe-edIngo Molnar-1/+1
kprobes already has an extensive list of annotations for functions that should not be instrumented. Add notrace annotations to these functions as well. This is particularly useful for functions called by the NMI path. Signed-off-by: Ingo Molnar <>
2008-09-10debug: add notifier chain debugging, v2Arjan van de Ven-9/+1
- unbreak ia64 (and powerpc) where function pointers dont point at code but at data (reported by Tony Luck) [ various cleanups ] Signed-off-by: Arjan van de Ven <> Signed-off-by: Ingo Molnar <>
2008-09-10debug: add notifier chain debuggingArjan van de Ven-0/+16
during some development we suspected a case where we left something in a notifier chain that was from a module that was unloaded already... and that sort of thing is rather hard to track down. This patch adds a very simple sanity check (which isn't all that expensive) to make sure the notifier we're about to call is actually from either the kernel itself of from a still-loaded module, avoiding a hard-to-chase-down crash. Signed-off-by: Arjan van de Ven <> Signed-off-by: Ingo Molnar <>
2008-04-29ipc: re-enable msgmni automatic recomputing msgmni if set to negativeNadia Derbey-0/+38
The enhancement as asked for by Yasunori: if msgmni is set to a negative value, register it back into the ipcns notifier chain. A new interface has been added to the notification mechanism: notifier_chain_cond_register() registers a notifier block only if not already registered. With that new interface we avoid taking care of the states changes in procfs. Signed-off-by: Nadia Derbey <> Cc: Yasunori Goto <> Cc: Matt Helsley <> Cc: Mingming Cao <> Cc: Pierre Peiffer <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2008-02-06kernel/notifier.c should #include <linux/reboot.h>Adrian Bunk-0/+1
Every file should include the headers containing the prototypes for its global functions (in this case {,un}register_reboot_notifier()). Signed-off-by: Adrian Bunk <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2007-10-19Add kernel/notifier.cAlexey Dobriyan-0/+539
There is separate notifier header, but no separate notifier .c file. Extract notifier code out of kernel/sys.c which will remain for misc syscalls I hope. Merge kernel/die_notifier.c into kernel/notifier.c. [ coding-style fixes] Signed-off-by: Alexey Dobriyan <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>