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:   Mon, 12 Sep 2022 14:02:10 +0200
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Oliver Hartkopp <socketcan@...tkopp.net>
Cc:     Ziyang Xuan <william.xuanziyang@...wei.com>, edumazet@...gle.com,
        kuba@...nel.org, linux-can@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] can: bcm: check the result of can_send() in
 bcm_can_tx()

On 08.09.2022 08:47:57, Oliver Hartkopp wrote:
> Sorry, but NACK.
> 
> The curr_frame counter handles the sequence counter of multiplex messages.
> 
> Even when this single send attempt failed the curr_frame counter has to
> continue.
> 
> For that reason the comment about statistics *before* the curr_frame++ might
> be misleading.
> 
> A potential improvement could be:
> 
> 	if (!(can_send(skb, 1)))

Nitpick:
In the kernel we usually assign the return value to a variable first,
and evaluate this variable in the if ().

> 		op->frames_abs++;
> 
> 	op->currframe++;

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