]> www.infradead.org Git - nvme.git/commit
nvmet: always initialize cqe.result
authorDaniel Wagner <dwagner@suse.de>
Wed, 12 Jun 2024 14:11:59 +0000 (16:11 +0200)
committerKeith Busch <kbusch@kernel.org>
Wed, 12 Jun 2024 18:00:08 +0000 (11:00 -0700)
commitcd0c1b8e045a8d2785342b385cb2684d9b48e426
tree57b284e8700ab6302528a95e15fa26a15fa28578
parentd76584e53f4244dbc154bec447c3852600acc914
nvmet: always initialize cqe.result

The spec doesn't mandate that the first two double words (aka results)
for the command queue entry need to be set to 0 when they are not
used (not specified). Though, the target implemention returns 0 for TCP
and FC but not for RDMA.

Let's make RDMA behave the same and thus explicitly initializing the
result field. This prevents leaking any data from the stack.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/core.c
drivers/nvme/target/fabrics-cmd-auth.c
drivers/nvme/target/fabrics-cmd.c