Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'rework/threaded-printk' into for-linus

+7 -10
+7 -10
kernel/printk/printk.c
··· 3023 3023 } 3024 3024 3025 3025 /* 3026 - * Legacy console printing from printk() caller context does not respect 3027 - * raw_spinlock/spinlock nesting. For !PREEMPT_RT the lockdep warning is a 3028 - * false positive. For PREEMPT_RT the false positive condition does not 3029 - * occur. 3030 - * 3031 - * This map is used to temporarily establish LD_WAIT_SLEEP context for the 3032 - * console write() callback when legacy printing to avoid false positive 3033 - * lockdep complaints, thus allowing lockdep to continue to function for 3034 - * real issues. 3026 + * The legacy console always acquires a spinlock_t from its printing 3027 + * callback. This violates lock nesting if the caller acquired an always 3028 + * spinning lock (raw_spinlock_t) while invoking printk(). This is not a 3029 + * problem on PREEMPT_RT because legacy consoles print always from a 3030 + * dedicated thread and never from within printk(). Therefore we tell 3031 + * lockdep that a sleeping spin lock (spinlock_t) is valid here. 3035 3032 */ 3036 3033 #ifdef CONFIG_PREEMPT_RT 3037 3034 static inline void printk_legacy_allow_spinlock_enter(void) { } 3038 3035 static inline void printk_legacy_allow_spinlock_exit(void) { } 3039 3036 #else 3040 - static DEFINE_WAIT_OVERRIDE_MAP(printk_legacy_map, LD_WAIT_SLEEP); 3037 + static DEFINE_WAIT_OVERRIDE_MAP(printk_legacy_map, LD_WAIT_CONFIG); 3041 3038 3042 3039 static inline void printk_legacy_allow_spinlock_enter(void) 3043 3040 {