From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756444AbdESDZU (ORCPT ); Thu, 18 May 2017 23:25:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:47652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756243AbdESDYx (ORCPT ); Thu, 18 May 2017 23:24:53 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A231C239E8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mcgrof@kernel.org From: "Luis R. Rodriguez" To: shuah@kernel.org, jeyu@redhat.com, rusty@rustcorp.com.au, ebiederm@xmission.com, dmitry.torokhov@gmail.com, acme@redhat.com, corbet@lwn.net Cc: martin.wilck@suse.com, mmarek@suse.com, pmladek@suse.com, hare@suse.com, rwright@hpe.com, jeffm@suse.com, DSterba@suse.com, fdmanana@suse.com, neilb@suse.com, linux@roeck-us.net, rgoldwyn@suse.com, subashab@codeaurora.org, xypron.glpk@gmx.de, keescook@chromium.org, atomlin@redhat.com, mbenes@suse.cz, paulmck@linux.vnet.ibm.com, dan.j.williams@intel.com, jpoimboe@redhat.com, davem@davemloft.net, mingo@redhat.com, akpm@linux-foundation.org, torvalds@linux-foundation.org, gregkh@linuxfoundation.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Luis R. Rodriguez" Subject: [PATCH 4/6] kmod: return -EBUSY if modprobe limit is reached Date: Thu, 18 May 2017 20:24:42 -0700 Message-Id: <20170519032444.18416-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170519032444.18416-1-mcgrof@kernel.org> References: <20170519032444.18416-1-mcgrof@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Running out of our modprobe limit is not a memory limit but a system specific established limitation set to avoid a possible recursive issue with modprobe. This gives userspace a better idea of what happened if we can't load a module, it could use this to wait and try again. Signed-off-by: Luis R. Rodriguez --- kernel/kmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kmod.c b/kernel/kmod.c index 7635915dc91c..563600fc9bb1 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -117,7 +117,7 @@ static int kmod_umh_threads_get(void) if (atomic_read(&kmod_concurrent) <= max_modprobes) return 0; atomic_dec(&kmod_concurrent); - return -ENOMEM; + return -EBUSY; } static void kmod_umh_threads_put(void) -- 2.11.0