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: <563C95C2.6060606@cogentembedded.com>
Date:	Fri, 6 Nov 2015 14:57:54 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Michael Chan <mchan@...adcom.com>, davem@...emloft.net
Cc:	netdev@...r.kernel.org, Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH net 4/5] bnxt_en: Fix comparison of u16 sw_id against
 negative value.

Hello.

On 11/6/2015 12:25 AM, Michael Chan wrote:

> Assign the return value from bitmap_find_free_region() to an integer
> variable and check for negative error codes first, before assigning
> the bit ID to the unsigned sw_id field.
>
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Cc: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Michael Chan <mchan@...adcom.com>
> ---
>   drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index a62deff..db15c5e 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -5307,7 +5307,7 @@ static int bnxt_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
>   	struct bnxt_ntuple_filter *fltr, *new_fltr;
>   	struct flow_keys *fkeys;
>   	struct ethhdr *eth = (struct ethhdr *)skb_mac_header(skb);
> -	int rc = 0, idx;
> +	int rc = 0, idx, bit_id;

    I'd use the already declared 'rc' variable.

[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ