Skip to content

multiple DTS fixes + CI adjustment - #88

Merged
digetx merged 10 commits into
grate-driver:masterfrom
okias:for_grate
Sep 30, 2021
Merged

digetx merged 10 commits into
grate-driver:masterfrom
okias:for_grate

Conversation

@okias

@okias okias commented Sep 30, 2021

Copy link
Copy Markdown
Contributor

No description provided.

@okias okias changed the title multiple fixes + CI adjustment multiple DTS fixes + CI adjustment Sep 30, 2021
* LCD SuperIPS+ Full HD panel.
*/
display-panel@1 {
panel@1 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fix a warning? A500, N7 and all other transformers use display-panel name, they should also produce the warning then, shouldn't they?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't fix directly any warning, but since nodes containing display panel are usually named panel@ I renamed the node to match that schematic. I could keep it as display-panel and alter yaml Doc to reflect that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, no need to change it.

WARNING: DT compatible string vendor "pegatron" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.yaml
Signed-off-by: David Heidelberg <[email protected]>
Fixes warning:
 arch/arm/boot/dts/tegra20-glide.dt.yaml: max8922-charger: otg-vbus: {'phandle': [[87]]} is not of type 'array'
	From schema: /home/runner/work/linux/linux/Documentation/devicetree/bindings/power/supply/maxim,max8903.yaml

Signed-off-by: David Heidelberg <[email protected]>
@digetx

digetx commented Sep 30, 2021

Copy link
Copy Markdown
Member

Thanks!

@digetx
digetx merged commit 356a566 into grate-driver:master Sep 30, 2021
@okias
okias deleted the for_grate branch October 1, 2021 05:49
digetx pushed a commit that referenced this pull request Oct 22, 2021
The perf_buffer fails on system with offline cpus:

  # test_progs -t perf_buffer
  serial_test_perf_buffer:PASS:nr_cpus 0 nsec
  serial_test_perf_buffer:PASS:nr_on_cpus 0 nsec
  serial_test_perf_buffer:PASS:skel_load 0 nsec
  serial_test_perf_buffer:PASS:attach_kprobe 0 nsec
  serial_test_perf_buffer:PASS:perf_buf__new 0 nsec
  serial_test_perf_buffer:PASS:epoll_fd 0 nsec
  skipping offline CPU #4
  serial_test_perf_buffer:PASS:perf_buffer__poll 0 nsec
  serial_test_perf_buffer:PASS:seen_cpu_cnt 0 nsec
  serial_test_perf_buffer:PASS:buf_cnt 0 nsec
  ...
  serial_test_perf_buffer:PASS:fd_check 0 nsec
  serial_test_perf_buffer:PASS:drain_buf 0 nsec
  serial_test_perf_buffer:PASS:consume_buf 0 nsec
  serial_test_perf_buffer:FAIL:cpu_seen cpu 5 not seen
  #88 perf_buffer:FAIL
  Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED

If the offline cpu is from the middle of the possible set,
we get mismatch with possible and online cpu buffers.

The perf buffer test calls perf_buffer__consume_buffer for
all 'possible' cpus, but the library holds only 'online'
cpu buffers and perf_buffer__consume_buffer returns them
based on index.

Adding extra (online) index to keep track of online buffers,
we need the original (possible) index to trigger trace on
proper cpu.

Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
digetx pushed a commit that referenced this pull request Nov 30, 2021
I got issue as follows:
[ 567.094140] __io_remove_buffers: [1]start ctx=0xffff8881067bf000 bgid=65533 buf=0xffff8881fefe1680
[  594.360799] watchdog: BUG: soft lockup - CPU#2 stuck for 26s! [kworker/u32:5:108]
[  594.364987] Modules linked in:
[  594.365405] irq event stamp: 604180238
[  594.365906] hardirqs last  enabled at (604180237): [<ffffffff93fec9bd>] _raw_spin_unlock_irqrestore+0x2d/0x50
[  594.367181] hardirqs last disabled at (604180238): [<ffffffff93fbbadb>] sysvec_apic_timer_interrupt+0xb/0xc0
[  594.368420] softirqs last  enabled at (569080666): [<ffffffff94200654>] __do_softirq+0x654/0xa9e
[  594.369551] softirqs last disabled at (569080575): [<ffffffff913e1d6a>] irq_exit_rcu+0x1ca/0x250
[  594.370692] CPU: 2 PID: 108 Comm: kworker/u32:5 Tainted: G            L    5.15.0-next-20211112+ #88
[  594.371891] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014
[  594.373604] Workqueue: events_unbound io_ring_exit_work
[  594.374303] RIP: 0010:_raw_spin_unlock_irqrestore+0x33/0x50
[  594.375037] Code: 48 83 c7 18 53 48 89 f3 48 8b 74 24 10 e8 55 f5 55 fd 48 89 ef e8 ed a7 56 fd 80 e7 02 74 06 e8 43 13 7b fd fb bf 01 00 00 00 <e8> f8 78 474
[  594.377433] RSP: 0018:ffff888101587a70 EFLAGS: 00000202
[  594.378120] RAX: 0000000024030f0d RBX: 0000000000000246 RCX: 1ffffffff2f09106
[  594.379053] RDX: 0000000000000000 RSI: ffffffff9449f0e0 RDI: 0000000000000001
[  594.379991] RBP: ffffffff9586cdc0 R08: 0000000000000001 R09: fffffbfff2effcab
[  594.380923] R10: ffffffff977fe557 R11: fffffbfff2effcaa R12: ffff8881b8f3def0
[  594.381858] R13: 0000000000000246 R14: ffff888153a8b070 R15: 0000000000000000
[  594.382787] FS:  0000000000000000(0000) GS:ffff888399c00000(0000) knlGS:0000000000000000
[  594.383851] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  594.384602] CR2: 00007fcbe71d2000 CR3: 00000000b4216000 CR4: 00000000000006e0
[  594.385540] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  594.386474] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  594.387403] Call Trace:
[  594.387738]  <TASK>
[  594.388042]  find_and_remove_object+0x118/0x160
[  594.389321]  delete_object_full+0xc/0x20
[  594.389852]  kfree+0x193/0x470
[  594.390275]  __io_remove_buffers.part.0+0xed/0x147
[  594.390931]  io_ring_ctx_free+0x342/0x6a2
[  594.392159]  io_ring_exit_work+0x41e/0x486
[  594.396419]  process_one_work+0x906/0x15a0
[  594.399185]  worker_thread+0x8b/0xd80
[  594.400259]  kthread+0x3bf/0x4a0
[  594.401847]  ret_from_fork+0x22/0x30
[  594.402343]  </TASK>

Message from syslogd@localhost at Nov 13 09:09:54 ...
kernel:watchdog: BUG: soft lockup - CPU#2 stuck for 26s! [kworker/u32:5:108]
[  596.793660] __io_remove_buffers: [2099199]start ctx=0xffff8881067bf000 bgid=65533 buf=0xffff8881fefe1680

We can reproduce this issue by follow syzkaller log:
r0 = syz_io_uring_setup(0x401, &(0x7f0000000300), &(0x7f0000003000/0x2000)=nil, &(0x7f0000ff8000/0x4000)=nil, &(0x7f0000000280)=<r1=>0x0, &(0x7f0000000380)=<r2=>0x0)
sendmsg$ETHTOOL_MSG_FEATURES_SET(0xffffffffffffffff, &(0x7f0000003080)={0x0, 0x0, &(0x7f0000003040)={&(0x7f0000000040)=ANY=[], 0x18}}, 0x0)
syz_io_uring_submit(r1, r2, &(0x7f0000000240)=@IORING_OP_PROVIDE_BUFFERS={0x1f, 0x5, 0x0, 0x401, 0x1, 0x0, 0x100, 0x0, 0x1, {0xfffd}}, 0x0)
io_uring_enter(r0, 0x3a2d, 0x0, 0x0, 0x0, 0x0)

The reason above issue  is 'buf->list' has 2,100,000 nodes, occupied cpu lead
to soft lockup.
To solve this issue, we need add schedule point when do while loop in
'__io_remove_buffers'.
After add  schedule point we do regression, get follow data.
[  240.141864] __io_remove_buffers: [1]start ctx=0xffff888170603000 bgid=65533 buf=0xffff8881116fcb00
[  268.408260] __io_remove_buffers: [1]start ctx=0xffff8881b92d2000 bgid=65533 buf=0xffff888130c83180
[  275.899234] __io_remove_buffers: [2099199]start ctx=0xffff888170603000 bgid=65533 buf=0xffff8881116fcb00
[  296.741404] __io_remove_buffers: [1]start ctx=0xffff8881b659c000 bgid=65533 buf=0xffff8881010fe380
[  305.090059] __io_remove_buffers: [2099199]start ctx=0xffff8881b92d2000 bgid=65533 buf=0xffff888130c83180
[  325.415746] __io_remove_buffers: [1]start ctx=0xffff8881b92d1000 bgid=65533 buf=0xffff8881a17d8f00
[  333.160318] __io_remove_buffers: [2099199]start ctx=0xffff8881b659c000 bgid=65533 buf=0xffff8881010fe380
...

Fixes:8bab4c09f24e("io_uring: allow conditional reschedule for intensive iterators")
Signed-off-by: Ye Bin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
okias pushed a commit to okias/linux that referenced this pull request Feb 6, 2022
[ Upstream commit db52f57 ]

Branch data available to BPF programs can be very useful to get stack traces
out of userspace application.

Commit fff7b64 ("bpf: Add bpf_read_branch_records() helper") added BPF
support to capture branch records in x86. Enable this feature also for other
architectures as well by removing checks specific to x86.

If an architecture doesn't support branch records, bpf_read_branch_records()
still has appropriate checks and it will return an -EINVAL in that scenario.
Based on UAPI helper doc in include/uapi/linux/bpf.h, unsupported architectures
should return -ENOENT in such case. Hence, update the appropriate check to
return -ENOENT instead.

Selftest 'perf_branches' result on power9 machine which has the branch stacks
support:

 - Before this patch:

  [command]# ./test_progs -t perf_branches
   grate-driver#88/1 perf_branches/perf_branches_hw:FAIL
   grate-driver#88/2 perf_branches/perf_branches_no_hw:OK
   grate-driver#88 perf_branches:FAIL
  Summary: 0/1 PASSED, 0 SKIPPED, 1 FAILED

 - After this patch:

  [command]# ./test_progs -t perf_branches
   grate-driver#88/1 perf_branches/perf_branches_hw:OK
   grate-driver#88/2 perf_branches/perf_branches_no_hw:OK
   grate-driver#88 perf_branches:OK
  Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED

Selftest 'perf_branches' result on power9 machine which doesn't have branch
stack report:

 - After this patch:

  [command]# ./test_progs -t perf_branches
   grate-driver#88/1 perf_branches/perf_branches_hw:SKIP
   grate-driver#88/2 perf_branches/perf_branches_no_hw:OK
   grate-driver#88 perf_branches:OK
  Summary: 1/1 PASSED, 1 SKIPPED, 0 FAILED

Fixes: fff7b64 ("bpf: Add bpf_read_branch_records() helper")
Suggested-by: Peter Zijlstra <[email protected]>
Signed-off-by: Kajol Jain <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
okias pushed a commit to okias/linux that referenced this pull request Sep 27, 2026
On the rdma_accept_failed error path of
smbdirect_accept_connect_request(), the receive io posted just above is
owned by the QP (recv_io is set to NULL after a successful post).  The
error path fell through to smbdirect_connection_destroy_mem_pools()
before smbdirect_connection_destroy_qp(), so the mem pools and the
recv_io slab cache were destroyed while that recv_io was still
outstanding on the QP.

The drain in smbdirect_connection_destroy_qp() (ib_drain_qp()) is what
runs the recv completion that returns the recv_io to the free list, so
destroying the pools first leaves the object outstanding at
kmem_cache_destroy() time ("Slab cache still has objects") and later
frees it into an already-destroyed mempool (mempool_free_bulk
NULL-pointer dereference).

Give rdma_accept_failed its own teardown that drains the QP first, then
destroys the mem pools, and returns.  The remaining labels
(post_recv_io_failed onward) run before the recv_io was ever posted, so
they keep the mem-pools-then-qp order.

The outstanding recv_io at kmem_cache_destroy() time:

[ 3487.344647] =============================================================================
[ 3487.349942] BUG smbdirect_recv_io_cache_ffff88811ba99000 (Not tainted): Objects remaining on __kmem_cache_shutdown()
[ 3487.356078] -----------------------------------------------------------------------------
[ 3487.356078]
[ 3487.356738] Object 0xffff8881511c3440 @offset=13376
[ 3487.358464] Allocated in mempool_alloc_noprof+0x18c/0x290 age=1194 cpu=6 pid=22254
[ 3487.361197]  mempool_alloc_noprof+0x18c/0x290
[ 3487.361542]  smbdirect_connection_create_mem_pools+0x405/0x780
[ 3487.361972]  smbdirect_accept_connect_request+0x5a8/0x1b80
[ 3487.362359]  smbdirect_listen_rdma_event_handler+0x1579/0x1b90
[ 3487.362779]  cma_cm_event_handler+0x9c/0x230
[ 3487.363096]  cma_ib_req_handler+0x2682/0x45d0
[ 3487.363414]  cm_process_work+0x56/0x3d0
[ 3487.363676]  cm_work_handler+0x8a0e/0xd000
[ 3487.367496]  process_scheduled_works+0xa07/0x13a0
[ 3487.367859]  worker_thread+0x7c9/0xc80
[ 3487.368148]  kthread+0x341/0x430
[ 3487.368407]  ret_from_fork+0x3a8/0x7a0
[ 3487.368704]  ret_from_fork_asm+0x1a/0x30
[ 3487.370307] Slab 0xffffea0005447000 objects=19 used=1 fp=0xffff8881511c0040 flags=0x100000000000240(workingset|head|node=0|zone=2)
[ 3487.372840] ------------[ cut here ]------------
[ 3487.373195] WARNING: mm/slub.c:1244 at __slab_err+0x1a/0x30, CPU#6: kworker/6:84/22254
[ 3487.373759] Modules linked in:
[ 3487.373993] CPU: 6 UID: 0 PID: 22254 Comm: kworker/6:84 Tainted: G    B               7.1.0-next-20260623+ grate-driver#88 PREEMPT(lazy)
[ 3487.374778] Tainted: [B]=BAD_PAGE
[ 3487.377830] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014
[ 3487.378515] Workqueue: ib_cm cm_work_handler
[ 3487.378820] RIP: 0010:__slab_err+0x1a/0x30
[ 3487.379129] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 e8 36 00 00 00 bf 05 00 00 00 be 01 00 00 00 e8 f7 75 45 00 90 <0f> 0b 90 c3 cc cc cc cc cc 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
[ 3487.383255] RSP: 0018:ffff888220fc7050 EFLAGS: 00010093
[ 3487.383643] RAX: ffffffff8168e60a RBX: ffff88810955e640 RCX: ffff88821c381d80
[ 3487.384158] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff870fa080
[ 3487.384662] RBP: ffff888220fc7068 R08: ffffffff870fa087 R09: 1ffffffff0e1f410
[ 3487.385192] R10: dffffc0000000000 R11: fffffbfff0e1f411 R12: ffffea0005447210
[ 3487.385674] R13: ffffea0005447000 R14: ffff888220fc7068 R15: ffff88812a8ab300
[ 3487.388932] FS:  0000000000000000(0000) GS:ffff888427e76000(0000) knlGS:0000000000000000
[ 3487.389529] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3487.389934] CR2: 00007ffcf2d84fd8 CR3: 0000000111d64006 CR4: 0000000000f72ef0
[ 3487.390440] PKRU: 55555554
[ 3487.390641] Call Trace:
[ 3487.390826]  <TASK>
[ 3487.391209]  __kmem_cache_shutdown+0x1aa/0x2b0
[ 3487.392062]  ? smbdirect_connection_destroy_mem_pools+0x239/0x300
[ 3487.393565]  kmem_cache_destroy+0x9d/0x180
[ 3487.398663]  smbdirect_connection_destroy_mem_pools+0x239/0x300
[ 3487.403534]  ? __pfx_smb_direct_logging_needed+0x10/0x10
[ 3487.407562]  smbdirect_accept_connect_request+0x95c/0x1b80
[ 3487.412391]  ? __pfx_smbdirect_accept_connect_request+0x10/0x10
[ 3487.416753]  ? do_raw_spin_lock+0x130/0x300
[ 3487.420623]  ? smbdirect_socket_set_initial_parameters+0x28b/0x6a0
[ 3487.424322]  ? lock_acquire+0x4c/0x270
[ 3487.424409] ksmbd: can't change a file to a directory
[ 3487.426321]  ? trace_irq_enable+0x36/0x120
[ 3487.429144]  smbdirect_listen_rdma_event_handler+0x1579/0x1b90
[ 3487.432606]  ? __pfx_smbdirect_listen_rdma_event_handler+0x10/0x10
[ 3487.433595]  ? trace_cm_event_handler+0x51/0x170
[ 3487.435183]  ? __pfx_smbdirect_listen_rdma_event_handler+0x10/0x10
[ 3487.435646]  ? cma_listen_handler+0xf6/0x150
[ 3487.435975]  cma_cm_event_handler+0x9c/0x230
[ 3487.436288]  cma_ib_req_handler+0x2682/0x45d0
[ 3487.439039]  ? __pfx_cma_ib_req_handler+0x10/0x10
[ 3487.439540]  ? __pfx_roce_resolve_route_from_path+0x10/0x10
[ 3487.439972]  ? stack_depot_save_flags+0x34/0x840
[ 3487.440374]  ? __xas_nomem+0xa9/0x410
[ 3487.443356]  ? xas_clear_mark+0x26c/0x4a0
[ 3487.443673]  cm_process_work+0x56/0x3d0
[ 3487.443969]  ? _raw_spin_unlock_irq+0x28/0x50
[ 3487.444317]  cm_work_handler+0x8a0e/0xd000
[ 3487.444624]  ? __pfx_cm_work_handler+0x10/0x10
[ 3487.444971]  ? pwq_dec_nr_in_flight+0xa73/0xdf0
[ 3487.445344]  ? __pfx_pwq_dec_nr_in_flight+0x10/0x10
[ 3487.445737]  ? lock_acquire+0x4c/0x270
[ 3487.448833]  ? process_scheduled_works+0x995/0x13a0
[ 3487.449230]  ? process_scheduled_works+0x995/0x13a0
[ 3487.449588]  process_scheduled_works+0xa07/0x13a0
[ 3487.449938]  ? __pfx_process_scheduled_works+0x10/0x10
[ 3487.450334]  ? do_raw_spin_lock+0x130/0x300
[ 3487.450639]  ? assign_work+0x3bb/0x5c0
[ 3487.450916]  worker_thread+0x7c9/0xc80
[ 3487.451211]  kthread+0x341/0x430
[ 3487.451453]  ? __pfx_worker_thread+0x10/0x10
[ 3487.451756]  ? __pfx_kthread+0x10/0x10
[ 3487.454814]  ret_from_fork+0x3a8/0x7a0
[ 3487.455114]  ? __pfx_ret_from_fork+0x10/0x10
[ 3487.455450]  ? __switch_to+0xb76/0x1110
[ 3487.455772]  ? __pfx_kthread+0x10/0x10
[ 3487.456081]  ret_from_fork_asm+0x1a/0x30
[ 3487.456384]  </TASK>
[ 3487.456549] irq event stamp: 0
[ 3487.456767] hardirqs last  enabled at (0): [<0000000000000000>] 0x0
[ 3487.460124] hardirqs last disabled at (0): [<ffffffff81684648>] copy_process+0xa08/0x3a10
[ 3487.460726] softirqs last  enabled at (0): [<ffffffff81684648>] copy_process+0xa08/0x3a10
[ 3487.461328] softirqs last disabled at (0): [<0000000000000000>] 0x0
[ 3487.461778] ---[ end trace 0000000000000000 ]---
[ 3487.543875] ksmbd: can't change a file to a directory
[ 3487.599675] ksmbd: can't change a file to a directory
[ 3487.626694] ksmbd: can't change a file to a directory
[ 3487.824687] ksmbd: can't change a file to a directory
[ 3487.871840] ksmbd: can't change a file to a directory
[ 3487.986207] ------------[ cut here ]------------
[ 3487.987157] kmem_cache_destroy smbdirect_recv_io_cache_ffff88811ba99000: Slab cache still has objects when called from smbdirect_connection_destroy_mem_pools+0x239/0x300
[ 3487.987183] WARNING: mm/slab_common.c:572 at kmem_cache_destroy+0x15c/0x180, CPU#6: kworker/6:84/22254
[ 3487.999821] Modules linked in:
[ 3488.001902] CPU: 6 UID: 0 PID: 22254 Comm: kworker/6:84 Tainted: G    B   W           7.1.0-next-20260623+ grate-driver#88 PREEMPT(lazy)
[ 3488.008289] Tainted: [B]=BAD_PAGE, [W]=WARN
[ 3488.010459] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014
[ 3488.014502] Workqueue: ib_cm cm_work_handler
[ 3488.017790] RIP: 0010:kmem_cache_destroy+0x16a/0x180
[ 3488.020662] Code: fd ff 48 8b 3d 2f c0 9c 06 48 89 de 5b 41 5e 5d e9 5b a3 0e 00 48 8d 3d a4 07 12 04 48 8b 53 58 48 c7 c6 91 9d 3e 85 4c 89 f1 <67> 48 0f b9 3a e9 33 ff ff ff 66 66 66 2e 0f 1f 84 00 00 00 00 00
[ 3488.028077] RSP: 0018:ffff888220fc70b8 EFLAGS: 00010202
[ 3488.032038] RAX: 0000000000000001 RBX: ffff88810955e640 RCX: ffffffff822bc079
[ 3488.035742] RDX: ffff88812404ec40 RSI: ffffffff853e9d91 RDI: ffffffff85f7ac50
[ 3488.037830] RBP: 0000000000000001 R08: ffff8883aef3e843 R09: 1ffff11075de7d08
[ 3488.041076] R10: dffffc0000000000 R11: ffffed1075de7d09 R12: 1ffff11024fa6c3c
[ 3488.045376] R13: ffff888127d361e8 R14: ffffffff822bc079 R15: ffff88811ba99538
[ 3488.049073] FS:  0000000000000000(0000) GS:ffff888427e76000(0000) knlGS:0000000000000000
[ 3488.052515] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3488.054934] CR2: 00007ffcf2d84fd8 CR3: 0000000111d64006 CR4: 0000000000f72ef0
[ 3488.058529] PKRU: 55555554
[ 3488.060542] Call Trace:
[ 3488.061595]  <TASK>
[ 3488.062006]  smbdirect_connection_destroy_mem_pools+0x239/0x300
[ 3488.066041]  ? __pfx_smb_direct_logging_needed+0x10/0x10
[ 3488.068620]  smbdirect_accept_connect_request+0x95c/0x1b80
[ 3488.071594]  ? __pfx_smbdirect_accept_connect_request+0x10/0x10
[ 3488.073218] ksmbd: not allow base filename in rename
[ 3488.074751]  ? do_raw_spin_lock+0x130/0x300
[ 3488.076792] ksmbd: can't change a file to a directory
[ 3488.077942]  ? smbdirect_socket_set_initial_parameters+0x28b/0x6a0
[ 3488.080143]  ? lock_acquire+0x4c/0x270
[ 3488.080747]  ? trace_irq_enable+0x36/0x120
[ 3488.081400]  smbdirect_listen_rdma_event_handler+0x1579/0x1b90
[ 3488.085089]  ? __pfx_smbdirect_listen_rdma_event_handler+0x10/0x10
[ 3488.089333]  ? trace_cm_event_handler+0x51/0x170
[ 3488.092637]  ? __pfx_smbdirect_listen_rdma_event_handler+0x10/0x10
[ 3488.095741]  ? cma_listen_handler+0xf6/0x150
[ 3488.099638]  cma_cm_event_handler+0x9c/0x230
[ 3488.101552]  cma_ib_req_handler+0x2682/0x45d0
[ 3488.104571]  ? __pfx_cma_ib_req_handler+0x10/0x10
[ 3488.106790]  ? __pfx_roce_resolve_route_from_path+0x10/0x10
[ 3488.109799]  ? stack_depot_save_flags+0x34/0x840
[ 3488.112174]  ? __xas_nomem+0xa9/0x410
[ 3488.114217]  ? xas_clear_mark+0x26c/0x4a0
[ 3488.116854]  cm_process_work+0x56/0x3d0
[ 3488.118179]  ? _raw_spin_unlock_irq+0x28/0x50
[ 3488.120034]  cm_work_handler+0x8a0e/0xd000
[ 3488.121677]  ? __pfx_cm_work_handler+0x10/0x10
[ 3488.123682]  ? pwq_dec_nr_in_flight+0xa73/0xdf0
[ 3488.126928]  ? __pfx_pwq_dec_nr_in_flight+0x10/0x10
[ 3488.129390]  ? lock_acquire+0x4c/0x270
[ 3488.131432]  ? process_scheduled_works+0x995/0x13a0
[ 3488.132694] ksmbd: can't change a file to a directory
[ 3488.136702]  ? process_scheduled_works+0x995/0x13a0
[ 3488.140060]  process_scheduled_works+0xa07/0x13a0
[ 3488.143379]  ? __pfx_process_scheduled_works+0x10/0x10
[ 3488.147221]  ? do_raw_spin_lock+0x130/0x300
[ 3488.150790]  ? assign_work+0x3bb/0x5c0
[ 3488.154259]  worker_thread+0x7c9/0xc80
[ 3488.155730]  kthread+0x341/0x430
[ 3488.158309]  ? __pfx_worker_thread+0x10/0x10
[ 3488.160865]  ? __pfx_kthread+0x10/0x10
[ 3488.164384]  ret_from_fork+0x3a8/0x7a0
[ 3488.167020]  ? __pfx_ret_from_fork+0x10/0x10
[ 3488.170050]  ? __switch_to+0xb76/0x1110
[ 3488.171809]  ? __pfx_kthread+0x10/0x10
[ 3488.174955]  ret_from_fork_asm+0x1a/0x30
[ 3488.175605]  </TASK>
[ 3488.176206] irq event stamp: 0
[ 3488.179360] hardirqs last  enabled at (0): [<0000000000000000>] 0x0
[ 3488.186521] hardirqs last disabled at (0): [<ffffffff81684648>] copy_process+0xa08/0x3a10
[ 3488.191889] softirqs last  enabled at (0): [<ffffffff81684648>] copy_process+0xa08/0x3a10
[ 3488.196853] softirqs last disabled at (0): [<0000000000000000>] 0x0
[ 3488.200870] ---[ end trace 0000000000000000 ]---

Found with ksmbdzzer [2], a KSMBD fuzzer that drives libFuzzer with a
kcov-dataflow [1] coverage vector: it folds each instrumented
comparison/argument's runtime operand value together with its PC (the
default arm mixes them as pc⊕val) so that a new operand value at a known
site counts as new coverage.

[1] https://lwn.net/Articles/1077606/
[2] https://github.com/yskzalloc/kcov-dataflow

Fixes: eb3ed1e ("smb: smbdirect: introduce smbdirect_accept_connect_request()")
Signed-off-by: Yunseong Kim <[email protected]>
Acked-by: Stefan Metzmacher <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants