Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp616266iog; Mon, 13 Jun 2022 09:12:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2XKnwjC7/FpYn2sFKB5G6q3jR5diyWLfpVLt/3reH16lB40wXZIcLOkvu+zyoqXJZEP6l X-Received: by 2002:a05:6a00:179e:b0:518:9e1d:1cbd with SMTP id s30-20020a056a00179e00b005189e1d1cbdmr103728pfg.12.1655136772538; Mon, 13 Jun 2022 09:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655136772; cv=none; d=google.com; s=arc-20160816; b=UNShR9WJnI7Sp9uEXalCdHPRjWEx147EG59xTbRFsSNy8nCbsWZ7/ocebF7RVTB7gJ AZ9tDjq5Y+1AzhoPKYr1zLqAR0XTIPfKDKojRnhmWoQe4zNdPX/Wcj87I1OeAr+rwW6+ qfzXW1879zOs6nflv/a3BVjfEJE6GlL2sTQ996wXj+6mDSRwbz3QldbpzcQs0c4ERY91 jl/MPH7Le0IHeV24NPj0rTYgNyNMgdoYjxSYubqOaxs0OETFpG6wv2MnQLLnMlxrQm5s k/hzjxgX5ALwKmZtERx8EFEa+SeygdnEcnSupahLbjvHLjarbSw0VNylNPbUUjmLomrh W1Ng== 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=s4bw2wz3pJgZe/HAhRFzDlB86886cHc1216Nkobq7S4=; b=FYzoAzxFMZyNd6ujD3bDCeEmQSRaRr4YrfuQiJOXD3aUOA5cz40Jik0U3qft8HZ7nh U6mb26zsJ2F3LP4qZ/UcyeZ3QpG8BSuWcFgXZqZRiRxVxFIEFN7O4KHG0gPxKebvvToz oPRFgThj7odJQuOLl03y4sUCrHT0u3DL2WZr87v35YO1pkH2I7B+hawxtCOJfQ3v+xt7 i0cCixs7aJxw9pEcJiXoKyvaBfz9ZJ74pjwiMlPj6BeQ2ViYEkl42wpd3/Z72TrjhMhY ash6lpN0GmgEihLdDBcWJ085djU3kiCO8emlZkg1ohP2voYfZnMqA6hLWaXIwUZXicUd 8AiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vg7rKNJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a170902784500b0016399622169si12733578pln.46.2022.06.13.09.12.38; Mon, 13 Jun 2022 09:12:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vg7rKNJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356845AbiFMLzn (ORCPT + 99 others); Mon, 13 Jun 2022 07:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356400AbiFMLu0 (ORCPT ); Mon, 13 Jun 2022 07:50:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F1B0140F9; Mon, 13 Jun 2022 03:53:58 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 1518960F9A; Mon, 13 Jun 2022 10:53:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 264FFC34114; Mon, 13 Jun 2022 10:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117637; bh=6aWu4mTOjgDRKgDU5fF44X8Oar1SBo8cFQBv3hFjkB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vg7rKNJDqtim3/tRscoUHpVg6R5/iN3V3TIZlWunf4F7/291wbGvQ7hz2NTdAS5jk ugiga5SSQ49pTcpTm/oWgUX1cOW+vCVxzWqDYwKHgq3F9McOrswbzWbi05eT0NSMcy umyE2aNPY2LffBcnT+/1ew8Y8uCvWDFSZBSvNtpw= 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 4.19 077/287] of: overlay: do not break notify on NOTIFY_{OK|STOP} Date: Mon, 13 Jun 2022 12:08:21 +0200 Message-Id: <20220613094926.208912676@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094923.832156175@linuxfoundation.org> References: <20220613094923.832156175@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=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 a77bfeac867d..fef5b6c2fae2 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