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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Jul 2013 18:42:27 +0000 (11:42 -0700)
commit312cf3e4cf531e1f729624464bce7542025f7cbe
treee876132520446d9a1e5d8cbac1535ce088f0eb81
parent096bff23937209645162a7fc5e70246cb5c60336
SCSI: sd: Fix parsing of 'temporary ' cache mode prefix

commit 2ee3e26c673e75c05ef8b914f54fadee3d7b9c88 upstream.

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>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/sd.c