[SCSI] sd: Fix parsing of 'temporary ' cache mode prefix
authorBen Hutchings <ben@decadent.org.uk>
Mon, 27 May 2013 18:07:19 +0000 (19:07 +0100)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 26 Jun 2013 15:44:33 +0000 (08:44 -0700)
commit2ee3e26c673e75c05ef8b914f54fadee3d7b9c88
tree3412049f8c10d4a29c8dbd6a395609d677410e8e
parentc6e23d83c35380909edf2eb364943719bc10e9be
[SCSI] sd: Fix parsing of 'temporary ' cache mode prefix

Commit 39c60a0948cc '[SCSI] sd: fix array cache flushing bug causing
performance problems' added temp as a pointer to "temporary " and used
sizeof(temp) - 1 as its length.  But sizeof(temp) is the size of the
pointer, not the size of the string constant.  Change temp to a static
array so that sizeof() does what was intended.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/sd.c