[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMEuxRq3YDsCVBrdP78HnPeL7UcFiLWwKt6mEB2D+EVeSWG+pw@mail.gmail.com>
Date: Tue, 20 Sep 2022 12:31:29 -0700
From: Li Zhong <floridsleeves@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
pabeni@...hat.com, edumazet@...gle.com, davem@...emloft.net
Subject: Re: [PATCH v1] net/ethtool/tunnels: check the return value of nla_nest_start()
On Tue, Sep 20, 2022 at 11:37 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Fri, 16 Sep 2022 19:26:02 -0700 Li Zhong wrote:
> > goto err_cancel_table;
> >
> > entry = nla_nest_start(skb, ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY);
> > + if (!entry)
> > + return -EMSGSIZE;
>
> not even correct, and completely harmless
Thanks for your reply. Maybe a more suitable way of error handling is 'goto
err_cancel_table;'?
Powered by blists - more mailing lists