From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-db5eur01on0090.outbound.protection.outlook.com ([104.47.2.90]:61633 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751426AbeCNTRS (ORCPT ); Wed, 14 Mar 2018 15:17:18 -0400 Subject: [PATCH net-next 0/2] Introduce rtnl_lock_killable() From: Kirill Tkhai To: davem@davemloft.net, ktkhai@virtuozzo.com, vyasevic@redhat.com, edumazet@google.com, nicolas.dichtel@6wind.com, netdev@vger.kernel.org Date: Wed, 14 Mar 2018 22:17:11 +0300 Message-ID: <152105492788.24797.10467675660981296096.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: rtnl_lock() is widely used mutex in kernel. Some of kernel code does memory allocations under it. In case of memory deficit this may invoke OOM killer, but the problem is a killed task can't exit if it's waiting for the mutex. This may be a reason of deadlock and panic. This patchset adds a new primitive, which responds on SIGKILL, and it allows to use it in the places, where we don't want to sleep forever. Also, the first place is made to use it. --- Kirill Tkhai (2): net: Add rtnl_lock_killable() net: Use rtnl_lock_killable() in register_netdev() include/linux/rtnetlink.h | 1 + net/core/dev.c | 3 ++- net/core/rtnetlink.c | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) -- Signed-off-by: Kirill Tkhai