Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp571044ybi; Wed, 19 Jun 2019 04:25:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAxDT4ncLKyGKVBAFS2LmEJQrFvBReHIszKBEJ4U7w+/D3vCLha9dQiP0m+Vq+I1J/2aHX X-Received: by 2002:a17:902:e211:: with SMTP id ce17mr37220678plb.193.1560943514215; Wed, 19 Jun 2019 04:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560943514; cv=none; d=google.com; s=arc-20160816; b=JVAFUAztAmqc/bkQ3VAUiXyPThIrPk9vpfHDYFODZlz2CHrbjwOoScbEsO4ud9/4PW GKasdV+p7LnOn6fSKuC8cDCSpT1Ai1F7JJw/7DORBwrDYHjKq9xUf09U2JZkjz3mA8VS Zj5QV/ziMhdOqxdZHsNMSxeb9O7VLcAPJJs+BlhNquLVgZutWTWY6GECQwWsw3YKAqYW UC1KCiGBccG7LfB32iFSADkTwR+3AZ2xD6Bwy/Bas7okpC/ShyMA09nqU4rmd+uiF0un j2osz1HG1A7qeN8R6KqOufST2b/8HNgolx+MhED0m6LEaKgnMfgnEmxZiwkuc+83QM+d /bdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fylzs5dNL3OKhlXewZ+EVbIKCGZknynksWeV2gQQNEw=; b=ChfdiKuzU9cgln49/9PHp7Yg3yTGGma/04ipM9ZyfyRSJcyjAIqpEaFmiyRwNsD1zw X1lUxSakZXRxwwZZCsISc/Tw3fQAK6AVuqfChwLV/l2HqQBXNcwWsqah0UVUtMteVSJt khox/v222u+XKsQt5AKdidY82Rzx9Imh3JCNdWIN6hkjO/ZoLq1OPgPojS2f8B+Q2vOw g2FkM/xtIP50yfaYOaF6FDCgkbL/U7HlRYV0XzT0LU00b0LtDRp6hr2JVvBK6oBkLFDP u21ZBJlgD8WyCXDz5CDLHerheD/6dTZuVR9aEH8tUSKMlfNgIJoR9g10xYVLtBK84H9/ I29Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YbrRCa3V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si2891158pgk.413.2019.06.19.04.24.58; Wed, 19 Jun 2019 04:25:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YbrRCa3V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731632AbfFSLYW (ORCPT + 99 others); Wed, 19 Jun 2019 07:24:22 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50094 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726826AbfFSLYW (ORCPT ); Wed, 19 Jun 2019 07:24:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=fylzs5dNL3OKhlXewZ+EVbIKCGZknynksWeV2gQQNEw=; b=YbrRCa3VRK84HVN1OFgwF9tvG 9aA97HcCpZyg5YKT+awTQmX9xBgsGDXsg4w+fKGw873K6vLAYNC7RdeEQbOd3uFTEv8zaBWsWnnBx qZQUaycpSuLqmqSdoDFUmzB3avWgv/MYya7W9M6QrLSrxdosGNVVAJSVCPnXMQKOzZK9c72NUtERw o+LGzJBXdXaF9vkl4PU6ZQ2+/HKezwQG4VqSsFH1iadXeRuCzE3xwsFROIiB848TwzNTOTVvLnq5m qhSJMlHZTReIPoQMSjCC3Qjk67Y4Cvn21hldwCFydFaHtbreBv/A1JwkY4cak+DtnnUy8Kv8+1Lx6 c81zZIJWg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hdYgx-00060Q-P3; Wed, 19 Jun 2019 11:23:51 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 202D8201F98FC; Wed, 19 Jun 2019 13:23:50 +0200 (CEST) Date: Wed, 19 Jun 2019 13:23:50 +0200 From: Peter Zijlstra To: Miroslav Benes Cc: Jessica Yu , linux-kernel@vger.kernel.org, jpoimboe@redhat.com, jikos@kernel.org, pmladek@suse.com, rostedt@goodmis.org, ast@kernel.org, daniel@iogearbox.net Subject: Re: [RFC][PATCH] module: Propagate MODULE_STATE_COMING notifier errors Message-ID: <20190619112350.GN3419@hirez.programming.kicks-ass.net> References: <20190617090335.GX3436@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 19, 2019 at 01:12:12PM +0200, Miroslav Benes wrote: > > @@ -3780,7 +3781,7 @@ static int load_module(struct load_info *info, const char __user *uargs, > > > > err = prepare_coming_module(mod); > > if (err) > > - goto bug_cleanup; > > + goto coming_cleanup; > > Not good. klp_module_going() is not prepared to be called without > klp_module_coming() succeeding. "Funny" things might happen. Bah, I did look at that but failed to spot it :/ > So it calls for more fine-grained error handling. Another approach that I considered was trying to re-iterate the notifier list up until the point we got, but that was fairly non-trivial and needed changes to the notifier crud itself. I'll try again.