* [syzbot] [rds?] WARNING in rds_conn_connect_if_down @ 2023-04-11 20:53 syzbot 2024-02-27 14:58 ` syzbot 0 siblings, 1 reply; 10+ messages in thread From: syzbot @ 2023-04-11 20:53 UTC (permalink / raw) To: davem, edumazet, kuba, linux-kernel, linux-rdma, netdev, pabeni, rds-devel, santosh.shilimkar, syzkaller-bugs Hello, syzbot found the following issue on: HEAD commit: b9881d9a761a Merge branch 'bonding-ns-validation-fixes' git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=123c531dc80000 kernel config: https://syzkaller.appspot.com/x/.config?x=d3500b143c204867 dashboard link: https://syzkaller.appspot.com/bug?extid=d4faee732755bba9838e compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/4b4a5a4a2f01/disk-b9881d9a.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/f3d2bf6e2e9e/vmlinux-b9881d9a.xz kernel image: https://storage.googleapis.com/syzbot-assets/26469aa699ef/bzImage-b9881d9a.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com ------------[ cut here ]------------ WARNING: CPU: 1 PID: 21117 at net/rds/connection.c:933 rds_conn_connect_if_down+0x97/0xb0 net/rds/connection.c:933 Modules linked in: CPU: 1 PID: 21117 Comm: syz-executor.3 Not tainted 6.3.0-rc5-syzkaller-00143-gb9881d9a761a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 RIP: 0010:rds_conn_connect_if_down+0x97/0xb0 net/rds/connection.c:933 Code: 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 25 48 8b bb 90 00 00 00 5b 5d e9 be fa ff ff e8 49 f9 2c f8 <0f> 0b eb c6 e8 f0 05 7e f8 eb aa e8 49 06 7e f8 eb 80 e8 42 06 7e RSP: 0018:ffffc900055d7910 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff8880526ba5f0 RCX: 0000000000000000 RDX: ffff888027cb9d40 RSI: ffffffff8955de77 RDI: 0000000000000001 RBP: 0000000000000002 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000000 R12: 00000000fffffff5 R13: 0000000000000008 R14: ffff88806fd2db00 R15: ffff88807644e4c0 FS: 00007f9b3b641700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002001e000 CR3: 0000000027523000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> rds_sendmsg+0x2366/0x31a0 net/rds/send.c:1319 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 ____sys_sendmsg+0x71c/0x900 net/socket.c:2501 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2555 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2584 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f9b3a88c169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9b3b641168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f9b3a9abf80 RCX: 00007f9b3a88c169 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00007f9b3a8e7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe6c474d8f R14: 00007f9b3b641300 R15: 0000000000022000 </TASK> --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [rds?] WARNING in rds_conn_connect_if_down 2023-04-11 20:53 [syzbot] [rds?] WARNING in rds_conn_connect_if_down syzbot @ 2024-02-27 14:58 ` syzbot 2024-02-27 22:41 ` Allison Henderson ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: syzbot @ 2024-02-27 14:58 UTC (permalink / raw) To: allison.henderson, davem, edumazet, kuba, linux-kernel, linux-rdma, netdev, pabeni, rds-devel, santosh.shilimkar, syzkaller-bugs syzbot has found a reproducer for the following issue on: HEAD commit: 25d434257464 Merge branch 'pcs-xpcs-cleanups' git tree: net-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=11f0034a180000 kernel config: https://syzkaller.appspot.com/x/.config?x=57c41f64f37f51c5 dashboard link: https://syzkaller.appspot.com/bug?extid=d4faee732755bba9838e compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11cbd722180000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10ff934a180000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/2731aa9fb143/disk-25d43425.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/d1daf5663559/vmlinux-25d43425.xz kernel image: https://storage.googleapis.com/syzbot-assets/798446e4189b/bzImage-25d43425.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5244 at net/rds/connection.c:931 rds_conn_connect_if_down+0x95/0xb0 net/rds/connection.c:931 Modules linked in: CPU: 0 PID: 5244 Comm: syz-executor403 Not tainted 6.8.0-rc5-syzkaller-01592-g25d434257464 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 RIP: 0010:rds_conn_connect_if_down+0x95/0xb0 net/rds/connection.c:931 Code: 00 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 2e c3 42 f7 49 8b 3e 5b 41 5e 41 5f e9 f1 fa ff ff e8 ac 49 e0 f6 90 <0f> 0b 90 eb cb 89 d9 80 e1 07 38 c1 7c a9 48 89 df e8 75 c2 42 f7 RSP: 0018:ffffc900042cf8a0 EFLAGS: 00010293 RAX: ffffffff8ab323c4 RBX: 0000000000000002 RCX: ffff888021100000 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000 RBP: ffffc900042cfad0 R08: ffffffff8ab3238b R09: ffffffff8ab44361 R10: 0000000000000002 R11: ffff888021100000 R12: ffff8880746ee000 R13: ffff88802e39a6c0 R14: ffff8880260f2000 R15: dffffc0000000000 FS: 00007f8c89bff6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002069d000 CR3: 000000002989a000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> rds_sendmsg+0x1409/0x2280 net/rds/send.c:1319 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f8c89c84519 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 1a 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8c89bff218 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f8c89d0e428 RCX: 00007f8c89c84519 RDX: 0000000000000000 RSI: 0000000020000800 RDI: 0000000000000003 RBP: 00007f8c89d0e420 R08: 00007ffeca3c5797 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8c89d0e42c R13: 00007f8c89cdb4f4 R14: 732e79726f6d656d R15: 00007ffeca3c5798 </TASK> --- If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [rds?] WARNING in rds_conn_connect_if_down 2024-02-27 14:58 ` syzbot @ 2024-02-27 22:41 ` Allison Henderson 2024-03-03 3:57 ` [PATCH] net/rds: fix " Edward Adam Davis 2024-03-03 4:18 ` Edward Adam Davis 2 siblings, 0 replies; 10+ messages in thread From: Allison Henderson @ 2024-02-27 22:41 UTC (permalink / raw) To: linux-rdma@vger.kernel.org, davem@davemloft.net, rds-devel@oss.oracle.com, syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com, linux-kernel@vger.kernel.org, Santosh Shilimkar, pabeni@redhat.com, netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, syzkaller-bugs@googlegroups.com I'll open an internal bug to track this one as well On Tue, 2024-02-27 at 06:58 -0800, syzbot wrote: > syzbot has found a reproducer for the following issue on: > > HEAD commit: 25d434257464 Merge branch 'pcs-xpcs-cleanups' > git tree: net-next > console+strace: > https://urldefense.com/v3/__https://syzkaller.appspot.com/x/log.txt?x=11f0034a180000__;!!ACWV5N9M2RV99hQ!Iq2WfPLgQAxNX3WGPfZ2vZo8NvDf2KGDF7wNJIfWk8F2HZYpAewiikhTFuzAl-pW1GFS2sCceHF0oJ5iNVYuRrQ7VtyxsdI21zHnQ7yBtLek$ > > kernel config: > https://urldefense.com/v3/__https://syzkaller.appspot.com/x/.config?x=57c41f64f37f51c5__;!!ACWV5N9M2RV99hQ!Iq2WfPLgQAxNX3WGPfZ2vZo8NvDf2KGDF7wNJIfWk8F2HZYpAewiikhTFuzAl-pW1GFS2sCceHF0oJ5iNVYuRrQ7VtyxsdI21zHnQ8IBIvYV$ > > dashboard link: > https://urldefense.com/v3/__https://syzkaller.appspot.com/bug?extid=d4faee732755bba9838e__;!!ACWV5N9M2RV99hQ!Iq2WfPLgQAxNX3WGPfZ2vZo8NvDf2KGDF7wNJIfWk8F2HZYpAewiikhTFuzAl-pW1GFS2sCceHF0oJ5iNVYuRrQ7VtyxsdI21zHnQ373Ydb0$ > > compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for > Debian) 2.40 > syz repro: > https://urldefense.com/v3/__https://syzkaller.appspot.com/x/repro.syz?x=11cbd722180000__;!!ACWV5N9M2RV99hQ!Iq2WfPLgQAxNX3WGPfZ2vZo8NvDf2KGDF7wNJIfWk8F2HZYpAewiikhTFuzAl-pW1GFS2sCceHF0oJ5iNVYuRrQ7VtyxsdI21zHnQ4Ypu5_j$ > > C reproducer: > https://urldefense.com/v3/__https://syzkaller.appspot.com/x/repro.c?x=10ff934a180000__;!!ACWV5N9M2RV99hQ!Iq2WfPLgQAxNX3WGPfZ2vZo8NvDf2KGDF7wNJIfWk8F2HZYpAewiikhTFuzAl-pW1GFS2sCceHF0oJ5iNVYuRrQ7VtyxsdI21zHnQ0MrP5gm$ > > > Downloadable assets: > disk image: > https://urldefense.com/v3/__https://storage.googleapis.com/syzbot-assets/2731aa9fb143/disk-25d43425.raw.xz__;!!ACWV5N9M2RV99hQ!Iq2WfPLgQAxNX3WGPfZ2vZo8NvDf2KGDF7wNJIfWk8F2HZYpAewiikhTFuzAl-pW1GFS2sCceHF0oJ5iNVYuRrQ7VtyxsdI21zHnQxlxW9s3$ > > vmlinux: > https://urldefense.com/v3/__https://storage.googleapis.com/syzbot-assets/d1daf5663559/vmlinux-25d43425.xz__;!!ACWV5N9M2RV99hQ!Iq2WfPLgQAxNX3WGPfZ2vZo8NvDf2KGDF7wNJIfWk8F2HZYpAewiikhTFuzAl-pW1GFS2sCceHF0oJ5iNVYuRrQ7VtyxsdI21zHnQ7aRfbY4$ > > kernel image: > https://urldefense.com/v3/__https://storage.googleapis.com/syzbot-assets/798446e4189b/bzImage-25d43425.xz__;!!ACWV5N9M2RV99hQ!Iq2WfPLgQAxNX3WGPfZ2vZo8NvDf2KGDF7wNJIfWk8F2HZYpAewiikhTFuzAl-pW1GFS2sCceHF0oJ5iNVYuRrQ7VtyxsdI21zHnQ7W6CtAb$ > > > IMPORTANT: if you fix the issue, please add the following tag to the > commit: > Reported-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com > > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 5244 at net/rds/connection.c:931 > rds_conn_connect_if_down+0x95/0xb0 net/rds/connection.c:931 > Modules linked in: > CPU: 0 PID: 5244 Comm: syz-executor403 Not tainted 6.8.0-rc5- > syzkaller-01592-g25d434257464 #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, > BIOS Google 01/25/2024 > RIP: 0010:rds_conn_connect_if_down+0x95/0xb0 net/rds/connection.c:931 > Code: 00 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 2e c3 > 42 f7 49 8b 3e 5b 41 5e 41 5f e9 f1 fa ff ff e8 ac 49 e0 f6 90 <0f> > 0b 90 eb cb 89 d9 80 e1 07 38 c1 7c a9 48 89 df e8 75 c2 42 f7 > RSP: 0018:ffffc900042cf8a0 EFLAGS: 00010293 > RAX: ffffffff8ab323c4 RBX: 0000000000000002 RCX: ffff888021100000 > RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000 > RBP: ffffc900042cfad0 R08: ffffffff8ab3238b R09: ffffffff8ab44361 > R10: 0000000000000002 R11: ffff888021100000 R12: ffff8880746ee000 > R13: ffff88802e39a6c0 R14: ffff8880260f2000 R15: dffffc0000000000 > FS: 00007f8c89bff6c0(0000) GS:ffff8880b9400000(0000) > knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 000000002069d000 CR3: 000000002989a000 CR4: 00000000003506f0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > Call Trace: > <TASK> > rds_sendmsg+0x1409/0x2280 net/rds/send.c:1319 > sock_sendmsg_nosec net/socket.c:730 [inline] > __sock_sendmsg+0x221/0x270 net/socket.c:745 > ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584 > ___sys_sendmsg net/socket.c:2638 [inline] > __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667 > do_syscall_64+0xf9/0x240 > entry_SYSCALL_64_after_hwframe+0x6f/0x77 > RIP: 0033:0x7f8c89c84519 > Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 1a 00 00 90 48 89 f8 48 > 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> > 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 > RSP: 002b:00007f8c89bff218 EFLAGS: 00000246 ORIG_RAX: > 000000000000002e > RAX: ffffffffffffffda RBX: 00007f8c89d0e428 RCX: 00007f8c89c84519 > RDX: 0000000000000000 RSI: 0000000020000800 RDI: 0000000000000003 > RBP: 00007f8c89d0e420 R08: 00007ffeca3c5797 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8c89d0e42c > R13: 00007f8c89cdb4f4 R14: 732e79726f6d656d R15: 00007ffeca3c5798 > </TASK> > > > --- > If you want syzbot to run the reproducer, reply with: > #syz test: git://repo/address.git branch-or-commit-hash > If you attach or paste a git patch, syzbot will apply it before > testing. > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] net/rds: fix WARNING in rds_conn_connect_if_down 2024-02-27 14:58 ` syzbot 2024-02-27 22:41 ` Allison Henderson @ 2024-03-03 3:57 ` Edward Adam Davis 2024-03-03 4:18 ` Edward Adam Davis 2 siblings, 0 replies; 10+ messages in thread From: Edward Adam Davis @ 2024-03-03 3:57 UTC (permalink / raw) To: syzbot+d4faee732755bba9838e Cc: allison.henderson, davem, edumazet, kuba, linux-kernel, linux-rdma, netdev, pabeni, rds-devel, santosh.shilimkar, syzkaller-bugs If connection isn't established yet, get_mr() will fail, trigger connection after get_mr(). Fixes: 584a8279a44a - RDS: RDMA: return appropriate error on rdma map failures Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis <eadavis@qq.com> --- net/rds/rdma.c | 3 +++ net/rds/send.c | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/net/rds/rdma.c b/net/rds/rdma.c index fba82d36593a..a4e3c5de998b 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, kfree(sg); } ret = PTR_ERR(trans_private); + /* Trigger connection so that its ready for the next retry */ + if (ret == -ENODEV) + rds_conn_connect_if_down(cp->cp_conn); goto out; } diff --git a/net/rds/send.c b/net/rds/send.c index 5e57a1581dc6..fa1640628b2f 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -1313,12 +1313,8 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len) /* Parse any control messages the user may have included. */ ret = rds_cmsg_send(rs, rm, msg, &allocated_mr, &vct); - if (ret) { - /* Trigger connection so that its ready for the next retry */ - if (ret == -EAGAIN) - rds_conn_connect_if_down(conn); + if (ret) goto out; - } if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) { printk_ratelimited(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n", -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] net/rds: fix WARNING in rds_conn_connect_if_down 2024-02-27 14:58 ` syzbot 2024-02-27 22:41 ` Allison Henderson 2024-03-03 3:57 ` [PATCH] net/rds: fix " Edward Adam Davis @ 2024-03-03 4:18 ` Edward Adam Davis 2024-03-04 17:07 ` Simon Horman 2 siblings, 1 reply; 10+ messages in thread From: Edward Adam Davis @ 2024-03-03 4:18 UTC (permalink / raw) To: syzbot+d4faee732755bba9838e Cc: allison.henderson, davem, edumazet, kuba, linux-kernel, linux-rdma, netdev, pabeni, rds-devel, santosh.shilimkar, syzkaller-bugs If connection isn't established yet, get_mr() will fail, trigger connection after get_mr(). Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures") Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis <eadavis@qq.com> --- net/rds/rdma.c | 3 +++ net/rds/send.c | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/net/rds/rdma.c b/net/rds/rdma.c index fba82d36593a..a4e3c5de998b 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, kfree(sg); } ret = PTR_ERR(trans_private); + /* Trigger connection so that its ready for the next retry */ + if (ret == -ENODEV) + rds_conn_connect_if_down(cp->cp_conn); goto out; } diff --git a/net/rds/send.c b/net/rds/send.c index 5e57a1581dc6..fa1640628b2f 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -1313,12 +1313,8 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len) /* Parse any control messages the user may have included. */ ret = rds_cmsg_send(rs, rm, msg, &allocated_mr, &vct); - if (ret) { - /* Trigger connection so that its ready for the next retry */ - if (ret == -EAGAIN) - rds_conn_connect_if_down(conn); + if (ret) goto out; - } if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) { printk_ratelimited(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n", -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] net/rds: fix WARNING in rds_conn_connect_if_down 2024-03-03 4:18 ` Edward Adam Davis @ 2024-03-04 17:07 ` Simon Horman 2024-03-05 0:12 ` Edward Adam Davis 2024-03-05 0:13 ` [PATCH V2] " Edward Adam Davis 0 siblings, 2 replies; 10+ messages in thread From: Simon Horman @ 2024-03-04 17:07 UTC (permalink / raw) To: Edward Adam Davis Cc: syzbot+d4faee732755bba9838e, allison.henderson, davem, edumazet, kuba, linux-kernel, linux-rdma, netdev, pabeni, rds-devel, santosh.shilimkar, syzkaller-bugs On Sun, Mar 03, 2024 at 12:18:57PM +0800, Edward Adam Davis wrote: > If connection isn't established yet, get_mr() will fail, trigger connection after > get_mr(). > > Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures") > Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com > Signed-off-by: Edward Adam Davis <eadavis@qq.com> > --- > net/rds/rdma.c | 3 +++ > net/rds/send.c | 6 +----- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/net/rds/rdma.c b/net/rds/rdma.c > index fba82d36593a..a4e3c5de998b 100644 > --- a/net/rds/rdma.c > +++ b/net/rds/rdma.c > @@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, > kfree(sg); > } > ret = PTR_ERR(trans_private); > + /* Trigger connection so that its ready for the next retry */ > + if (ret == -ENODEV) > + rds_conn_connect_if_down(cp->cp_conn); Hi Edward, Elsewhere in this function it is assumed that cp may be NULL. Does that need to be taken into account here too? Flagged by Smatch. > goto out; > } > > diff --git a/net/rds/send.c b/net/rds/send.c > index 5e57a1581dc6..fa1640628b2f 100644 > --- a/net/rds/send.c > +++ b/net/rds/send.c > @@ -1313,12 +1313,8 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len) > > /* Parse any control messages the user may have included. */ > ret = rds_cmsg_send(rs, rm, msg, &allocated_mr, &vct); > - if (ret) { > - /* Trigger connection so that its ready for the next retry */ > - if (ret == -EAGAIN) > - rds_conn_connect_if_down(conn); > + if (ret) nit: checkpatch warns that there is a trailing space on the line above. > goto out; > - } > > if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) { > printk_ratelimited(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n", -- pw-bot: changes-requested ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net/rds: fix WARNING in rds_conn_connect_if_down 2024-03-04 17:07 ` Simon Horman @ 2024-03-05 0:12 ` Edward Adam Davis 2024-03-05 12:20 ` Simon Horman 2024-03-05 0:13 ` [PATCH V2] " Edward Adam Davis 1 sibling, 1 reply; 10+ messages in thread From: Edward Adam Davis @ 2024-03-05 0:12 UTC (permalink / raw) To: horms Cc: allison.henderson, davem, eadavis, edumazet, kuba, linux-kernel, linux-rdma, netdev, pabeni, rds-devel, santosh.shilimkar, syzbot+d4faee732755bba9838e, syzkaller-bugs On Mon, 4 Mar 2024 17:07:07 +0000, Simon Horman wrote: > > If connection isn't established yet, get_mr() will fail, trigger connection after > > get_mr(). > > > > Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures") > > Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com > > Signed-off-by: Edward Adam Davis <eadavis@qq.com> > > --- > > net/rds/rdma.c | 3 +++ > > net/rds/send.c | 6 +----- > > 2 files changed, 4 insertions(+), 5 deletions(-) > > > > diff --git a/net/rds/rdma.c b/net/rds/rdma.c > > index fba82d36593a..a4e3c5de998b 100644 > > --- a/net/rds/rdma.c > > +++ b/net/rds/rdma.c > > @@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, > > kfree(sg); > > } > > ret = PTR_ERR(trans_private); > > + /* Trigger connection so that its ready for the next retry */ > > + if (ret == -ENODEV) > > + rds_conn_connect_if_down(cp->cp_conn); > > Hi Edward, > > Elsewhere in this function it is assumed that cp may be NULL. > Does that need to be taken into account here too? Don't worry about this, if it is NULL, the get_mr() return value will not be -ENODEV. > > Flagged by Smatch. > > > goto out; > > } > > > > diff --git a/net/rds/send.c b/net/rds/send.c > > index 5e57a1581dc6..fa1640628b2f 100644 > > --- a/net/rds/send.c > > +++ b/net/rds/send.c > > @@ -1313,12 +1313,8 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len) > > > > /* Parse any control messages the user may have included. */ > > ret = rds_cmsg_send(rs, rm, msg, &allocated_mr, &vct); > > - if (ret) { > > - /* Trigger connection so that its ready for the next retry */ > > - if (ret == -EAGAIN) > > - rds_conn_connect_if_down(conn); > > + if (ret) > > nit: checkpatch warns that there is a trailing space on the line above. I will send a V2 version patch to correct this warning. BR, Edward ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net/rds: fix WARNING in rds_conn_connect_if_down 2024-03-05 0:12 ` Edward Adam Davis @ 2024-03-05 12:20 ` Simon Horman 0 siblings, 0 replies; 10+ messages in thread From: Simon Horman @ 2024-03-05 12:20 UTC (permalink / raw) To: Edward Adam Davis Cc: allison.henderson, davem, edumazet, kuba, linux-kernel, linux-rdma, netdev, pabeni, rds-devel, santosh.shilimkar, syzbot+d4faee732755bba9838e, syzkaller-bugs On Tue, Mar 05, 2024 at 08:12:03AM +0800, Edward Adam Davis wrote: > On Mon, 4 Mar 2024 17:07:07 +0000, Simon Horman wrote: > > > If connection isn't established yet, get_mr() will fail, trigger connection after > > > get_mr(). > > > > > > Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures") > > > Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com > > > Signed-off-by: Edward Adam Davis <eadavis@qq.com> > > > --- > > > net/rds/rdma.c | 3 +++ > > > net/rds/send.c | 6 +----- > > > 2 files changed, 4 insertions(+), 5 deletions(-) > > > > > > diff --git a/net/rds/rdma.c b/net/rds/rdma.c > > > index fba82d36593a..a4e3c5de998b 100644 > > > --- a/net/rds/rdma.c > > > +++ b/net/rds/rdma.c > > > @@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, > > > kfree(sg); > > > } > > > ret = PTR_ERR(trans_private); > > > + /* Trigger connection so that its ready for the next retry */ > > > + if (ret == -ENODEV) > > > + rds_conn_connect_if_down(cp->cp_conn); > > > > Hi Edward, > > > > Elsewhere in this function it is assumed that cp may be NULL. > > Does that need to be taken into account here too? > Don't worry about this, if it is NULL, the get_mr() return value will not be -ENODEV. Thanks, understood. ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH V2] net/rds: fix WARNING in rds_conn_connect_if_down 2024-03-04 17:07 ` Simon Horman 2024-03-05 0:12 ` Edward Adam Davis @ 2024-03-05 0:13 ` Edward Adam Davis 2024-03-06 12:00 ` patchwork-bot+netdevbpf 1 sibling, 1 reply; 10+ messages in thread From: Edward Adam Davis @ 2024-03-05 0:13 UTC (permalink / raw) To: horms Cc: allison.henderson, davem, eadavis, edumazet, kuba, linux-kernel, linux-rdma, netdev, pabeni, rds-devel, santosh.shilimkar, syzbot+d4faee732755bba9838e, syzkaller-bugs If connection isn't established yet, get_mr() will fail, trigger connection after get_mr(). Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures") Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis <eadavis@qq.com> --- net/rds/rdma.c | 3 +++ net/rds/send.c | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/net/rds/rdma.c b/net/rds/rdma.c index fba82d36593a..a4e3c5de998b 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, kfree(sg); } ret = PTR_ERR(trans_private); + /* Trigger connection so that its ready for the next retry */ + if (ret == -ENODEV) + rds_conn_connect_if_down(cp->cp_conn); goto out; } diff --git a/net/rds/send.c b/net/rds/send.c index 5e57a1581dc6..fa1640628b2f 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -1313,12 +1313,8 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len) /* Parse any control messages the user may have included. */ ret = rds_cmsg_send(rs, rm, msg, &allocated_mr, &vct); - if (ret) { - /* Trigger connection so that its ready for the next retry */ - if (ret == -EAGAIN) - rds_conn_connect_if_down(conn); + if (ret) goto out; - } if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) { printk_ratelimited(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n", -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH V2] net/rds: fix WARNING in rds_conn_connect_if_down 2024-03-05 0:13 ` [PATCH V2] " Edward Adam Davis @ 2024-03-06 12:00 ` patchwork-bot+netdevbpf 0 siblings, 0 replies; 10+ messages in thread From: patchwork-bot+netdevbpf @ 2024-03-06 12:00 UTC (permalink / raw) To: Edward Adam Davis Cc: horms, allison.henderson, davem, edumazet, kuba, linux-kernel, linux-rdma, netdev, pabeni, rds-devel, santosh.shilimkar, syzbot+d4faee732755bba9838e, syzkaller-bugs Hello: This patch was applied to netdev/net.git (main) by David S. Miller <davem@davemloft.net>: On Tue, 5 Mar 2024 08:13:08 +0800 you wrote: > If connection isn't established yet, get_mr() will fail, trigger connection after > get_mr(). > > Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures") > Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com > Signed-off-by: Edward Adam Davis <eadavis@qq.com> > > [...] Here is the summary with links: - [V2] net/rds: fix WARNING in rds_conn_connect_if_down https://git.kernel.org/netdev/net/c/c055fc00c07b You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-03-06 12:00 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-04-11 20:53 [syzbot] [rds?] WARNING in rds_conn_connect_if_down syzbot 2024-02-27 14:58 ` syzbot 2024-02-27 22:41 ` Allison Henderson 2024-03-03 3:57 ` [PATCH] net/rds: fix " Edward Adam Davis 2024-03-03 4:18 ` Edward Adam Davis 2024-03-04 17:07 ` Simon Horman 2024-03-05 0:12 ` Edward Adam Davis 2024-03-05 12:20 ` Simon Horman 2024-03-05 0:13 ` [PATCH V2] " Edward Adam Davis 2024-03-06 12:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).