Netdev List
 help / color / mirror / Atom feed
From: Steen Hegelund <steen.hegelund@microchip.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Daniel Machon <daniel.machon@microchip.com>,
	<UNGLinuxDriver@microchip.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	Horatiu Vultur <horatiu.vultur@microchip.com>,
	<netdev@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	Lars Povlsen <lars.povlsen@microchip.com>
Subject: Re: [PATCH net-next] net: microchip: sparx5: Fix uninitialized variable in vcap_path_exist()
Date: Fri, 20 Jan 2023 15:25:36 +0100	[thread overview]
Message-ID: <ebcb9a2321ea39ac5164e5df635c2eb02835f41c.camel@microchip.com> (raw)
In-Reply-To: <Y8qbYAb+YSXo1DgR@kili>

Hi Dan,

Thanks for the fix.

I have not seen any CONFIG_INIT_STACK_ALL=y in any of my .configs, though, so I
will be updating my test suite to catch this.

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>

On Fri, 2023-01-20 at 16:47 +0300, Dan Carpenter wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> The "eport" variable needs to be initialized to NULL for this code to
> work.
> 
> Fixes: 814e7693207f ("net: microchip: vcap api: Add a storage state to a VCAP
> rule")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> Probably you had CONFIG_INIT_STACK_ALL=y in your .config for this to
> pass testing.
> 
>  drivers/net/ethernet/microchip/vcap/vcap_api.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api.c
> b/drivers/net/ethernet/microchip/vcap/vcap_api.c
> index 71f787a78295..69c026778b42 100644
> --- a/drivers/net/ethernet/microchip/vcap/vcap_api.c
> +++ b/drivers/net/ethernet/microchip/vcap/vcap_api.c
> @@ -2012,7 +2012,8 @@ static int vcap_get_next_chain(struct vcap_control
> *vctrl,
>  static bool vcap_path_exist(struct vcap_control *vctrl, struct net_device
> *ndev,
>                             int dst_cid)
>  {
> -       struct vcap_enabled_port *eport, *elem;
> +       struct vcap_enabled_port *eport = NULL;
> +       struct vcap_enabled_port *elem;
>         struct vcap_admin *admin;
>         int tmp;
> 
> --
> 2.35.1
> 

BR
Steen

  reply	other threads:[~2023-01-20 14:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 13:47 [PATCH net-next] net: microchip: sparx5: Fix uninitialized variable in vcap_path_exist() Dan Carpenter
2023-01-20 14:25 ` Steen Hegelund [this message]
2023-01-20 15:10   ` Dan Carpenter
2023-01-24  5:40 ` patchwork-bot+netdevbpf

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=ebcb9a2321ea39ac5164e5df635c2eb02835f41c.camel@microchip.com \
    --to=steen.hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=daniel.machon@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=error27@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=lars.povlsen@microchip.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@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
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