"total" is the number of slots in the array, so wraparound needs to be
done when "first" or "last" is greater than or equal to the number of
slots.
Reported by: Stanislav Fort <stanislav.fort@aisle.com>
Differential D56371
linuxkpi: Fix an off-by-one error in the kfifo implementation Authored by markj on Mon, Apr 13, 3:05 AM. Tags None Referenced Files
Details
"total" is the number of slots in the array, so wraparound needs to be Reported by: Stanislav Fort <stanislav.fort@aisle.com>
Diff Detail
Event TimelineComment Actions This seems to be correct given we do the check after updating the values. Do we know what is using the kfifo these days; I am just curious where the report came from? Comment Actions I believe it comes from analyzing kernel sources rather than testing any affected drivers.
Seems to be used by mt76 too. Comment Actions Ah, makes sense :)
For (old) mt7610/12/30 cards. Not even sure if my stash goes so far back. Not compiled on FreeBSD. I do have a 7615 which is worthwhile as on SoCs as well but doesn't use the mt76x02 "lib" parts. |