答复: [PATCH] net: dsa: felix: fix possible NULL pointer dereference

From: zhengyongjun
Date: Tue Mar 29 2022 - 05:12:20 EST


Thanks for point out my mistake :)
-----邮件原件-----
发件人: Paolo Abeni [mailto:pabeni@xxxxxxxxxx]
发送时间: 2022年3月29日 17:00
收件人: zhengyongjun <zhengyongjun3@xxxxxxxxxx>; andrew@xxxxxxx; vivien.didelot@xxxxxxxxx; f.fainelli@xxxxxxxxx; davem@xxxxxxxxxxxxx; kuba@xxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
抄送: vladimir.oltean@xxxxxxx; claudiu.manoil@xxxxxxx; alexandre.belloni@xxxxxxxxxxx; UNGLinuxDriver@xxxxxxxxxxxxx
主题: Re: [PATCH] net: dsa: felix: fix possible NULL pointer dereference

Hello,

On Tue, 2022-03-29 at 08:12 +0000, Zheng Yongjun wrote:
> As the possible failure of the allocation, kzalloc() may return NULL
> pointer.
> Therefore, it should be better to check the 'sgi' in order to prevent
> the dereference of NULL pointer.
>
> Fixes: 23ae3a7877718 ("net: dsa: felix: add stream gate settings for psfpq").

It looks like the fixes tag has been corrupted (trailing 'q'). Would you mind posting a v2 with that fixed ?

Thanks,

Paolo