Skip to content

Commit 1c4eb2a

Browse files
mwilckgregkh
authored andcommitted
nvmet: don't overwrite identify sn/fr with 0-bytes
commit 42819eb 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: 42de82a nvmet: don't report 0-bytes in serial number Signed-off-by: Martin Wilck <mwilck@suse.com> Reviewed-by: Sagi Grimberg <sagi@grimbeg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f43d8e4 commit 1c4eb2a

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

drivers/nvme/target/admin-cmd.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,6 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
197197
copy_and_pad(id->mn, sizeof(id->mn), model, sizeof(model) - 1);
198198
copy_and_pad(id->fr, sizeof(id->fr), UTS_RELEASE, strlen(UTS_RELEASE));
199199

200-
memset(id->mn, ' ', sizeof(id->mn));
201-
strncpy((char *)id->mn, "Linux", sizeof(id->mn));
202-
203-
memset(id->fr, ' ', sizeof(id->fr));
204-
strncpy((char *)id->fr, UTS_RELEASE, sizeof(id->fr));
205-
206200
id->rab = 6;
207201

208202
/*

0 commit comments

Comments
 (0)