]> git.baikalelectronics.ru Git - kernel.git/commit
Blackfin: add some bounds checking to peripheral_request
authorBarry Song <barry.song@analog.com>
Wed, 16 Sep 2009 04:36:29 +0000 (04:36 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 15 Dec 2009 05:13:46 +0000 (00:13 -0500)
commite0007adbb653fd6c02ad29f72a53750c4a80fdf0
tree95f2471d436918a2673c2a636594ea6c119210a5
parent6f9a461e5a8cb6973fdc18adac7ffd9cac12c9b2
Blackfin: add some bounds checking to peripheral_request

The requested peripheral is turned into an index into some state arrays,
so make sure the calculated index doesn't exceed the index.  This occurs
when using bogus pin values or the define headers are screwed up.  Now
we'll notice right away that something needs fixing instead of trying to
track down random memory corruption.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/kernel/bfin_gpio.c