linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v4 01/10] crypto: hisilicon/qm - fix wrong release after using strsep
       [not found] <96ffa633-dda1-7ad1-72da-5563906c1561@web.de>
@ 2020-08-05  1:58 ` shenyang (M)
       [not found]   ` <5554863d-f0d7-a396-7d13-e187fa9ca6bf@web.de>
  0 siblings, 1 reply; 3+ messages in thread
From: shenyang (M) @ 2020-08-05  1:58 UTC (permalink / raw)
  To: Markus Elfring, Sihang Chen, linux-crypto
  Cc: linux-kernel, kernel-janitors, David S. Miller, Herbert Xu,
	Zaibo Xu, Zhou Wang



On 2020/8/5 2:34, Markus Elfring wrote:
> …
>> +++ b/drivers/crypto/hisilicon/qm.c
>> @@ -1420,16 +1420,17 @@ static int qm_dbg_help(struct hisi_qm *qm, char *s)
> …
>> +	s_tmp = s;
>>  	presult = strsep(&s, " ");
>>  	if (!presult) {
>> -		kfree(s);
>> +		kfree(s_tmp);
>>  		return -EINVAL;
>>  	}
>
> -		kfree(s);
> -		return -EINVAL;
> +		ret = -EINVAL;
> +		goto free_tmp;
>
> I suggest to add a jump target for the desired exception handling.
>
> Regards,
> Markus
>
> .
>

Thanks for your review. There is only one error branch need to do
something uninit. So I think the jump is not necessary and will
affect code reading.:)

Thanks,
Yang


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [v4 01/10] crypto: hisilicon/qm - fix wrong release after using strsep
       [not found]   ` <5554863d-f0d7-a396-7d13-e187fa9ca6bf@web.de>
@ 2020-08-06  1:33     ` shenyang (M)
       [not found]       ` <c28f472c-4d7b-0afd-5ad7-3cc322aad404@web.de>
  0 siblings, 1 reply; 3+ messages in thread
From: shenyang (M) @ 2020-08-06  1:33 UTC (permalink / raw)
  To: Markus Elfring, Sihang Chen, linux-crypto
  Cc: linux-kernel, kernel-janitors, David S. Miller, Herbert Xu,
	Zaibo Xu, Zhou Wang



On 2020/8/5 14:04, Markus Elfring wrote:
>> Thanks for your review. There is only one error branch need to do
>> something uninit. So I think the jump is not necessary and will
>> affect code reading.:)
>
> How does this concern fit to the Linux coding style?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=4da9f3302615f4191814f826054846bf843e24fa#n481
>
> Regards,
> Markus
>
> .
>

Got it, I'll fix this.

Thanks,
Yang


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [v4 01/10] crypto: hisilicon/qm - fix wrong release after using strsep
       [not found]       ` <c28f472c-4d7b-0afd-5ad7-3cc322aad404@web.de>
@ 2020-08-07  8:06         ` shenyang (M)
  0 siblings, 0 replies; 3+ messages in thread
From: shenyang (M) @ 2020-08-07  8:06 UTC (permalink / raw)
  To: Markus Elfring, Sihang Chen, linux-crypto
  Cc: linux-kernel, kernel-janitors, David S. Miller, Herbert Xu,
	Zaibo Xu, Zhou Wang



On 2020/8/6 15:23, Markus Elfring wrote:
> Would you become interested to look if any other software components
> would be similarly affected?

Yeah, I'll check the rest and fix if any and send those in  a
clean up patch.

Thanks,
Yang


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-07  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <96ffa633-dda1-7ad1-72da-5563906c1561@web.de>
2020-08-05  1:58 ` [PATCH v4 01/10] crypto: hisilicon/qm - fix wrong release after using strsep shenyang (M)
     [not found]   ` <5554863d-f0d7-a396-7d13-e187fa9ca6bf@web.de>
2020-08-06  1:33     ` [v4 " shenyang (M)
     [not found]       ` <c28f472c-4d7b-0afd-5ad7-3cc322aad404@web.de>
2020-08-07  8:06         ` shenyang (M)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).