Skip to content

Commit

Permalink
nvmet: add a missing endianess conversion in nvmet_execute_admin_connect
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Keith Busch committed Jan 28, 2025
1 parent 7bf6b49 commit cc3d467
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/target/fabrics-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)
args.subsysnqn = d->subsysnqn;
args.hostnqn = d->hostnqn;
args.hostid = &d->hostid;
args.kato = c->kato;
args.kato = le32_to_cpu(c->kato);

ctrl = nvmet_alloc_ctrl(&args);
if (!ctrl)
Expand Down

0 comments on commit cc3d467

Please sign in to comment.