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] [day] [month] [year] [list]
Message-ID: <5406225B.305@cogentembedded.com>
Date:	Wed, 03 Sep 2014 00:02:35 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Andy King <acking@...are.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	virtualization@...ts.linux-foundation.org
CC:	davem@...emloft.net, pv-drivers@...are.com,
	penguin-kernel@...ove.SAKURA.ne.jp
Subject: Re: [PATCH] VMXNET3: Check for map error in vmxnet3_set_mc

Hello.

On 09/02/2014 08:30 PM, Andy King wrote:

> We should check if the map of the table actually succeeds, and also free
> resources accordingly. This fixes the kernel panic reported by Tetsuo
> Handa.

    There's "Reported-by:" line for that.

> Version bumped to 1.2.1.0

> Acked-by: Shelley Gong <shelleygong@...are.com>
> Acked-by: Bhavesh Davda <bhavesh@...are.com>
> Signed-off-by: Andy King <acking@...are.com>
> ---
>   drivers/net/vmxnet3/vmxnet3_drv.c |   14 ++++++++------
>   drivers/net/vmxnet3/vmxnet3_int.h |    4 ++--
>   2 files changed, 10 insertions(+), 8 deletions(-)

> diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
> index d6e90c7..f450010 100644
> --- a/drivers/net/vmxnet3/vmxnet3_drv.c
> +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
[...]
> @@ -2091,11 +2093,11 @@ vmxnet3_set_mc(struct net_device *netdev)
>   			       VMXNET3_CMD_UPDATE_MAC_FILTERS);
>   	spin_unlock_irqrestore(&adapter->cmd_lock, flags);
>
> -	if (new_table) {
> +	if (new_table_pa)
>   		dma_unmap_single(&adapter->pdev->dev, new_table_pa,
>   				 rxConf->mfTableLen, PCI_DMA_TODEVICE);
> +	if (new_table)
>   		kfree(new_table);

    The above *if* is not needed -- kfree() already checks for NULL.

[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ