Skip to content

Commit c97d3fb

Browse files
dhowellsdavem330
authored andcommitted
nvme-tcp: Fix comma-related oops
Fix a comma that should be a semicolon. The comma is at the end of an if-body and thus makes the statement after (a bvec_set_page()) conditional too, resulting in an oops because we didn't fill out the bio_vec[]: BUG: kernel NULL pointer dereference, address: 0000000000000008 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page ... Workqueue: nvme_tcp_wq nvme_tcp_io_work [nvme_tcp] RIP: 0010:skb_splice_from_iter+0xf1/0x370 ... Call Trace: tcp_sendmsg_locked+0x3a6/0xdd0 tcp_sendmsg+0x31/0x50 inet_sendmsg+0x47/0x80 sock_sendmsg+0x99/0xb0 nvme_tcp_try_send_data+0x149/0x490 [nvme_tcp] nvme_tcp_try_send+0x1b7/0x300 [nvme_tcp] nvme_tcp_io_work+0x40/0xc0 [nvme_tcp] process_one_work+0x21c/0x430 worker_thread+0x54/0x3e0 kthread+0xf8/0x130 Fixes: 7769887 ("nvme-tcp: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage") Reported-by: Aurelien Aptel <[email protected]> Link: https://lore.kernel.org/r/253mt0il43o.fsf@mtr-vdi-124.i-did-not-set--mail-host-address--so-tickle-me/ Signed-off-by: David Howells <[email protected]> cc: Sagi Grimberg <[email protected]> cc: Willem de Bruijn <[email protected]> cc: Keith Busch <[email protected]> cc: Jens Axboe <[email protected]> cc: Christoph Hellwig <[email protected]> cc: Chaitanya Kulkarni <[email protected]> cc: "David S. Miller" <[email protected]> cc: Eric Dumazet <[email protected]> cc: Jakub Kicinski <[email protected]> cc: Paolo Abeni <[email protected]> cc: Jens Axboe <[email protected]> cc: Jens Axboe <[email protected]> cc: Matthew Wilcox <[email protected]> cc: [email protected] cc: [email protected] Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 26b3297 commit c97d3fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ static int nvme_tcp_try_send_data(struct nvme_tcp_request *req)
10141014
msg.msg_flags |= MSG_MORE;
10151015

10161016
if (!sendpage_ok(page))
1017-
msg.msg_flags &= ~MSG_SPLICE_PAGES,
1017+
msg.msg_flags &= ~MSG_SPLICE_PAGES;
10181018

10191019
bvec_set_page(&bvec, page, len, offset);
10201020
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, len);

0 commit comments

Comments
 (0)