Skip to contentSkip to conversation

em28xx list_add corruption reported by list debug

DISCUSSION Antti Palosaari 2 participants 6 messages Dec 21, 2013 – Dec 22, 2013 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

I ran also this kind of bug. Device was PCTV 290e, which has that video unused. I have no any analog em28xx webcam to test if that happens here too.

Fortunately I found one video device which does not crash nor dump debug bug warnings. It is some old gspca webcam. Have to look example how those videobuf callbacks are implemented there..

regards
Antti

[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Invalid argument
[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Device or resource busy
[crope@localhost linux]$

joulu 22 00:08:24 localhost.localdomain kernel: em28174 #0: no endpoint for analog mode and transfer type 0
joulu 22 00:08:31 localhost.localdomain kernel: ------------[ cut here ]------------
joulu 22 00:08:31 localhost.localdomain kernel: WARNING: CPU: 3 PID: 6892 at lib/list_debug.c:33 __list_add+0xac/0xc0()
joulu 22 00:08:31 localhost.localdomain kernel: list_add corruption. prev->next should be next (ffff88030b686498), but was (null). (prev=ffff88030c6c1748).
joulu 22 00:08:31 localhost.localdomain kernel: Modules linked in: rc_pinnacle_pctv_hd(O) em28xx_rc(O) tda18271(O) cxd2820r(O) em28xx_dvb(O) r820t(O) mn88472(O) rtl2832_sd...b_usb_af901
joulu 22 00:08:31 localhost.localdomain kernel: CPU: 3 PID: 6892 Comm: cat Tainted: G C O 3.13.0-rc1+ #77
joulu 22 00:08:31 localhost.localdomain kernel: Hardware name: System manufacturer System Product Name/M5A78L-M/USB3, BIOS 1503 11/14/2012

joulu 22 00:08:31 localhost.localdomain kernel:  0000000000000009 ffff8803052afcb8 ffffffff816b8da9 ffff8803052afd00
joulu 22 00:08:31 localhost.localdomain kernel:  ffff8803052afcf0 ffffffff8106bcfd ffff88030c6c5348 ffff88030b686498
joulu 22 00:08:31 localhost.localdomain kernel:  ffff88030c6c1748 0000000000000292 0000000000000001 ffff8803052afd50
joulu 22 00:08:31 localhost.localdomain kernel: Call Trace:
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffff816b8da9>] dump_stack+0x4d/0x66
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffff8106bcfd>] warn_slowpath_common+0x7d/0xa0
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffff8106bd6c>] warn_slowpath_fmt+0x4c/0x50
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffff8134c2dc>] __list_add+0xac/0xc0
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffffa0273a7b>] buffer_queue+0x7b/0xb0 [em28xx]
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffffa025a2d4>] __enqueue_in_driver+0x74/0x80 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffffa025c568>] vb2_streamon+0xa8/0x190 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffffa025dd12>] __vb2_init_fileio+0x332/0x3a0 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffffa025e733>] __vb2_perform_fileio+0x483/0x620 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffffa025eae4>] vb2_fop_read+0xc4/0x5e0 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffffa022da55>] v4l2_read+0x65/0xb0 [videodev]
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffff811cc498>] vfs_read+0x98/0x170
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffff811ccfdc>] SyS_read+0x4c/0xa0
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffff8110affc>] ? __audit_syscall_entry+0x9c/0xf0
joulu 22 00:08:31 localhost.localdomain kernel:  [<ffffffff816ca729>] system_call_fastpath+0x16/0x1b

joulu 22 00:08:31 localhost.localdomain kernel: ---[ end trace dcb247cebbcc2a82 ]---

Signature · 1 line
http://palosaari.fi/
#1 lore raw

Em Sun, 22 Dec 2013 00:27:21 +0200
Antti Palosaari <[email protected]> escreveu:

Quoted 18 lines

I ran also this kind of bug. Device was PCTV 290e, which has that video unused. I have no any analog em28xx webcam to test if that happens here too.

Fortunately I found one video device which does not crash nor dump debug bug warnings. It is some old gspca webcam. Have to look example how those videobuf callbacks are implemented there..

regards
Antti

[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Invalid argument
[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Device or resource busy
[crope@localhost linux]$

Quoted 2 lines

joulu 22 00:08:24 localhost.localdomain kernel: em28174 #0: no endpoint for analog mode and transfer type 0

It seems that there's something bad on em28174 registration: it should not be creating a v4l2 device, if the device is DVB only.

The thing is that, when this driver was created, all devices were either analog only or hybrid. Only very recently, pure DVB devices got added.

It shouldn't be that hard to split em28xx_init_dev() into a few routines that would only register v4l2 if the device has analog support.

Again, this changeset:

	https://patchwork.linuxtv.org/patch/17967/

Seems to be part of such solution, as it already splits the v4l2 register logic into a separate function.

Quoted 56 lines

joulu 22 00:08:31 localhost.localdomain kernel: ------------[ cut here ]------------
joulu 22 00:08:31 localhost.localdomain kernel: WARNING: CPU: 3 PID:
6892 at lib/list_debug.c:33 __list_add+0xac/0xc0()
joulu 22 00:08:31 localhost.localdomain kernel: list_add corruption.
prev->next should be next (ffff88030b686498), but was (null).
(prev=ffff88030c6c1748).
joulu 22 00:08:31 localhost.localdomain kernel: Modules linked in:
rc_pinnacle_pctv_hd(O) em28xx_rc(O) tda18271(O) cxd2820r(O) em28xx_dvb(O) r820t(O) mn88472(O) rtl2832_sd...b_usb_af901 joulu 22 00:08:31 localhost.localdomain kernel: CPU: 3 PID: 6892 Comm:
cat Tainted: G C O 3.13.0-rc1+ #77
joulu 22 00:08:31 localhost.localdomain kernel: Hardware name: System
manufacturer System Product Name/M5A78L-M/USB3, BIOS 1503 11/14/2012
joulu 22 00:08:31 localhost.localdomain kernel: 0000000000000009 ffff8803052afcb8 ffffffff816b8da9 ffff8803052afd00
joulu 22 00:08:31 localhost.localdomain kernel: ffff8803052afcf0 ffffffff8106bcfd ffff88030c6c5348 ffff88030b686498
joulu 22 00:08:31 localhost.localdomain kernel: ffff88030c6c1748 0000000000000292 0000000000000001 ffff8803052afd50
joulu 22 00:08:31 localhost.localdomain kernel: Call Trace:
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffff816b8da9>] dump_stack+0x4d/0x66
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffff8106bcfd>] warn_slowpath_common+0x7d/0xa0
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffff8106bd6c>] warn_slowpath_fmt+0x4c/0x50
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffff8134c2dc>] __list_add+0xac/0xc0
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffffa0273a7b>] buffer_queue+0x7b/0xb0 [em28xx]
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffffa025a2d4>] __enqueue_in_driver+0x74/0x80 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffffa025c568>] vb2_streamon+0xa8/0x190 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffffa025dd12>] __vb2_init_fileio+0x332/0x3a0 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffffa025e733>] __vb2_perform_fileio+0x483/0x620 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffffa025eae4>] vb2_fop_read+0xc4/0x5e0 [videobuf2_core]
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffffa022da55>] v4l2_read+0x65/0xb0 [videodev]
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffff811cc498>] vfs_read+0x98/0x170
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffff811ccfdc>] SyS_read+0x4c/0xa0
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffff8110affc>] ? __audit_syscall_entry+0x9c/0xf0
joulu 22 00:08:31 localhost.localdomain kernel: [<ffffffff816ca729>] system_call_fastpath+0x16/0x1b
joulu 22 00:08:31 localhost.localdomain kernel: ---[ end trace dcb247cebbcc2a82 ]---

Signature · 2 lines
Cheers,
Mauro
#2 lore raw

Em Sun, 22 Dec 2013 13:06:00 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 30 lines

Em Sun, 22 Dec 2013 00:27:21 +0200
Antti Palosaari <[email protected]> escreveu:

Quoted 18 lines

I ran also this kind of bug. Device was PCTV 290e, which has that video unused. I have no any analog em28xx webcam to test if that happens here too.

Fortunately I found one video device which does not crash nor dump debug bug warnings. It is some old gspca webcam. Have to look example how those videobuf callbacks are implemented there..

regards
Antti

[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Invalid argument
[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Device or resource busy
[crope@localhost linux]$

Quoted 2 lines

joulu 22 00:08:24 localhost.localdomain kernel: em28174 #0: no endpoint for analog mode and transfer type 0

It seems that there's something bad on em28174 registration: it should not be creating a v4l2 device, if the device is DVB only.

The thing is that, when this driver was created, all devices were either analog only or hybrid. Only very recently, pure DVB devices got added.

Quoted 8 lines

It shouldn't be that hard to split em28xx_init_dev() into a few routines that would only register v4l2 if the device has analog support.

Again, this changeset:

	https://patchwork.linuxtv.org/patch/17967/

Seems to be part of such solution, as it already splits the v4l2 register logic into a separate function.

Ok, if I didn't make any mistake, this changeset should do the trick:

	https://patchwork.linuxtv.org/patch/21282/

Please notice that this is compile-tested only.

Regards,
Mauro

Signature · 2 lines
Cheers,
Mauro
#3 lore raw
Quoted 39 lines · Mauro Carvalho Chehab

Em Sun, 22 Dec 2013 13:06:00 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 36 lines

Em Sun, 22 Dec 2013 00:27:21 +0200
Antti Palosaari <[email protected]> escreveu:

Quoted 18 lines

I ran also this kind of bug. Device was PCTV 290e, which has that video unused. I have no any analog em28xx webcam to test if that happens here too.

Fortunately I found one video device which does not crash nor dump debug bug warnings. It is some old gspca webcam. Have to look example how those videobuf callbacks are implemented there..

regards
Antti

[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Invalid argument
[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Device or resource busy
[crope@localhost linux]$

Quoted 2 lines

joulu 22 00:08:24 localhost.localdomain kernel: em28174 #0: no endpoint for analog mode and transfer type 0

It seems that there's something bad on em28174 registration: it should not be creating a v4l2 device, if the device is DVB only.

The thing is that, when this driver was created, all devices were either analog only or hybrid. Only very recently, pure DVB devices got added.

It shouldn't be that hard to split em28xx_init_dev() into a few routines that would only register v4l2 if the device has analog support.

Again, this changeset:

	https://patchwork.linuxtv.org/patch/17967/
Quoted 7 lines
Quoted 2 lines

Seems to be part of such solution, as it already splits the v4l2 register logic into a separate function.

Ok, if I didn't make any mistake, this changeset should do the trick:

	https://patchwork.linuxtv.org/patch/21282/

Please notice that this is compile-tested only.

I started to testing that patch, but now I get following compilation errors:

WARNING: "em28xx_detect_sensor" [drivers/media/usb/em28xx/em28xx.ko] undefined!
WARNING: "em28xx_init_camera" [drivers/media/usb/em28xx/em28xx.ko] undefined!
WARNING: "em28xx_resolution_set" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_colorlevels_set_default" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_set_outfmt" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_read_reg_req_len" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_wake_i2c" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_set_alternate" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_vbi_supported" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_release_resources" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_boards" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!

anyhow, I am not sure if those are related or not. I will re-compile whole kernel to see (build only media).

regards
Antti

Signature · 1 line
http://palosaari.fi/
#4 lore raw
Quoted 77 lines · Antti Palosaari
Quoted 42 lines · Mauro Carvalho Chehab

Em Sun, 22 Dec 2013 13:06:00 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 39 lines

Em Sun, 22 Dec 2013 00:27:21 +0200
Antti Palosaari <[email protected]> escreveu:

Quoted 20 lines

I ran also this kind of bug. Device was PCTV 290e, which has that video unused. I have no any analog em28xx webcam to test if that happens here too.

Fortunately I found one video device which does not crash nor dump debug
bug warnings. It is some old gspca webcam. Have to look example how those videobuf callbacks are implemented there..

regards
Antti

[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Invalid argument
[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Device or resource busy
[crope@localhost linux]$

Quoted 2 lines

joulu 22 00:08:24 localhost.localdomain kernel: em28174 #0: no endpoint for analog mode and transfer type 0

It seems that there's something bad on em28174 registration: it should not
be creating a v4l2 device, if the device is DVB only.

The thing is that, when this driver was created, all devices were either analog only or hybrid. Only very recently, pure DVB devices got added.

It shouldn't be that hard to split em28xx_init_dev() into a few routines that would only register v4l2 if the device has analog support.

Again, this changeset:

    https://patchwork.linuxtv.org/patch/17967/
Quoted 7 lines
Quoted 2 lines

Seems to be part of such solution, as it already splits the v4l2 register logic into a separate function.

Ok, if I didn't make any mistake, this changeset should do the trick:

    https://patchwork.linuxtv.org/patch/21282/

Please notice that this is compile-tested only.

I started to testing that patch, but now I get following compilation errors:

WARNING: "em28xx_detect_sensor" [drivers/media/usb/em28xx/em28xx.ko] undefined!
WARNING: "em28xx_init_camera" [drivers/media/usb/em28xx/em28xx.ko] undefined!
WARNING: "em28xx_resolution_set" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_colorlevels_set_default" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_set_outfmt" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_read_reg_req_len" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_wake_i2c" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_set_alternate" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_vbi_supported" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_release_resources" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_boards" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!

Quoted 2 lines

anyhow, I am not sure if those are related or not. I will re-compile whole kernel to see (build only media).

It builds very fast as compile caching. Errors are still there. My tree is latest media/master + my SDR patches.

CRC d20c387c
Kernel: arch/x86/boot/bzImage is ready (#78)
ERROR: "em28xx_detect_sensor" [drivers/media/usb/em28xx/em28xx.ko] undefined!
ERROR: "em28xx_init_camera" [drivers/media/usb/em28xx/em28xx.ko] undefined!
ERROR: "em28xx_resolution_set" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
ERROR: "em28xx_colorlevels_set_default" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
ERROR: "em28xx_set_outfmt" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
ERROR: "em28xx_read_reg_req_len" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
ERROR: "em28xx_wake_i2c" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
ERROR: "em28xx_set_alternate" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
ERROR: "em28xx_vbi_supported" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
ERROR: "em28xx_release_resources" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
ERROR: "em28xx_boards" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined! make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

regards
Antti

Signature · 1 line
http://palosaari.fi/
#5 lore raw
In reply to Antti Palosaari

Em Sun, 22 Dec 2013 18:17:50 +0200
Antti Palosaari <[email protected]> escreveu:

Quoted 73 lines · Mauro Carvalho Chehab
Quoted 39 lines

Em Sun, 22 Dec 2013 13:06:00 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 36 lines

Em Sun, 22 Dec 2013 00:27:21 +0200
Antti Palosaari <[email protected]> escreveu:

Quoted 18 lines

I ran also this kind of bug. Device was PCTV 290e, which has that video unused. I have no any analog em28xx webcam to test if that happens here too.

Fortunately I found one video device which does not crash nor dump debug bug warnings. It is some old gspca webcam. Have to look example how those videobuf callbacks are implemented there..

regards
Antti

[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Invalid argument
[crope@localhost linux]$ cat /dev/video0
cat: /dev/video0: Device or resource busy
[crope@localhost linux]$

Quoted 2 lines

joulu 22 00:08:24 localhost.localdomain kernel: em28174 #0: no endpoint for analog mode and transfer type 0

It seems that there's something bad on em28174 registration: it should not be creating a v4l2 device, if the device is DVB only.

The thing is that, when this driver was created, all devices were either analog only or hybrid. Only very recently, pure DVB devices got added.

It shouldn't be that hard to split em28xx_init_dev() into a few routines that would only register v4l2 if the device has analog support.

Again, this changeset:

	https://patchwork.linuxtv.org/patch/17967/
Quoted 7 lines
Quoted 2 lines

Seems to be part of such solution, as it already splits the v4l2 register logic into a separate function.

Ok, if I didn't make any mistake, this changeset should do the trick:

	https://patchwork.linuxtv.org/patch/21282/

Please notice that this is compile-tested only.

I started to testing that patch, but now I get following compilation errors:

WARNING: "em28xx_detect_sensor" [drivers/media/usb/em28xx/em28xx.ko] undefined!
WARNING: "em28xx_init_camera" [drivers/media/usb/em28xx/em28xx.ko] undefined!
WARNING: "em28xx_resolution_set" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_colorlevels_set_default" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_set_outfmt" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_read_reg_req_len" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_wake_i2c" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_set_alternate" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_vbi_supported" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_release_resources" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!
WARNING: "em28xx_boards" [drivers/media/usb/em28xx/em28xx-v4l.ko] undefined!

Quoted 2 lines

anyhow, I am not sure if those are related or not. I will re-compile whole kernel to see (build only media).

That's the lack of exporting symbols or moving the code. I'm currently working on testing this patchset.

Quoted 4 lines

regards
Antti

Signature · 2 lines
Cheers,
Mauro