Re: [PATCH][V3] x86/RAS/mce_amd_inj: fix signed wrap around when decrementing index i

2016-09-19 Thread Borislav Petkov
On Sat, Sep 17, 2016 at 11:17:50AM +0100, Colin King wrote: > From: Colin Ian King > > Change predecrement compare to post decrement compare to avoid an > unsigned integer wrap-around comparisomn when decrementing in the while > loop. > > For example, if the debugfs_create_file fails when i is z

[PATCH][V3] x86/RAS/mce_amd_inj: fix signed wrap around when decrementing index i

2016-09-17 Thread Colin King
From: Colin Ian King Change predecrement compare to post decrement compare to avoid an unsigned integer wrap-around comparisomn when decrementing in the while loop. For example, if the debugfs_create_file fails when i is zero, the current situation will predecrement i in the while loop, wrapping