netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
Cc: Felix Fietkau <nbd@nbd.name>,
	"David S. Miller" <davem@davemloft.net>,
	Christoph Hellwig <hch@infradead.org>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: drivers/net/ethernet/mediatek/mtk_ppe_offload.c - suspicious code?
Date: Mon, 19 Apr 2021 10:06:10 +0200	[thread overview]
Message-ID: <20210419080610.GA24040@salvia> (raw)
In-Reply-To: <526789.1618794132@turing-police>

On Sun, Apr 18, 2021 at 09:02:12PM -0400, Valdis Klētnieks wrote:
> While doing some code auditing for -Woverride_init, I spotted some questionable code
> 
> commit 502e84e2382d92654a2ecbc52cdbdb5a11cdcec7
> Author: Felix Fietkau <nbd@nbd.name>
> Date:   Wed Mar 24 02:30:54 2021 +0100
> 
>     net: ethernet: mtk_eth_soc: add flow offloading support
> 
> In drivers/net/ethernet/mediatek/mtk_ppe_offload.c:
> 
> +static const struct rhashtable_params mtk_flow_ht_params = {
> +       .head_offset = offsetof(struct mtk_flow_entry, node),
> +       .head_offset = offsetof(struct mtk_flow_entry, cookie),
> +       .key_len = sizeof(unsigned long),
> +       .automatic_shrinking = true,
> +};
> 
> What's intended for head_offset here?

It's a bug, there's a fix here:

https://www.spinics.net/lists/netdev/msg736368.html

      reply	other threads:[~2021-04-19  8:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19  1:02 drivers/net/ethernet/mediatek/mtk_ppe_offload.c - suspicious code? Valdis Klētnieks
2021-04-19  8:06 ` Pablo Neira Ayuso [this message]

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=20210419080610.GA24040@salvia \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=hch@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=valdis.kletnieks@vt.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).