[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180614132600.685059845@linuxfoundation.org>
Date: Thu, 14 Jun 2018 16:04:51 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Martin Wilck <mwilck@...e.com>,
Sagi Grimberg <sagi@...mbeg.me>, Christoph Hellwig <hch@....de>
Subject: [PATCH 4.9 10/30] nvmet: dont overwrite identify sn/fr with 0-bytes
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Wilck <mwilck@...e.com>
commit 42819eb7a0957cc340ad4ed8bba736bab5ebc464 upstream.
The merged version of my patch "nvmet: don't report 0-bytes in serial
number" fails to remove two lines which should have been replaced,
so that the space-padded strings are overwritten again with 0-bytes.
Fix it.
Fixes: 42de82a8b544 nvmet: don't report 0-bytes in serial number
Signed-off-by: Martin Wilck <mwilck@...e.com>
Reviewed-by: Sagi Grimberg <sagi@...mbeg.me>
Signed-off-by: Christoph Hellwig <hch@....de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/nvme/target/admin-cmd.c | 6 ------
1 file changed, 6 deletions(-)
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -197,12 +197,6 @@ static void nvmet_execute_identify_ctrl(
copy_and_pad(id->mn, sizeof(id->mn), model, sizeof(model) - 1);
copy_and_pad(id->fr, sizeof(id->fr), UTS_RELEASE, strlen(UTS_RELEASE));
- memset(id->mn, ' ', sizeof(id->mn));
- strncpy((char *)id->mn, "Linux", sizeof(id->mn));
-
- memset(id->fr, ' ', sizeof(id->fr));
- strncpy((char *)id->fr, UTS_RELEASE, sizeof(id->fr));
-
id->rab = 6;
/*
Powered by blists - more mailing lists