Re: [PATCH] ata: pata_hpt37x: fix potential forever loop

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

 



On Wed, Feb 01, 2023 at 08:18:13PM +0300, Sergey Shtylyov wrote:
> On 2/1/23 5:59 PM, Sergey Shtylyov wrote:
> [...]
> >> This code accidentally reuses the "tries" iterator for both the inside
> >> and outside loops.  It could result in a forever loop if the "tries"
> >> variable gets reset to 0x1000 and never reaches 0x5000.
> 
>    Have you actually seen this happening?
> 

No, this is from static analysis.

drivers/ata/pata_hpt3x2n.c:390 hpt3xn_calibrate_dpll() warn: reusing outside iterator: 'tries'

You're right that this is a false positive.  I thought I had addressed
that particular type of false positive so the check wouldn't warn about
it but apparently I hadn't.  Sorry!

Thanks again for reviewing this.

regards,
dan carpenter




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux