Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

component bind crash #2

Closed
klogg opened this issue Dec 23, 2018 · 0 comments
Closed

component bind crash #2

klogg opened this issue Dec 23, 2018 · 0 comments

Comments

@klogg
Copy link
Owner

klogg commented Dec 23, 2018

  1. insmod both drivers
  2. rmmod it66121.ko
  3. insmod it66121.ko ---> crash
[   37.933763] i2c i2c-1: Detecting IT66121 at address 0x4C on usb-0000:00:05.0-1
[   38.008557] i2c i2c-1: IT66121 found, revision 1
[   38.009515] it66121 1-004c: Probing IT66121 client
[   38.010453] it66121 1-004c: Found bridge it66121
[   38.011403] usb 2-1: Binding FL2000 master component
[   38.014640] BUG: unable to handle kernel NULL pointer dereference at 0000000000000179
[   38.016248] PGD 0 P4D 0 
[   38.016778] Oops: 0000 [#1] SMP PTI
[   38.017492] CPU: 0 PID: 309 Comm: insmod Tainted: G           OE     4.18.0-13-generic #14-Ubuntu
[   38.019272] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-1ubuntu1 04/01/2014
[   38.020760] RIP: 0010:drm_dev_init+0x163/0x2f0 [drm]
[   38.021134] Code: 00 00 00 48 8b 05 85 f4 04 00 48 8b 78 08 e8 94 89 2f d7 49 89 c4 48 3d 00 f0 ff ff 0f 87 9b 00 00 00 48 89 43 58 48 8b 43 20 <f6> 80 79 01 00 00 80 74 14 be 02 00 00 00 48 89 df e8 57 fd ff ff 
[   38.022543] RSP: 0018:ffffa52c001ff7f0 EFLAGS: 00010283
[   38.022939] RAX: 0000000000000000 RBX: ffff9247c3dfd018 RCX: 0000000000000000
[   38.023473] RDX: 000000000e111300 RSI: 000000000e111300 RDI: 000000005c1ffe30
[   38.024005] RBP: ffffa52c001ff818 R08: 0000000000000000 R09: 0000000000000001
[   38.024538] R10: 00000000001fffff R11: 00000000ffffffff R12: ffff9247c469c980
[   38.025073] R13: ffff9247c405f0a0 R14: ffffffffc05851a0 R15: 0000000000000001
[   38.025606] FS:  00007feaee505b80(0000) GS:ffff9247c7a00000(0000) knlGS:0000000000000000
[   38.026210] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   38.026642] CR2: 0000000000000179 CR3: 0000000003cc8006 CR4: 0000000000360ef0
[   38.027178] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   38.027713] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   38.028246] Call Trace:
[   38.028437]  fl2000_bind+0x54/0x2b0 [fl2000]
[   38.028761]  try_to_bring_up_master+0x1d4/0x280
[   38.029103]  ? fl2000_bind+0x2b0/0x2b0 [fl2000]
[   38.029445]  component_add+0xa4/0x180
[   38.029725]  it66121_probe+0xb6/0xf0 [it66121]
[   38.030062]  i2c_device_probe+0x97/0x290
[   38.030361]  driver_probe_device+0x2e3/0x460
[   38.030684]  __device_attach_driver+0x97/0x100
[   38.031022]  ? __driver_attach+0x110/0x110
[   38.031334]  bus_for_each_drv+0x7b/0xc0
[   38.031626]  __device_attach+0xdd/0x160
[   38.031918]  device_initial_probe+0x13/0x20
[   38.032235]  bus_probe_device+0x95/0xa0
[   38.032527]  device_add+0x3a4/0x650
[   38.032793]  device_register+0x1a/0x20
[   38.033077]  i2c_new_device+0x168/0x360
[   38.033368]  i2c_detect+0x181/0x310
[   38.033635]  __process_new_driver+0x28/0x50
[   38.033951]  ? i2c_detect+0x310/0x310
[   38.034229]  bus_for_each_dev+0x74/0xb0
[   38.034519]  ? i2c_detect+0x310/0x310
[   38.034797]  i2c_for_each_dev+0x32/0x50
[   38.035090]  i2c_register_driver+0x5d/0x90
[   38.035400]  ? 0xffffffffc03e9000
[   38.035652]  it66121_driver_init+0x1c/0x1000 [it66121]
[   38.036040]  do_one_initcall+0x4a/0x1c4
[   38.036332]  ? free_pcp_prepare+0x4f/0xd0
[   38.036637]  ? _cond_resched+0x19/0x30
[   38.037002]  ? kmem_cache_alloc_trace+0xb8/0x1d0
[   38.037443]  ? do_init_module+0x27/0x220
[   38.037822]  do_init_module+0x60/0x220
[   38.038184]  load_module+0x14f4/0x1890
[   38.038547]  __do_sys_finit_module+0xbd/0x120
[   38.038967]  ? __do_sys_finit_module+0xbd/0x120
[   38.039401]  __x64_sys_finit_module+0x1a/0x20
[   38.039819]  do_syscall_64+0x5a/0x110
[   38.040173]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   38.040657] RIP: 0033:0x7feaee642219
[   38.041002] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 8b 0d 47 fc 0c 00 f7 d8 64 89 01 48 
[   38.042785] RSP: 002b:00007ffc9650f528 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   38.043510] RAX: ffffffffffffffda RBX: 0000555b537a07a0 RCX: 00007feaee642219
[   38.044189] RDX: 0000000000000000 RSI: 0000555b526b0338 RDI: 0000000000000003
[   38.044734] RBP: 0000555b526b0338 R08: 0000000000000000 R09: 00007feaee715000
[   38.045266] R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000
[   38.045810] R13: 0000555b537a0760 R14: 0000000000000000 R15: 0000000000000000
[   38.046333] Modules linked in: it66121(OE+) fl2000(OE) drm_kms_helper fb_sys_fops syscopyarea sysfillrect sysimgblt drm kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd cryptd glue_helper input_leds psmouse serio_raw i2c_piix4 pata_acpi mac_hid floppy qemu_fw_cfg 9pnet_virtio 9p 9pnet fscache [last unloaded: it66121]
[   38.048822] CR2: 0000000000000179
[   38.049075] ---[ end trace ca551b1c9b83ed08 ]---
[   38.049429] RIP: 0010:drm_dev_init+0x163/0x2f0 [drm]
[   38.049802] Code: 00 00 00 48 8b 05 85 f4 04 00 48 8b 78 08 e8 94 89 2f d7 49 89 c4 48 3d 00 f0 ff ff 0f 87 9b 00 00 00 48 89 43 58 48 8b 43 20 <f6> 80 79 01 00 00 80 74 14 be 02 00 00 00 48 89 df e8 57 fd ff ff 
[   38.051201] RSP: 0018:ffffa52c001ff7f0 EFLAGS: 00010283
[   38.051593] RAX: 0000000000000000 RBX: ffff9247c3dfd018 RCX: 0000000000000000
[   38.052124] RDX: 000000000e111300 RSI: 000000000e111300 RDI: 000000005c1ffe30
[   38.052655] RBP: ffffa52c001ff818 R08: 0000000000000000 R09: 0000000000000001
[   38.053186] R10: 00000000001fffff R11: 00000000ffffffff R12: ffff9247c469c980
[   38.053717] R13: ffff9247c405f0a0 R14: ffffffffc05851a0 R15: 0000000000000001
[   38.054247] FS:  00007feaee505b80(0000) GS:ffff9247c7a00000(0000) knlGS:0000000000000000
[   38.054848] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   38.055279] CR2: 0000000000000179 CR3: 0000000003cc8006 CR4: 0000000000360ef0
[   38.055811] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   38.056343] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
klogg added a commit that referenced this issue Jan 17, 2019
Big chunk of continued driver redesign
 - register definitions according to FL documentation
 - regmaps added for both FL2000 and IT66121
 - modules' resources (mostly) moved to devres
 - debugfs added for reg programming tests
 - added scripts for testing with virtme

WIP, successfully smoke-tested.
Issues detected are opened as issues in GitHub:
 #1 i2c detect crash
 #2 component bind crash
 #3 "URB submission failed" on rmmod
 #4 different startup readings on FL2000 0x8000
 #5 IT66121 detection failed
@klogg klogg closed this as completed Sep 6, 2019
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

No branches or pull requests

1 participant