diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 90930b28d2ca..7e0927bad713 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -137,14 +137,15 @@ static int __kprobes notifier_call_chain(struct notifier_block **nl, | |||
137 | unsigned long val, void *v) | 137 | unsigned long val, void *v) |
138 | { | 138 | { |
139 | int ret = NOTIFY_DONE; | 139 | int ret = NOTIFY_DONE; |
140 | struct notifier_block *nb; | 140 | struct notifier_block *nb, *next_nb; |
141 | 141 | ||
142 | nb = rcu_dereference(*nl); | 142 | nb = rcu_dereference(*nl); |
143 | while (nb) { | 143 | while (nb) { |
144 | next_nb = rcu_dereference(nb->next); | ||
144 | ret = nb->notifier_call(nb, val, v); | 145 | ret = nb->notifier_call(nb, val, v); |
145 | if ((ret & NOTIFY_STOP_MASK) == NOTIFY_STOP_MASK) | 146 | if ((ret & NOTIFY_STOP_MASK) == NOTIFY_STOP_MASK) |
146 | break; | 147 | break; |
147 | nb = rcu_dereference(nb->next); | 148 | nb = next_nb; |
148 | } | 149 | } |
149 | return ret; | 150 | return ret; |
150 | } | 151 | } |