Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2175914iof; Tue, 7 Jun 2022 22:14:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxZDkBhmSSMObSBF1nZvR9+CKYUTNzyFzy/pFztJv4/BXFkqBsl3T78CFXdkYtqr7WWWsC X-Received: by 2002:a63:788:0:b0:3fc:6922:704 with SMTP id 130-20020a630788000000b003fc69220704mr28526772pgh.6.1654665255646; Tue, 07 Jun 2022 22:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654665255; cv=none; d=google.com; s=arc-20160816; b=erWcYCN9UvkPLFIvRXQneJ+rK41qQbXDodmEeT8enuU1DiXyKTKseERvvjTMqQ+pAr 4h2nHNSKOjRtAx0xbWgzBkzi95gg9d/oGi7SXEAJ7DsQu/oY6L0X3l38eMnqw+PDSgsm V6U0tFneP9Cg1UWh65sbngUOM78uNUd+xy24mayrgpJwIetLis1OfFIfsGt8guH2lix/ 2FJu0HICfAgAC1+f5mdoNzmP3yLmLYZ+XXz4yNfjnPlnY23H6oHonicx6V9VQUTi/dvS owKImWWSvhamJp437eYmQozhVDBaMR8Ae2ue2e+Ze5ADaMSpv/CNiWoO8Nk32cMAOndP y0ZQ== 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=1URX5KvCRTnXBFfIQb4G5cwo+5Y4YAzeU+1uBuUsGUc=; b=kopFL3/mL9xIjCbQLU/jDkWB6whQBSQIZirVuby2kTHD9vuKJjGcpy7TI/SFaf6di0 eY5f6/NJHBhBeVldypXu1j9ijsUiFlokPhgcPtWxGx7GYQ7hL87ejdhHhzs51h9FxIMx 91dQbgLloe/LizO8Sgud4MfWPcsgXYTlP9cOdniIvicdUG2QjD8uTZcSxi9hWlsAW9Fz PXPO9UyQFbX5/Dq0gnUNbYrlpJ8DeVCECSfLWQ8jxcJEH5JulaVQ6j5dNIP2hBU9744P 77oztUCLQFvG4Lb3KjuGCjfWPR8GVlnnHTNYoqNMuND8NNTEZVxY8yEphsWWXKenM9bj McHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F+AEd0Cd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v202-20020a6361d3000000b003db44098addsi25720925pgb.729.2022.06.07.22.14.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:14:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F+AEd0Cd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 4ACEE41641F; Tue, 7 Jun 2022 21:44:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348299AbiFGRr6 (ORCPT + 99 others); Tue, 7 Jun 2022 13:47:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347548AbiFGRau (ORCPT ); Tue, 7 Jun 2022 13:30:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40B8267D06; Tue, 7 Jun 2022 10:27:22 -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 E10066143F; Tue, 7 Jun 2022 17:27:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB632C385A5; Tue, 7 Jun 2022 17:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622841; bh=IMgI6uceHhFh8lhaGYlZSulYoA0Q5CINB5VcpWKhQfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F+AEd0CdWn5gLh/fIR1o3jT6auX8V8IviNnJ7EJp3YAfyy7CTXGZ1XZVCXQkp5nnk EZKIWj9gkCBEolPeF+I5vlZULJu2IoLCN9E/CfuibFsP/zwqm8jhycOTXMyLqhslb3 sp/0qw+9pYpevpmBi26+VDaf2q5opONN+NQOPL/s= 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.10 161/452] of: overlay: do not break notify on NOTIFY_{OK|STOP} Date: Tue, 7 Jun 2022 19:00:18 +0200 Message-Id: <20220607164913.359447378@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@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 43a77d720008..c8a0c0e9dec1 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