]> git.ipfire.org Git - people/arne_f/kernel.git/commit
scsi: scsi_devinfo: cleanly zero-pad devinfo strings
authorMartin Wilck <mwilck@suse.com>
Mon, 27 Nov 2017 22:47:35 +0000 (23:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:22:29 +0000 (09:22 +0100)
commitefb4251b4eba1ba4507f76d68fbef7cdc9ec0db2
treed3b114b9e741de669a77957fc20a60a70b1feee9
parenta37acf28a9dffe97781f891e2edbad7a6b0e9795
scsi: scsi_devinfo: cleanly zero-pad devinfo strings

commit 81df022b688d43d2a3667518b2f755d384397910 upstream.

Cleanly fill memory for "vendor" and "model" with 0-bytes for the
"compatible" case rather than adding only a single 0 byte.  This
simplifies the devinfo code a a bit, and avoids mistakes in other places
of the code (not in current upstream, but we had one such mistake in the
SUSE kernel).

[mkp: applied by hand and added braces]

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/scsi_devinfo.c