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: <aa7e5c75-e337-4150-bba5-a139ab4fc02f@lunn.ch>
Date: Tue, 22 Aug 2023 19:59:00 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Justin Lai <justinlai0215@...ltek.com>
Cc: kuba@...nel.org, davem@...emloft.net, edumazet@...gle.com,
	pabeni@...hat.com, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, jiri@...nulli.us
Subject: Re: [PATCH net-next v6 1/2] net/ethernet/realtek: Add Realtek
 automotive PCIe driver code

> +	do {
> +		status = RTL_R32(tp, ivec->isr_addr);
> +
> +		handled = 1;
> +		RTL_W32(tp, ivec->imr_addr, 0x0);
> +		RTL_W32(tp, ivec->isr_addr, (status & ~FOVW));
> +
> +		if ((status & ivec->imr)) {
> +			if (likely(napi_schedule_prep(&ivec->napi)))
> +				__napi_schedule(&ivec->napi);
> +		}
> +	} while (false);

Remember i said that if you do something which no other network driver
does, it is probably wrong. How many drivers have a do {} while (false);
loop?

Please spend a few days just reading other drivers, and compare your
code with those drivers. Try to find all the things your driver does
which no other driver has. That code is probably wrong and you should
fix it.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ