Bug 195875
Summary: | Plugging in Tascam US-16x08 causes paging error. | ||
---|---|---|---|
Product: | Drivers | Reporter: | Bollie (kernel) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | NEW --- | ||
Severity: | normal | CC: | kernel, matthieupepin, tiwai |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 4.11.2 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Proposed fix
Revert patch Fix patch for a typo Fix VLA again |
Description
Bollie
2017-05-24 21:00:15 UTC
Created attachment 256737 [details]
Proposed fix
Thanks to Detlef, we figured out what was going wrong.
You were passing a static const char via a (char*) cast to snd_usb_ctl_msg, which then tries to write into that using memcpy.
I've created a patch and tested it using 4.11.2. Now my US-16x08 seems to working properly.
Thanks for spotting out. Could you check just simply reverting the commit 89b593c30e83 ("ALSA: usb-audio: purge needless variable length array") works, too? (In reply to Takashi Iwai from comment #2) > Thanks for spotting out. > > Could you check just simply reverting the commit 89b593c30e83 ("ALSA: > usb-audio: purge needless variable length array") works, too? It looks like it might work, unless it won't also revert "ALSA: usb-audio: Fix memory leak and corruption in mixer_us16x08.c". Sorry, this is the first time dealing with kernel code. ;) Although I did forget to mention, that I also fixed a typo with the attached patch regarding the control name for Mid Low Q. It would be great to have that named properly. Cheers, Bollie (In reply to Bollie from comment #3) > (In reply to Takashi Iwai from comment #2) > > Thanks for spotting out. > > > > Could you check just simply reverting the commit 89b593c30e83 ("ALSA: > > usb-audio: purge needless variable length array") works, too? > > It looks like it might work, unless it won't also revert "ALSA: usb-audio: > Fix memory leak and corruption in mixer_us16x08.c". It should be revertible without another revert. Try the patch below, for example. > Although I did forget to mention, that I also fixed a typo with the attached > patch regarding the control name for Mid Low Q. It would be great to have > that named properly. Yes, this should be corrected but handled in another patch. Created attachment 256767 [details]
Revert patch
Comment on attachment 256767 [details]
Revert patch
Thank you so much for that patch. I'm gonna give it a try. But won't it bring back the warning: Variable length array is used?
Anyway, I'll report back to you.
It's no real compile warning, and we can fix it later in a cleaner way. I can confirm that the reverting patch works. For the last two items: - correcting the name of LowMid Q - creating dedicated arrays for mix_init_msg1 and 2 ... will you create separate patches for those? Or shall I open another ticket with a proposed patch? Cheers and thank you! Bollie Yes, below two patches address the remaining issues. Created attachment 256795 [details]
Fix patch for a typo
Created attachment 256797 [details]
Fix VLA again
Apply on top of the previous revert patch.
|