Tobias Hoffmann wrote:
On 07/10/14 17:16, David Henningsson wrote:
- err = set_ctl_urb2(mixer->chip, UAC2_CS_CUR, 0x0100, 0x29, "\x80\xbb\x00\x00", 4);
There have been two reports of users that had to replace the set_ctl_urb2 line with:
char buffer[4] = { '\x80', '\xbb', '\x00', '\x00' }; err = set_ctl_urb2(mixer->chip, UAC2_CS_CUR, 0x0100, 0x29, buffer, 4);
otherwise they would get a kernel oops, e.g.:
BUG: unable to handle kernel paging request at ffffffffa0b43440 IP: [<ffffffff8136f3c2>] memcpy+0x12/0x110 ... Call Trace: [<ffffffffa0b311d2>] ? snd_usb_ctl_msg+0xc2/0x160 [snd_usb_audio] [<ffffffffa0b3b7aa>] set_ctl_urb2+0xaa/0x100 [snd_usb_audio] [<ffffffffa0b3c9fa>] scarlett_mixer_controls+0x28a/0x4c0 [snd_usb_audio]
Strange.
Maybe it has to do with a particular compiler, or some kernel config setting that places the bytes "somewhere else" when they are passed as string?
Buffers on the stack or in modules cannot be used for DMA on some architectures, but that is why snd_usb_ctl_msg() creates a copy of the data.
This crash is inside memcpy(), where this memory type cannot make any difference.
Please show the entire oops.
Regards, Clemens