lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ZIg2j025xV7E6yI8@linux-8mug>
Date:   Tue, 13 Jun 2023 17:27:43 +0800
From:   Chester Lin <clin@...e.com>
To:     Markus Elfring <Markus.Elfring@....de>
Cc:     kernel-janitors@...r.kernel.org, s32@....com,
        linux-gpio@...r.kernel.org, opensource.kernel@...o.com,
        Linus Walleij <linus.walleij@...aro.org>,
        Lu Hongfei <luhongfei@...o.com>,
        LKML <linux-kernel@...r.kernel.org>, cocci@...ia.fr
Subject: Re: [PATCH] pinctrl: nxp: Adjust error predicates for improved
 exception handling in s32_dt_node_to_map()?

On Tue, Jun 13, 2023 at 11:15:22AM +0200, Markus Elfring wrote:
> >>> Ensure child node references are decremented properly in the error path.
> >> …
> >>> +++ b/drivers/pinctrl/nxp/pinctrl-s32cc.c
> >>> @@ -279,8 +279,10 @@ static int s32_dt_node_to_map(struct pinctrl_dev *pctldev,
> >>>  		ret = s32_dt_group_node_to_map(pctldev, np, map,
> >>>  					       &reserved_maps, num_maps,
> >>>  					       np_config->name);
> >>> -		if (ret < 0)
> >>> +		if (ret < 0) {
> >>> +			of_node_put(np);
> >>>  			break;
> >>> +		}
> >>>  	}
> >>>
> >>>  	if (ret)
> >>
> >> May the same error predicate be applied at two places here?
> >>
> >
> > I think these two error predicates can be combined together in another patch.
> 
> Are you going to reduce such error predicates so that exception handling
> can be improved another bit?
> 
Yes, I am. There will be a patch to improve these error predicates. Thanks for
your suggestion.

Regards,
Chester

> Regards,
> Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ