Re: [PATCH 01/50] kallsyms/printk: Add loglvl to print_ip_sym()

From: Sergey Senozhatsky
Date: Tue Nov 05 2019 - 23:38:57 EST


On (19/11/06 03:04), Dmitry Safonov wrote:
[..]
> #endif /*_LINUX_KALLSYMS_H*/
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 233459c03b5a..914ff610b880 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -3999,7 +3999,7 @@ static void print_unlock_imbalance_bug(struct task_struct *curr,
> curr->comm, task_pid_nr(curr));
> print_lockdep_cache(lock);
> pr_cont(") at:\n");
> - print_ip_sym(ip);
> + print_ip_sym(KERN_WARNING, ip);
> pr_warn("but there are no more locks to release!\n");
> pr_warn("\nother info that might help us debug this:\n");
> lockdep_print_held_locks(curr);
> @@ -4604,7 +4604,7 @@ static void print_lock_contention_bug(struct task_struct *curr,
> curr->comm, task_pid_nr(curr));
> print_lockdep_cache(lock);
> pr_cont(") at:\n");
> - print_ip_sym(ip);
> + print_ip_sym(KERN_WARNING, ip);
> pr_warn("but there are no locks held!\n");
> pr_warn("\nother info that might help us debug this:\n");
> lockdep_print_held_locks(curr);
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index dd05a378631a..774ff0d8dfe9 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -3858,7 +3858,7 @@ static noinline void __schedule_bug(struct task_struct *prev)
> if (IS_ENABLED(CONFIG_DEBUG_PREEMPT)
> && in_atomic_preempt_off()) {
> pr_err("Preemption disabled at:");
> - print_ip_sym(preempt_disable_ip);
> + print_ip_sym(KERN_ERR, preempt_disable_ip);
> pr_cont("\n");

Is this working with pr_cont()?

-ss