summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mv78xx0/Makefile
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-07-27 01:51:48 +0300
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-07-29 11:54:26 +0300
commitec85bd369fd2bfaed6f45dd678706429d4f75b48 (patch)
treef57a23467a04861d936011986cb005740199659f /arch/arm/mach-mv78xx0/Makefile
parentfb0fd3469ead5b937293c213daa1f589b4b7ce46 (diff)
downloadlinux-ec85bd369fd2bfaed6f45dd678706429d4f75b48.tar.xz
ARM: findbit: fix overflowing offset
When offset is larger than the size of the bit array, we should not attempt to access the array as we can perform an access beyond the end of the array. Fix this by changing the pre-condition. Using "cmp r2, r1; bhs ..." covers us for the size == 0 case, since this will always take the branch when r1 is zero, irrespective of the value of r2. This means we can fix this bug without adding any additional code! Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/mach-mv78xx0/Makefile')
0 files changed, 0 insertions, 0 deletions