Re: [PATCH] drm/amd/powerplay: ensure loop does not wraparound on decrement

2017-05-18 Thread walter harms
Am 17.05.2017 20:13, schrieb Colin King: > From: Colin Ian King > > The current for loop decrements i when it is zero and this causes > a wrap-around back to ~0 because i is unsigned. In the unlikely event > that mask is 0, the loop will run forever. Fix this so we

[PATCH] drm/amd/powerplay: ensure loop does not wraparound on decrement

2017-05-17 Thread Colin King
From: Colin Ian King The current for loop decrements i when it is zero and this causes a wrap-around back to ~0 because i is unsigned. In the unlikely event that mask is 0, the loop will run forever. Fix this so we can't loop forever. Detected by CoverityScan,

Re: [PATCH] drm/amd/powerplay: ensure loop does not wraparound on decrement

2017-05-17 Thread Dan Carpenter
I sent a patch for this bug earlier. There is a second bug later in the function which my patch fixes as well. regards, dan carpenter ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx