Message ID | 20200422095030.658085703@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=aqQR=6G=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DF75C5518C for <stable@archiver.kernel.org>; Wed, 22 Apr 2020 10:00:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D49720735 for <stable@archiver.kernel.org>; Wed, 22 Apr 2020 10:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587549653; bh=4Yfw7zDvXO8ES44N9Te9KXxXB+R1yHGUNOhl8YlHk/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cLluPyku9iQnio9TSXfg7mi7KwhA1wq0cUAcwIb84QJfbpTj6sVxRCVQ9x2ytCCBH sVFymfcfjQzmmkLhunvWIRiemYFiGICvzEHYUSpWEPuf8WfwQ1yboY9Xk4Syqhisxu x9aAcdv+0cTW3+E3uZoyTazLma4U6i154UzOVzNw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726669AbgDVKAv (ORCPT <rfc822;stable@archiver.kernel.org>); Wed, 22 Apr 2020 06:00:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:48280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726662AbgDVKAo (ORCPT <rfc822;stable@vger.kernel.org>); Wed, 22 Apr 2020 06:00:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C8C9420776; Wed, 22 Apr 2020 10:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587549643; bh=4Yfw7zDvXO8ES44N9Te9KXxXB+R1yHGUNOhl8YlHk/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C+sY7rUpOQ+Sj1AaxHr24y/pi08br3lzL32pVLb25cGPlGwRjZPUdhFEtHnHJYlvW eqb+E50k+R4R13q67IGoTpI06h13R0YegcF7RasPVjhBPvdGb91bna2J06PeGz+fj1 NBm9RSf6kw4SXIHH0mK3BL8bn7sTeyAkg95HGYVs= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Eric Biggers <ebiggers@google.com>, Andrew Morton <akpm@linux-foundation.org>, Kees Cook <keescook@chromium.org>, Jessica Yu <jeyu@kernel.org>, Luis Chamberlain <mcgrof@kernel.org>, Alexei Starovoitov <ast@kernel.org>, Jeff Vander Stoep <jeffv@google.com>, Ben Hutchings <benh@debian.org>, Josh Triplett <josh@joshtriplett.org>, Linus Torvalds <torvalds@linux-foundation.org> Subject: [PATCH 4.4 046/100] kmod: make request_module() return an error when autoloading is disabled Date: Wed, 22 Apr 2020 11:56:16 +0200 Message-Id: <20200422095030.658085703@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200422095022.476101261@linuxfoundation.org> References: <20200422095022.476101261@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -119,7 +119,7 @@ out: * invoke it. * * If module auto-loading support is disabled then this function - * becomes a no-operation. + * simply returns -ENOENT. */ int __request_module(bool wait, const char *fmt, ...) { @@ -140,7 +140,7 @@ int __request_module(bool wait, const ch WARN_ON_ONCE(wait && current_is_async()); if (!modprobe_path[0]) - return 0; + return -ENOENT; va_start(args, fmt); ret = vsnprintf(module_name, MODULE_NAME_LEN, fmt, args);