Re: [PATCH] Fix codec_dai->ops NULL pointer bug for AC97 codec dai in soc-core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 16, 2009 at 5:32 PM, Mark Brown
<broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, Oct 16, 2009 at 05:14:31PM +0800, Barry Song wrote:
>> On Fri, Oct 16, 2009 at 5:08 PM, Mark Brown
>
>> > This is the wrong fix - null DAI ops are supposed to be supported for
>> > all devices since not all DAIs will be configurable.
>
>> But the problem is ac97 DAIs will have no path to get the null ops.
>> Then many functions will panic. It's very easy to repeat the problem
>> in your site, only by deleting ops field in any AC97 codec DAI.
>
> Sure, I see the problem.  The issue is that this could affect any CODEC,
> not just AC97 ones, so an AC97-specific fix isn't what's needed.  Given
> the idiom of the rest of the code the best thing would be to make all
> the remaining callers check for ops before dereferencing it.
At the beginning, I wanted to do like this. But I saw all other codec
DAIs register themselves, then got a null ops. Just ac97 is forgot.
Then I patched AC97 codec DAIs.
Then you prefer to patch all ops access?

>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux