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] [day] [month] [year] [list]
Date:   Thu, 2 Nov 2017 09:28:38 +0200
From:   Gilad Ben-Yossef <gilad@...yossef.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org,
        Linux kernel mailing list <linux-kernel@...r.kernel.org>,
        driverdev-devel@...uxdriverproject.org,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Ofir Drang <ofir.drang@....com>
Subject: Re: [PATCH 2/3] staging: ccree: handle limiting of DMA masks

Hi,

Thank you for the review.

On Wed, Nov 1, 2017 at 1:09 PM, Dan Carpenter <dan.carpenter@...cle.com> wrote:
> On Tue, Oct 31, 2017 at 11:56:16AM +0000, Gilad Ben-Yossef wrote:
>>
>> -     if (!dev->coherent_dma_mask)
>> -             dev->coherent_dma_mask = DMA_BIT_MASK(DMA_BIT_MASK_LEN);
>> +     if (rc) {
>> +             dev_err(dev, "Error: failed in dma_set_mask, mask=%par\n",
>> +                     &dma_mask);
>> +             goto post_drvdata_err;
>
>
> Also this is not the right goto.  We should be turning the clk off.

Yes, it's wrong. I think a better thing to do though is to check the
DMA mask before turning the clock on, so the goto label
is right, but the code location is wrong...

>
> I don't really care for the naming scheme, and I know you renamed it for
> me already once and I feel bad for not liking it more.  It's still
> really a come-from label name and doesn't say what the goto does...
> Instead of post_clk_err, I wish it had names like "err_clk_off:".
>

> And in this case what it does is print a duplicative error message and
> return.  :/  The goto post_drvdata_err: lines should just print their
> own error messages if needed and return directly.  If there is no
> cleanup then there is no need for a goto.
>

Both good points. I will address them in a later patch.


> Anyway, that's not related to this patch.  Just resend it with
> goto post_clk_err: in the v2.

Will do.

Thanks!

Gilad


-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ