Skip to content

Commit cc3d467

Browse files
Christoph Hellwigkeithbusch
authored andcommitted
nvmet: add a missing endianess conversion in nvmet_execute_admin_connect
The kato field is little endian on the wire, but native endian in the in-core structure, add the missing byte swap. Fixes: 6202783 ("nvmet: Improve nvmet_alloc_ctrl() interface and implementation") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent 7bf6b49 commit cc3d467

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/target/fabrics-cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)
287287
args.subsysnqn = d->subsysnqn;
288288
args.hostnqn = d->hostnqn;
289289
args.hostid = &d->hostid;
290-
args.kato = c->kato;
290+
args.kato = le32_to_cpu(c->kato);
291291

292292
ctrl = nvmet_alloc_ctrl(&args);
293293
if (!ctrl)

0 commit comments

Comments
 (0)