Re: [PATCH] of: overlay: do not break notify on NOTIFY_OK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/4/22 02:40, Nuno Sá wrote:
> We should not break overlay notifications on NOTIFY_OK otherwise we might
> break on the first fragment. As NOTIFY_OK is not zero, we need to
> account for that when looking for errors.

It's been a long time since I've looked at notifiers, it will take me some time to
review this.

-Frank

> 
> Fixes: a1d19bd4cf1fe ("of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove")
> Signed-off-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
> ---
>  drivers/of/overlay.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
> index d80160cf34bb..0b2d47598cfb 100644
> --- a/drivers/of/overlay.c
> +++ b/drivers/of/overlay.c
> @@ -170,9 +170,9 @@ 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)
> +		if (ret == NOTIFY_STOP)
>  			return 0;
> -		if (ret) {
> +		if (ret && ret != NOTIFY_OK) {
>  			ret = notifier_to_errno(ret);
>  			pr_err("overlay changeset %s notifier error %d, target: %pOF\n",
>  			       of_overlay_action_name[action], ret, nd.target);




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux