From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [bug report] netdevsim: fib: Add dummy implementation for FIB offload
Date: Mon, 20 Jan 2020 15:17:16 +0000 [thread overview]
Message-ID: <20200120151716.GL19765@kadam> (raw)
In-Reply-To: <20200120143712.wzgjjpwuvrtbioef@kili.mountain>
On Mon, Jan 20, 2020 at 02:43:45PM +0000, Ido Schimmel wrote:
> On Mon, Jan 20, 2020 at 05:37:12PM +0300, Dan Carpenter wrote:
> > Hello Ido Schimmel,
> >
> > The patch 48bb9eb47b27: "netdevsim: fib: Add dummy implementation for
> > FIB offload" from Jan 14, 2020, leads to the following static checker
> > warning:
> >
> > drivers/net/netdevsim/fib.c:663 nsim_fib6_rt_insert()
> > error: 'fib6_rt' dereferencing possible ERR_PTR()
> >
> > drivers/net/netdevsim/fib.c
> > 460 nsim_fib6_rt_create(struct nsim_fib_data *data,
> > 461 struct fib6_entry_notifier_info *fen6_info)
> > 462 {
> > 463 struct fib6_info *iter, *rt = fen6_info->rt;
> > 464 struct nsim_fib6_rt *fib6_rt;
> > 465 int i = 0;
> > 466 int err;
> > 467
> > 468 fib6_rt = kzalloc(sizeof(*fib6_rt), GFP_ATOMIC);
> > 469 if (!fib6_rt)
> > 470 return NULL;
> > ^^^^^^^^^^^
>
> Dan, thank you very much for the report. It is already fixed in net-next
> thanks to Eric Dumazet:
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?idAcdc741048b0d04604c02aad9ec19f7d9130b70
>
> Can you share the static checker you used so I can avoid these mistakes
> in the future? Alternatively, is it possible to register development
> trees for this service like with the kbuild robot?
>
> Thanks in advance.
It's a Smatch warning but you need to rebuild the kernel data.
~/path/to/smatch/smatch_scripts/build_kernel_data.sh
It takes a few hours (maybe four) to rebuild.
regards,
dan carpenter
prev parent reply other threads:[~2020-01-20 15:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-20 14:37 [bug report] netdevsim: fib: Add dummy implementation for FIB offload Dan Carpenter
2020-01-20 14:43 ` Ido Schimmel
2020-01-20 15:17 ` Dan Carpenter [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=20200120151716.GL19765@kadam \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.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.