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: <20220513114642.77jfdscjwzgyiwm3@pengutronix.de>
Date:   Fri, 13 May 2022 13:46:42 +0200
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Vincent Mailhol <vincent.mailhol@...il.com>
Cc:     Max Staudt <max@...as.org>,
        Wolfgang Grandegger <wg@...ndegger.com>,
        linux-can@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Oliver Neukum <oneukum@...e.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6] can, tty: can327 CAN/ldisc driver for ELM327 based
 OBD-II adapters

On 13.05.2022 11:38:31, Vincent Mailhol wrote:
> > +static void elm327_parse_line(struct can327 *elm, size_t len)
> > +{
> > +       lockdep_assert_held(&elm->lock);
> 
> You are using many of those lockdep_assert_held(&elm->lock);
> 
> I guess you put them for debug purpose and probaly some of those can
> be removed (if you see a genuine risk at some places, then OK to keep
> as a safety net, but a bit of clean up can be done here, I think).
> 
> This comment applies to all use of lockdep_assert_held().

These statements document that the code must be called with the lock
held. They optimize away if lockdep is not enabled. Better keep them in
place.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ