Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751497AbdGYI2V (ORCPT ); Tue, 25 Jul 2017 04:28:21 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:38761 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751465AbdGYI2T (ORCPT ); Tue, 25 Jul 2017 04:28:19 -0400 To: gregkh@linuxfoundation.org Cc: "linux-kernel@vger.kernel.org" From: Michael Wang Subject: [ Linux 4.4 stable ] missing 'printk: set may_schedule for some of console_trylock() callers' Message-ID: <8cfee169-00eb-4b08-3440-ccf654a056aa@profitbricks.com> Date: Tue, 25 Jul 2017 10:28:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1137 Lines: 30 Hi, greg k-h During our testing with 4.4.73 we got soft lockup like: NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [systemd-udevd:856] ... Call Trace: [] vprintk_emit+0x319/0x4a0 [] printk_emit+0x33/0x3b [] ? simple_strtoull+0x2c/0x50 [] devkmsg_write+0xaa/0x100 [] ? vprintk+0x30/0x30 [] do_readv_writev+0x1c2/0x270 [] ? kmem_cache_free+0x7d/0x1a0 [] vfs_writev+0x39/0x50 [] SyS_writev+0x4a/0xd0 [] entry_SYSCALL_64_fastpath+0x12/0x6a Currently in 4.4 the console_unlock() called by vprintk_emit() is with preemption disabled, so the cond_resched is not working, and soft lockup appear if it take too much time on writing data into every console. We found the upstream patch: commit 6b97a20d3a79 printk: set may_schedule for some of console_trylock() callers which should have addressed this issue, but not included in the latest 4.4.78 stable yet, is there any plan on backport it in future? Regards, Michael Wang