From: James Bottomley Date: Thu, 26 Nov 2009 15:50:20 +0000 (-0600) Subject: [SCSI] enclosure: fix oops while iterating enclosure_status array X-Git-Tag: v2.6.33-rc1~5^2~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc9b2e9f6603190c009e5d2629ce8e3f99571346;p=pandora-kernel.git [SCSI] enclosure: fix oops while iterating enclosure_status array Based on patch originally by Jeff Mahoney enclosure_status is expected to be a NULL terminated array of strings but isn't actually NULL terminated. When writing an invalid value to /sys/class/enclosure/.../.../status, it goes off the end of the array and Oopses. Fix by making the assumption true and adding NULL at the end. Reported-by: Artur Wojcik Signed-off-by: James Bottomley --- Reading git-diff-tree failed