lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 26 Jul 2019 09:46:34 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Cezary Rojewski <cezary.rojewski@...el.com>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        tiwai@...e.de, broonie@...nel.org, vkoul@...nel.org,
        gregkh@...uxfoundation.org, jank@...ence.com,
        srinivas.kandagatla@...aro.org, slawomir.blauciak@...el.com,
        Sanyog Kale <sanyog.r.kale@...el.com>
Subject: Re: [alsa-devel] [RFC PATCH 31/40] soundwire: intel: move shutdown()
 callback and don't export symbol



On 7/26/19 5:38 AM, Cezary Rojewski wrote:
> On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
>> +void intel_shutdown(struct snd_pcm_substream *substream,
>> +            struct snd_soc_dai *dai)
>> +{
>> +    struct sdw_cdns_dma_data *dma;
>> +
>> +    dma = snd_soc_dai_get_dma_data(dai, substream);
>> +    if (!dma)
>> +        return;
>> +
>> +    snd_soc_dai_set_dma_data(dai, substream, NULL);
>> +    kfree(dma);
>> +}
> 
> Correct me if I'm wrong, but do we really need to _get_dma_ here?
> _set_dma_ seems bulletproof, same for kfree.

I must admit I have no idea why we have a reference to DMAs here, this 
looks like an abuse to store a dai-specific context, and the initial 
test looks like copy-paste to detect invalid configs, as done in other 
callbacks. Vinod and Sanyog might have more history than me here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ