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, 13 Feb 2017 11:06:42 -0800
From:   Joe Perches <joe@...ches.com>
To:     Shannon Nelson <shannon.nelson@...cle.com>, netdev@...r.kernel.org,
        davem@...emloft.net
Cc:     sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 net-next 5/8] sunvnet: straighten up message event
 handling logic

On Mon, 2017-02-13 at 10:57 -0800, Shannon Nelson wrote:
> The use of gotos for handling the incoming events made this code
> harder to read and support than it should be.  This patch straightens
> out and clears up the logic.
> 
> Signed-off-by: Shannon Nelson <shannon.nelson@...cle.com>
> ---
>  drivers/net/ethernet/sun/sunvnet_common.c |   94 ++++++++++++++---------------
>  1 files changed, 45 insertions(+), 49 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sun/sunvnet_common.c b/drivers/net/ethernet/sun/sunvnet_common.c
[]
> @@ -738,41 +738,37 @@ static int vnet_event_napi(struct vnet_port *port, int budget)
[]
> +	/* we don't expect any other bits */
> +	BUG_ON(port->rx_event & ~(LDC_EVENT_DATA_READY |
> +				  LDC_EVENT_RESET |
> +				  LDC_EVENT_UP));

Is it really necessary to use BUG_ON here?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ