Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932657AbcLHTso (ORCPT ); Thu, 8 Dec 2016 14:48:44 -0500 Received: from mail.kernel.org ([198.145.29.136]:45632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932478AbcLHTsm (ORCPT ); Thu, 8 Dec 2016 14:48:42 -0500 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, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Luis R. Rodriguez" Subject: [RFC 05/10] kmod: return -EBUSY if modprobe limit is reached Date: Thu, 8 Dec 2016 11:48:36 -0800 Message-Id: <20161208194836.2582-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161208184801.1689-1-mcgrof@kernel.org> References: <20161208184801.1689-1-mcgrof@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 774 Lines: 26 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 049d7eabda38..ab38539f7e91 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.10.1