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]
Message-ID: <57fac291-6d7b-40e8-a4bf-8b8704662b9f@web.de>
Date: Tue, 1 Apr 2025 18:46:12 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Henry Martin <bsdhenrymartin@...il.com>, linux-clk@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>, David Lechner
 <david@...hnology.com>, Michael Turquette <mturquette@...libre.com>,
 Stephen Boyd <sboyd@...nel.org>
Subject: Re: [PATCH] clk: davinci: Add NULL check in
 davinci_lpsc_clk_register()

> devm_kasprintf() return NULL if memory allocation fails. Currently,
…
                call?                               failed?


> Add NULL check after devm_kasprintf() to prevent this issue.

I propose to avoid duplicate source code also for the completion of
the corresponding exception handling.

* You may avoid repeated function calls by using another label instead.
  https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources#MEM12C.Considerusingagotochainwhenleavingafunctiononerrorwhenusingandreleasingresources-CompliantSolution(copy_process()fromLinuxkernel)

* How do you think about to benefit any more from the application of the attribute “__free”?
  https://elixir.bootlin.com/linux/v6.14-rc6/source/include/linux/slab.h#L472


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ