diff options
Diffstat (limited to 'net/core/utils.c')
-rw-r--r-- | net/core/utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/utils.c b/net/core/utils.c index 2f737bf90b3f..eed34338736c 100644 --- a/net/core/utils.c +++ b/net/core/utils.c | |||
@@ -348,8 +348,8 @@ static void __net_random_once_deferred(struct work_struct *w) | |||
348 | { | 348 | { |
349 | struct __net_random_once_work *work = | 349 | struct __net_random_once_work *work = |
350 | container_of(w, struct __net_random_once_work, work); | 350 | container_of(w, struct __net_random_once_work, work); |
351 | if (!static_key_enabled(work->key)) | 351 | BUG_ON(!static_key_enabled(work->key)); |
352 | static_key_slow_inc(work->key); | 352 | static_key_slow_dec(work->key); |
353 | kfree(work); | 353 | kfree(work); |
354 | } | 354 | } |
355 | 355 | ||
@@ -367,7 +367,7 @@ static void __net_random_once_disable_jump(struct static_key *key) | |||
367 | } | 367 | } |
368 | 368 | ||
369 | bool __net_get_random_once(void *buf, int nbytes, bool *done, | 369 | bool __net_get_random_once(void *buf, int nbytes, bool *done, |
370 | struct static_key *done_key) | 370 | struct static_key *once_key) |
371 | { | 371 | { |
372 | static DEFINE_SPINLOCK(lock); | 372 | static DEFINE_SPINLOCK(lock); |
373 | unsigned long flags; | 373 | unsigned long flags; |
@@ -382,7 +382,7 @@ bool __net_get_random_once(void *buf, int nbytes, bool *done, | |||
382 | *done = true; | 382 | *done = true; |
383 | spin_unlock_irqrestore(&lock, flags); | 383 | spin_unlock_irqrestore(&lock, flags); |
384 | 384 | ||
385 | __net_random_once_disable_jump(done_key); | 385 | __net_random_once_disable_jump(once_key); |
386 | 386 | ||
387 | return true; | 387 | return true; |
388 | } | 388 | } |