[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141215170645.GH11764@sirena.org.uk>
Date: Mon, 15 Dec 2014 17:06:45 +0000
From: Mark Brown <broonie@...nel.org>
To: "Strasser, Kevin" <kevin.strasser@...el.com>
Cc: "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
Liam Girdwood <lgirdwood@...il.com>,
"Koul, Vinod" <vinod.koul@...el.com>,
"Lin, Mengdong" <mengdong.lin@...el.com>,
"Fang, Yang A" <yang.a.fang@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: Intel: fix possible acpi enumeration panic
On Thu, Dec 11, 2014 at 09:55:38PM +0000, Strasser, Kevin wrote:
Please fix your mailer to word wrap comfortably under 80 colums so that
your mails are easily legible.
> > This changes the check from verifying if a codec_id is present to verifying if
> > the first character in the codec_id is non-NULL. That doesn't seem obviously
> > safer and the tables of machines seem to be terminated by having an entry
> > with all fields set to zero (which is a common idiom in Linux) which would
> > now crash with this change.
> In this case mach->codec_id is non-NULL, even for the terminating element, because it
> is defined to be a fixed width. So we have to take a look at the first character to see if it
> has been initialized.
That's a really unusual and (as you've seen) error prone idiom - is it
not better to fix the struct to use the more common idiom?
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists