netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: kbuild test robot <lkp@intel.com>
Cc: Vlad Buslov <vladbu@mellanox.com>,
	kbuild-all@01.org, netdev@vger.kernel.org,
	Jiri Pirko <jiri@mellanox.com>
Subject: Re: [net-next:master 464/475] net/sched/act_api.c:71:15: sparse: incorrect type in initializer (different address spaces)
Date: Mon, 9 Jul 2018 12:32:39 -0300	[thread overview]
Message-ID: <20180709153239.GB8880@localhost.localdomain> (raw)
In-Reply-To: <201807081539.tXPDdQyY%fengguang.wu@intel.com>

As I pointed out inthe other thread, Dave fixed these:

> >> net/sched/act_api.c:71:15: sparse: incorrect type in initializer (different address spaces) @@    expected struct tc_cookie [noderef] <asn:4>*__ret @@    got [noderef] <asn:4>*__ret @@
>    net/sched/act_api.c:71:15:    expected struct tc_cookie [noderef] <asn:4>*__ret
>    net/sched/act_api.c:71:15:    got struct tc_cookie *new_cookie
> >> net/sched/act_api.c:71:13: sparse: incorrect type in assignment (different address spaces) @@    expected struct tc_cookie *old @@    got struct tc_cookie [noderef] <struct tc_cookie *old @@
>    net/sched/act_api.c:71:13:    expected struct tc_cookie *old
>    net/sched/act_api.c:71:13:    got struct tc_cookie [noderef] <asn:4>*[assigned] __ret

in 0dbc81eab4d1 ("net: sched: Fix warnings from xchg() on RCU'd cookie
pointer.")
But this one is still there:

> >> net/sched/act_api.c:132:48: sparse: dereference of noderef expression
...
>    127	static size_t tcf_action_shared_attrs_size(const struct tc_action *act)
>    128	{
>    129		u32 cookie_len = 0;
>    130	
>    131		if (act->act_cookie)
>  > 132			cookie_len = nla_total_size(act->act_cookie->len);

It can't be done this way, as act_cookie now is a __rcu var.

>    133	
>    134		return  nla_total_size(0) /* action number nested */
>    135			+ nla_total_size(IFNAMSIZ) /* TCA_ACT_KIND */
>    136			+ cookie_len /* TCA_ACT_COOKIE */
>    137			+ nla_total_size(0) /* TCA_ACT_STATS nested */
>    138			/* TCA_STATS_BASIC */
>    139			+ nla_total_size_64bit(sizeof(struct gnet_stats_basic))
>    140			/* TCA_STATS_QUEUE */
>    141			+ nla_total_size_64bit(sizeof(struct gnet_stats_queue))
>    142			+ nla_total_size(0) /* TCA_OPTIONS nested */
>    143			+ nla_total_size(sizeof(struct tcf_t)); /* TCA_GACT_TM */
>    144	}
>    145	
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 

      reply	other threads:[~2018-07-09 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-08  7:10 [net-next:master 464/475] net/sched/act_api.c:71:15: sparse: incorrect type in initializer (different address spaces) kbuild test robot
2018-07-09 15:32 ` Marcelo Ricardo Leitner [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=20180709153239.GB8880@localhost.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=jiri@mellanox.com \
    --cc=kbuild-all@01.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=vladbu@mellanox.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;
as well as URLs for NNTP newsgroup(s).