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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Jun 2019 11:24:51 -0400
From:   Sinan Kaya <Okaya@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        dan.j.williams@...el.com, vkoul@...nel.org
Cc:     Andy Gross <agross@...nel.org>,
        David Brown <david.brown@...aro.org>,
        linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org, dmaengine@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] dma: qcom: hidma: no need to check return value of
 debugfs_create functions

On 6/12/2019 8:25 AM, Greg Kroah-Hartman wrote:
> When calling debugfs functions, there is no need to ever check the
> return value.  The function can work or not, but the code logic should
> never do something different based on this.
> 
> Also, because there is no need to save the file dentry, remove the
> variables that were saving them as they were never even being used once
> set.
> 
> Cc: Sinan Kaya <okaya@...nel.org>
> Cc: Andy Gross <agross@...nel.org>
> Cc: David Brown <david.brown@...aro.org>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Vinod Koul <vkoul@...nel.org>
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-arm-msm@...r.kernel.org
> Cc: dmaengine@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

Interesting. Wouldn't debugfs_create_file() blow up if dir is NULL
for some reason?


+		debugfs_create_file("stats", S_IRUGO, dir, chan,
+				    &hidma_chan_fops);

Note that code ignores the return value of hidma_debug_init();
It was just trying to do clean up on debugfs failure by calling

	debugfs_remove_recursive(dmadev->debugfs);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ