All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Andy King <acking@vmware.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Cc: pv-drivers@vmware.com, penguin-kernel@I-love.SAKURA.ne.jp,
	davem@davemloft.net
Subject: Re: [PATCH] VMXNET3: Check for map error in vmxnet3_set_mc
Date: Wed, 03 Sep 2014 00:02:35 +0400	[thread overview]
Message-ID: <5406225B.305@cogentembedded.com> (raw)
In-Reply-To: <1409675408-8440-1-git-send-email-acking@vmware.com>

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@vmware.com>
> Acked-by: Bhavesh Davda <bhavesh@vmware.com>
> Signed-off-by: Andy King <acking@vmware.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

WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Andy King <acking@vmware.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Cc: davem@davemloft.net, pv-drivers@vmware.com,
	penguin-kernel@I-love.SAKURA.ne.jp
Subject: Re: [PATCH] VMXNET3: Check for map error in vmxnet3_set_mc
Date: Wed, 03 Sep 2014 00:02:35 +0400	[thread overview]
Message-ID: <5406225B.305@cogentembedded.com> (raw)
In-Reply-To: <1409675408-8440-1-git-send-email-acking@vmware.com>

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@vmware.com>
> Acked-by: Bhavesh Davda <bhavesh@vmware.com>
> Signed-off-by: Andy King <acking@vmware.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


  reply	other threads:[~2014-09-02 20:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 16:30 [PATCH] VMXNET3: Check for map error in vmxnet3_set_mc Andy King
2014-09-02 16:30 ` Andy King
2014-09-02 20:02 ` Sergei Shtylyov [this message]
2014-09-02 20:02   ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2014-09-02 20:13 (unknown), Andy King
2014-09-02 20:13 ` [PATCH] VMXNET3: Check for map error in vmxnet3_set_mc Andy King
2014-09-02 20:13   ` Andy King
2014-09-05 18:50   ` David Miller
2014-09-05 18:50     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5406225B.305@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=acking@vmware.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=pv-drivers@vmware.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.