From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Ricardo Leitner 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 Message-ID: <20180709153239.GB8880@localhost.localdomain> References: <201807081539.tXPDdQyY%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Vlad Buslov , kbuild-all@01.org, netdev@vger.kernel.org, Jiri Pirko To: kbuild test robot Return-path: Received: from mail-qt0-f194.google.com ([209.85.216.194]:41125 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933299AbeGIPcm (ORCPT ); Mon, 9 Jul 2018 11:32:42 -0400 Received: by mail-qt0-f194.google.com with SMTP id e19-v6so1504945qtp.8 for ; Mon, 09 Jul 2018 08:32:42 -0700 (PDT) Content-Disposition: inline In-Reply-To: <201807081539.tXPDdQyY%fengguang.wu@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: 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] *__ret @@ got [noderef] *__ret @@ > net/sched/act_api.c:71:15: expected struct tc_cookie [noderef] *__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] net/sched/act_api.c:71:13: expected struct tc_cookie *old > net/sched/act_api.c:71:13: got struct tc_cookie [noderef] *[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 >