Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2124930iof; Tue, 7 Jun 2022 20:33:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySoLG4RrLy7cCUxwd8dufMxeKRiMS/oFp5xoMLCftfVkWMD++VQTkl58+MIIzyWq1oErry X-Received: by 2002:a17:90b:4b8d:b0:1e3:5147:6e63 with SMTP id lr13-20020a17090b4b8d00b001e351476e63mr35788807pjb.162.1654659221867; Tue, 07 Jun 2022 20:33:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654659221; cv=none; d=google.com; s=arc-20160816; b=xvSv0aOM5yk0ILKRjPCIC1oJeMC0nSdnPVQxZLoI2ogCQIrxpt+2Dj3RfFe4hZhH73 dw+MTkspAEAq/4voGeF0ugj9YyZjlU+8CmO6ElneA0ycvvcS6uoEI90M1UHNpAWRhy4n rLJMjpJyvJfQC7SrnkbmEC2qoc+qeokm0ocjseXLXkUUbgd8T7hjYmOLEoy8Qu2VEgD2 eevCTkhaWTFpZSiaheyerM3m7knzScjHcHRzJNmxJFKg5SXnoLN1qWFsgQuWGXpOLtnm cIMuF2VyPooQzp30bFEvUGbqfdeRv76a+5XzpJaL+E8t7m0Z7+zCldOuohtLDaDkKbpk IzNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=er4gKmINh/s+YKE38xTekZON0h3qAWFbXRnGKtpsSBE=; b=hwVmhdiPa8KOSUdRpeTjqDoncaLRsgHrrVvHRDUqqlPPwOTgyj1taZr87GuBk4eubZ LAfUK/qG2ZcaVN6RLJd3mgUkTmDGpXK6aZUi5t6SKIKjDPC5aqGENJpkp9+4gaI4wjPf l0215/dg6oy/ODTOf5YGsJLw5JqP7yP4iJs7WdL96T173z/G0zMr3g9Vvb/yODg5ys3S eyhDL1b5oqGrS46BoLzd3irT6ONIYXRwWSGQ6m6EYsVDTnBhmWmw2/rOjFDc1Ic048GR NvRinOZ514BB7fOy0I7Cp0ooc8oZ6+EUSJK8NnAdpEmJ6MPQIuRNzsvx+lGdtDFQ2ZH+ 5xKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dQzKWwyF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l70-20020a638849000000b003fd1dbb91c1si19252702pgd.727.2022.06.07.20.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:33:41 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dQzKWwyF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ED4ED16A51A; Tue, 7 Jun 2022 19:42:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378460AbiFGWjE (ORCPT + 99 others); Tue, 7 Jun 2022 18:39:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379130AbiFGVZO (ORCPT ); Tue, 7 Jun 2022 17:25:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2899A150B6F; Tue, 7 Jun 2022 12:01:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C070AB82391; Tue, 7 Jun 2022 19:01:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BEA2C385A2; Tue, 7 Jun 2022 19:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628498; bh=mDFz1Qi4GnqNJH6WQQ+Dvts8B4pXR9evP9/but+/NqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dQzKWwyFAPL/brqkNRqA5N5RV5AGJW/NQ5bi5NyJ5HA9dYwNEyfufTl1q/o7dGZux mBZb7fqfInuqHPZYQgMHpf5caHfSjadfp956G1D5Rkv+QASQ7TZmAduYr2TyBmWp1a p285EU09exYKjLl6hvlMKcS6PVb4L2X1xj/PG95g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Nuno=20S=C3=A1?= , Rob Herring , Sasha Levin Subject: [PATCH 5.18 351/879] of: overlay: do not break notify on NOTIFY_{OK|STOP} Date: Tue, 7 Jun 2022 18:57:49 +0200 Message-Id: <20220607165013.049725782@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nuno Sá [ Upstream commit 5f756a2eaa4436d7d3dc1e040147f5e992ae34b5 ] We should not break overlay notifications on NOTIFY_{OK|STOP} otherwise we might break on the first fragment. We should only stop notifications if a *real* errno is returned by one of the listeners. Fixes: a1d19bd4cf1fe ("of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove") Signed-off-by: Nuno Sá Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220420130205.89435-1-nuno.sa@analog.com Signed-off-by: Sasha Levin --- drivers/of/overlay.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index d80160cf34bb..d1187123c4fc 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -170,9 +170,7 @@ static int overlay_notify(struct overlay_changeset *ovcs, ret = blocking_notifier_call_chain(&overlay_notify_chain, action, &nd); - if (ret == NOTIFY_OK || ret == NOTIFY_STOP) - return 0; - if (ret) { + if (notifier_to_errno(ret)) { ret = notifier_to_errno(ret); pr_err("overlay changeset %s notifier error %d, target: %pOF\n", of_overlay_action_name[action], ret, nd.target); -- 2.35.1