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: [email protected]
------------[ 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 [email protected].
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
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: [email protected]
------------[ 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.
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: [email protected]
>
> ------------[ 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.
>
please test mp capable for rds
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
diff --git a/net/rds/recv.c b/net/rds/recv.c
index 5627f80013f8..142c289bcf6b 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -228,6 +228,7 @@ static void rds_recv_hs_exthdrs(struct rds_header *hdr,
}
/* if RDS_EXTHDR_NPATHS was not found, default to a single-path */
conn->c_npaths = max_t(int, conn->c_npaths, 1);
+ conn->c_trans->t_mp_capable = conn->c_npaths > 1 ? 1 : 0;
conn->c_ping_triggered = 0;
rds_conn_peer_gen_update(conn, new_peer_gen_num);
}
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in rds_conn_connect_if_down
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5694 at net/rds/connection.c:933 rds_conn_connect_if_down+0x95/0xb0 net/rds/connection.c:933
Modules linked in:
CPU: 1 PID: 5694 Comm: syz-executor.0 Not tainted 6.8.0-rc6-syzkaller-g5ad3cb0ed525-dirty #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:933
Code: 00 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 ee f8 43 f7 49 8b 3e 5b 41 5e 41 5f e9 f1 fa ff ff e8 2c db e1 f6 90 <0f> 0b 90 eb cb 89 d9 80 e1 07 38 c1 7c a9 48 89 df e8 35 f8 43 f7
RSP: 0018:ffffc900050c78a0 EFLAGS: 00010293
RAX: ffffffff8ab19224 RBX: 0000000000000002 RCX: ffff88807f89bb80
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000
RBP: ffffc900050c7ad0 R08: ffffffff8ab191eb R09: ffffffff8ab2b261
R10: 0000000000000002 R11: ffff88807f89bb80 R12: ffff8880218c2800
R13: ffff88802b6d9740 R14: ffff8880182f2000 R15: dffffc0000000000
FS: 00007f22049de6c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020d10000 CR3: 000000006ea98000 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:0x7f2204e7dda9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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:00007f22049de0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f2204fac120 RCX: 00007f2204e7dda9
RDX: 0000000000000000 RSI: 0000000020000800 RDI: 0000000000000003
RBP: 00007f2204eca47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f2204fac120 R15: 00007ffff6293078
</TASK>
Tested on:
commit: 5ad3cb0e Merge tag 'for-v6.8-rc2' of git://git.kernel...
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=120ebcf2180000
kernel config: https://syzkaller.appspot.com/x/.config?x=fad652894fc96962
dashboard link: https://syzkaller.appspot.com/bug?extid=d4faee732755bba9838e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=107427ac180000
please test mp capable for rds
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index fba82d36593a..7fe1a79bd63d 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -301,6 +301,10 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args,
kfree(sg);
}
ret = PTR_ERR(trans_private);
+ printk("ret: %d, %s\n", ret, __func__);
+ /* 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..9efda3283753 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -1314,9 +1314,6 @@ 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);
goto out;
}
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-and-tested-by: [email protected]
Tested on:
commit: 04b8076d Merge tag 'firewire-fixes-6.8-rc7' of git://g..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=133adc36180000
kernel config: https://syzkaller.appspot.com/x/.config?x=fad652894fc96962
dashboard link: https://syzkaller.appspot.com/bug?extid=d4faee732755bba9838e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=1429e874180000
Note: testing is done by a robot and is best-effort only.
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: [email protected]
Signed-off-by: Edward Adam Davis <[email protected]>
---
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
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: [email protected]
Signed-off-by: Edward Adam Davis <[email protected]>
---
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
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: [email protected]
> Signed-off-by: Edward Adam Davis <[email protected]>
> ---
> 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
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: [email protected]
Signed-off-by: Edward Adam Davis <[email protected]>
---
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
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: [email protected]
> > Signed-off-by: Edward Adam Davis <[email protected]>
> > ---
> > 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
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: [email protected]
> > > Signed-off-by: Edward Adam Davis <[email protected]>
> > > ---
> > > 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.
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
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: [email protected]
> Signed-off-by: Edward Adam Davis <[email protected]>
>
> [...]
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