Skip to content

Commit 2f30b36

Browse files
willdeaconIngo Molnar
authored andcommitted
locking/refcount: Remove unused 'refcount_error_report()' function
'refcount_error_report()' has no callers. Remove it. Signed-off-by: Will Deacon <[email protected]> Reviewed-by: Ard Biesheuvel <[email protected]> Acked-by: Kees Cook <[email protected]> Tested-by: Hanjun Guo <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Elena Reshetova <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent fb041bb commit 2f30b36

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

include/linux/kernel.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,6 @@ extern int oops_may_print(void);
328328
void do_exit(long error_code) __noreturn;
329329
void complete_and_exit(struct completion *, long) __noreturn;
330330

331-
#ifdef CONFIG_ARCH_HAS_REFCOUNT
332-
void refcount_error_report(struct pt_regs *regs, const char *err);
333-
#else
334-
static inline void refcount_error_report(struct pt_regs *regs, const char *err)
335-
{ }
336-
#endif
337-
338331
/* Internal, do not use. */
339332
int __must_check _kstrtoul(const char *s, unsigned int base, unsigned long *res);
340333
int __must_check _kstrtol(const char *s, unsigned int base, long *res);

kernel/panic.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -671,17 +671,6 @@ EXPORT_SYMBOL(__stack_chk_fail);
671671

672672
#endif
673673

674-
#ifdef CONFIG_ARCH_HAS_REFCOUNT
675-
void refcount_error_report(struct pt_regs *regs, const char *err)
676-
{
677-
WARN_RATELIMIT(1, "refcount_t %s at %pB in %s[%d], uid/euid: %u/%u\n",
678-
err, (void *)instruction_pointer(regs),
679-
current->comm, task_pid_nr(current),
680-
from_kuid_munged(&init_user_ns, current_uid()),
681-
from_kuid_munged(&init_user_ns, current_euid()));
682-
}
683-
#endif
684-
685674
core_param(panic, panic_timeout, int, 0644);
686675
core_param(panic_print, panic_print, ulong, 0644);
687676
core_param(pause_on_oops, pause_on_oops, int, 0644);

0 commit comments

Comments
 (0)