Linux-HyperV Archive on lore.kernel.org
 help / color / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>,
	KY Srinivasan <kys@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"olaf\@aepfle.de" <olaf@aepfle.de>,
	"davem\@davemloft.net" <davem@davemloft.net>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"sashal\@kernel.org" <sashal@kernel.org>,
	"linux-hyperv\@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"netdev\@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net, 1/2] hv_netvsc: Fix offset usage in netvsc_send_table()
Date: Mon, 18 Nov 2019 09:59:10 -0800
Message-ID: <20191118095910.3566c5dd@hermes.lan> (raw)
In-Reply-To: <87wobxgkkv.fsf@vitty.brq.redhat.com>

On Mon, 18 Nov 2019 18:28:48 +0100
Vitaly Kuznetsov <vkuznets@redhat.com> wrote:

> > +		netdev_err(ndev, "Received send-table offset too big:%u\n",
> > +			   offset);
> > +		return;
> > +	}
> > +
> > +	tab = (void *)nvmsg + offset;  
> 
> But tab is 'u32 *', doesn't compiler complain?

nvmsg + offset is still of type void *.
assigning void * to another pointer type is allowed with C.

  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 16:33 [PATCH net, 0/2] Fix send indirection table offset Haiyang Zhang
2019-11-18 16:34 ` [PATCH net, 1/2] hv_netvsc: Fix offset usage in netvsc_send_table() Haiyang Zhang
2019-11-18 17:28   ` Vitaly Kuznetsov
2019-11-18 17:59     ` Stephen Hemminger [this message]
2019-11-18 18:39     ` Haiyang Zhang
2019-11-18 20:47       ` Michael Kelley
2019-11-18 21:01         ` Haiyang Zhang
2019-11-18 16:34 ` [PATCH net, 2/2] hv_netvsc: Fix send_table offset in case of a host bug Haiyang Zhang

Reply instructions:

You may reply publically 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=20191118095910.3566c5dd@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    /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

Linux-HyperV Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hyperv/0 linux-hyperv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hyperv linux-hyperv/ https://lore.kernel.org/linux-hyperv \
		linux-hyperv@vger.kernel.org
	public-inbox-index linux-hyperv

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hyperv


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git