Discussion:
[linux-uvc-devel] Transfer buffer not dma capable in uvc_ioctl_g_input
Pete Eberlein
2017-04-25 00:45:43 UTC
Permalink
Hi guys,

I get this message after upgrading my kernel to 4.10. Looks like the
buffer passed to usb_control_msg (via uvc_query_ctrl) needs to be
kmalloc'ed, not on the stack.


[ 184.018570] ------------[ cut here ]------------
[ 184.018577] WARNING: CPU: 0 PID: 4330 at
/build/linux-Fk60NP/linux-4.10.0/drivers/usb/core/hcd.c:1584
usb_hcd_map_urb_for_dma+0x37f/0x570
[ 184.018577] transfer buffer not dma capable
[ 184.018578] Modules linked in: uvcvideo videobuf2_vmalloc
snd_usb_audio videobuf2_memops videobuf2_v4l2 videobuf2_core videodev
snd_usbmidi_lib media des_generic md4 nls_utf8 cifs ccm fscache
snd_hda_codec_realtek snd_hda_codec_generic nvidia_uvm(POE) gpio_ich
coretemp ftdi_sio usbserial input_leds snd_hda_intel snd_hda_codec
snd_hda_core snd_hwdep snd_pcm serio_raw snd_seq_midi snd_seq_midi_event
snd_rawmidi nvidia(POE) snd_seq snd_seq_device snd_timer snd lpc_ich drm
soundcore wmi ite_cir rc_core mac_hid shpchp binfmt_misc parport_pc nfsd
ppdev auth_rpcgss nfs_acl lp lockd parport grace sunrpc ip_tables
x_tables autofs4 hid_generic usbhid hid uas usb_storage psmouse ahci
libahci firewire_ohci firewire_core e1000e crc_itu_t ptp pps_core fjes
[ 184.018630] CPU: 0 PID: 4330 Comm: demo.py Tainted: P OE
4.10.0-19-generic #21-Ubuntu
[ 184.018631] Hardware name: Acer Aspire M5700/EG45M, BIOS R01-A1
10/08/2008
[ 184.018632] Call Trace:
[ 184.018637] dump_stack+0x63/0x81
[ 184.018639] __warn+0xcb/0xf0
[ 184.018641] warn_slowpath_fmt+0x5f/0x80
[ 184.018643] usb_hcd_map_urb_for_dma+0x37f/0x570
[ 184.018645] usb_hcd_submit_urb+0x34c/0xb40
[ 184.018647] ? schedule_timeout+0x1e7/0x3f0
[ 184.018650] ? sched_clock+0x9/0x10
[ 184.018652] ? del_timer_sync+0x50/0x50
[ 184.018654] usb_submit_urb.part.8+0x30d/0x530
[ 184.018656] ? urb_destroy+0x24/0x30
[ 184.018657] usb_submit_urb+0x62/0x70
[ 184.018659] usb_start_wait_urb+0x6e/0x170
[ 184.018661] usb_control_msg+0xdc/0x120
[ 184.018667] __uvc_query_ctrl+0x65/0x80 [uvcvideo]
[ 184.018670] uvc_query_ctrl+0x40/0xe0 [uvcvideo]
[ 184.018674] uvc_ioctl_g_input+0x77/0x90 [uvcvideo]
[ 184.018683] __video_do_ioctl+0x1f1/0x310 [videodev]
[ 184.018689] video_usercopy+0x34f/0x600 [videodev]
[ 184.018695] ? video_ioctl2+0x20/0x20 [videodev]
[ 184.018699] ? lru_cache_add_active_or_unevictable+0x36/0xb0
[ 184.018701] ? handle_mm_fault+0xf9b/0x1360
[ 184.018707] video_ioctl2+0x15/0x20 [videodev]
[ 184.018713] v4l2_ioctl+0xdc/0xf0 [videodev]
[ 184.018715] do_vfs_ioctl+0xa3/0x610
[ 184.018718] ? __do_page_fault+0x266/0x4e0
[ 184.018720] SyS_ioctl+0x79/0x90
[ 184.018722] entry_SYSCALL_64_fastpath+0x1e/0xad
[ 184.018724] RIP: 0033:0x7f40eb8cd987
[ 184.018725] RSP: 002b:00007ffc3518a178 EFLAGS: 00000202 ORIG_RAX:
0000000000000010
[ 184.018727] RAX: ffffffffffffffda RBX: 0000000000000019 RCX:
00007f40eb8cd987
[ 184.018728] RDX: 00007ffc3518a1d0 RSI: ffffffff80045626 RDI:
000000000000000b
[ 184.018730] RBP: 00000000000000d0 R08: 00007f40dd5a86f8 R09:
000055e82ce70322
[ 184.018731] R10: 00007ffc3518a190 R11: 0000000000000202 R12:
0000000000000032
[ 184.018732] R13: 000055e82d27cbc0 R14: 000055e82e705420 R15:
00007f40dd5ba290
[ 184.018734] ---[ end trace b263a351e66f231d ]---
[ 184.018737] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit
6: -11 (exp. 1).


Thanks,
Pete

Loading...