Hi Hongbo,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 412556141b3c12f2f160acc3a09a40c937837ee3 commit: 923efc4dc37c1a7cc91f0dd5dbdc87e0943ad1ae [2208/30000] tty: fix possible deadlock in console_unlock config: x86_64-buildonly-randconfig-001-20241027 (https://download.01.org/0day-ci/archive/20241027/202410271126.TEOt1E2D-lkp@i...) compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271126.TEOt1E2D-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202410271126.TEOt1E2D-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/tty/tty_buffer.c:175:2: error: implicit declaration of function 'printk_safe_enter' [-Werror,-Wimplicit-function-declaration] 175 | printk_safe_enter(); | ^ drivers/tty/tty_buffer.c:175:2: note: did you mean 'printk_nmi_enter'? include/linux/printk.h:158:20: note: 'printk_nmi_enter' declared here 158 | static inline void printk_nmi_enter(void) { } | ^
drivers/tty/tty_buffer.c:177:2: error: implicit declaration of function 'printk_safe_exit' [-Werror,-Wimplicit-function-declaration]
177 | printk_safe_exit(); | ^ 2 errors generated.
vim +/printk_safe_exit +177 drivers/tty/tty_buffer.c
142 143 /** 144 * tty_buffer_alloc - allocate a tty buffer 145 * @port: tty port 146 * @size: desired size (characters) 147 * 148 * Allocate a new tty buffer to hold the desired number of characters. 149 * We round our buffers off in 256 character chunks to get better 150 * allocation behaviour. 151 * Return NULL if out of memory or the allocation would exceed the 152 * per device queue 153 */ 154 155 static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size) 156 { 157 struct llist_node *free; 158 struct tty_buffer *p; 159 160 /* Round the buffer size out */ 161 size = __ALIGN_MASK(size, TTYB_ALIGN_MASK); 162 163 if (size <= MIN_TTYB_SIZE) { 164 free = llist_del_first(&port->buf.free); 165 if (free) { 166 p = llist_entry(free, struct tty_buffer, free); 167 goto found; 168 } 169 } 170 171 /* Should possibly check if this fails for the largest buffer we 172 have queued and recycle that ? */ 173 if (atomic_read(&port->buf.mem_used) > port->buf.mem_limit) 174 return NULL;
175 printk_safe_enter();
176 p = kmalloc(sizeof(struct tty_buffer) + 2 * size, GFP_ATOMIC);
177 printk_safe_exit();
178 if (p == NULL) 179 return NULL; 180 181 found: 182 tty_buffer_reset(p, size); 183 atomic_add(size, &port->buf.mem_used); 184 return p; 185 } 186