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:	Thu, 27 Sep 2012 11:33:10 +0530
From:	Jassi Brar <jassisinghbrar@...il.com>
To:	Inderpal Singh <inderpal.singh@...aro.org>
Cc:	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
	boojin.kim@...sung.com, vinod.koul@...el.com, patches@...aro.org,
	kgene.kim@...sung.com
Subject: Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

On Thu, Sep 27, 2012 at 11:00 AM, Inderpal Singh
<inderpal.singh@...aro.org> wrote:
> On 27 September 2012 10:35, Jassi Brar <jassisinghbrar@...il.com> wrote:
>> On Thu, Sep 27, 2012 at 9:43 AM, Inderpal Singh
>> <inderpal.singh@...aro.org> wrote:
>>>
>>> Don't you think free_chan_resource should be done __only if__
>>> alloc_chan_resource was successful ?
>>>
>> No, I don't think so. Thanks.
>
> Thanks for quick response.
> Please elaborate more on this as I find it against the general rule
> and against the dmaengine implementation which checks on the same
> condition before proceeding for free_chan_resouces in dma_chan_put
> function.
>
I thought I already explained it, but here is the summary.
Calling pl330_free_chan_resources() for channels that have zero client
is already safe. Preventing the call by checking !client_count only
increases LOC making it uglier.

** If the new check provides any more security, please let me know. **

Food for thought : we never check for NULL before passing a pointer to
kfree(). Why ?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ