]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ipath: Limit length checksummed in eeprom
authorMichael Albaugh <Michael.Albaugh@Qlogic.com>
Thu, 18 Oct 2007 17:36:40 +0000 (10:36 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 30 Oct 2007 17:58:53 +0000 (10:58 -0700)
commit0e860b1651b0fa5416ee33e807198b238c8fa534
treed29e64a2c7ac9d9b27d371911013c091a1b8f96f
parentf1608afb10ef202c53d8d0252e4f5ac9e27f771f
IB/ipath: Limit length checksummed in eeprom

The small eeprom that holds the GUID etc. contains a data-length, but if
the actual eeprom is new or has been erased, that byte will be 0xFF,
which is greater than the maximum physical length of the eeprom, and
more importantly greater than the length of the buffer we vmalloc'd.
Sanity-check the length to avoid the possbility of reading past end of
buffer.

Signed-off-by: Michael Albaugh <Michael.Albaugh@Qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_eeprom.c