Unverified Commit ecd01009 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15692 tty: fix deadlock caused by calling printk() under tty_port->lock

parents 4f559371 006b1eb6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -168,7 +168,8 @@ static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
	if (atomic_read(&port->buf.mem_used) > port->buf.mem_limit)
		return NULL;
	printk_safe_enter();
	p = kmalloc(sizeof(struct tty_buffer) + 2 * size, GFP_ATOMIC);
	p = kmalloc(sizeof(struct tty_buffer) + 2 * size,
		    GFP_ATOMIC | __GFP_NOWARN);
	printk_safe_exit();
	if (p == NULL)
		return NULL;