Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Tobias Hoffmann <smilingthax@googlemail.com>,
	David Henningsson <david.henningsson@canonical.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, robin@gareus.org
Subject: Re: [WIP PATCH] Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20.
Date: Mon, 13 Oct 2014 13:38:55 +0200	[thread overview]
Message-ID: <543BB9CF.7010806@ladisch.de> (raw)
In-Reply-To: <543BB04D.8000906@googlemail.com>

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

  reply	other threads:[~2014-10-13 11:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 15:16 [WIP PATCH] Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 David Henningsson
2014-10-07 15:24 ` Tobias Hoffmann
2014-10-08 19:04 ` Daniel Mack
2014-10-08 21:21   ` Robin Gareus
2014-10-08 22:06     ` Tobias Hoffmann
2014-10-09  8:39     ` Takashi Iwai
2014-10-08 22:49   ` Tobias Hoffmann
2014-10-09  8:31     ` Daniel Mack
2014-10-09 10:13       ` Tobias Hoffmann
2014-10-13 13:30       ` David Henningsson
2014-10-09  8:35   ` Takashi Iwai
2014-10-13 10:58 ` Tobias Hoffmann
2014-10-13 11:38   ` Clemens Ladisch [this message]
2014-10-13 12:02     ` Tobias Hoffmann
2014-10-13 12:09       ` Clemens Ladisch
2014-10-13 12:21         ` Tobias Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=543BB9CF.7010806@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=robin@gareus.org \
    --cc=smilingthax@googlemail.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox