Re: [PATCH 1/1] staging: fix a potential infinite loop

From: Greg KH
Date: Tue May 17 2022 - 06:09:41 EST


On Tue, May 17, 2022 at 05:58:09PM +0800, Yuanjun Gong wrote:
> From: Gong Yuanjun <ruc_gongyuanjun@xxxxxxx>
>
> In the for-loop in _rtl92e_update_rxcounts(),
> i is a u8 counter while priv->rtllib->LinkDetectInfo.SlotNum is
> a u16 num, there is a potential infinite loop if SlotNum is larger
> than u8_max.

can SlotNum ever get larger than that? If not, then why not just change
that type instead?

And you forgot to list the driver name in the subject line and cc: all
the right people that scripts/get_maintainer.pl will tell you to cc:

Please fix that up and resend a v2.

thanks,

greg k-h