From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63A7BC43381 for ; Sat, 23 Mar 2019 06:42:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D243218E2 for ; Sat, 23 Mar 2019 06:42:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726096AbfCWGmu (ORCPT ); Sat, 23 Mar 2019 02:42:50 -0400 Received: from mga09.intel.com ([134.134.136.24]:22612 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725838AbfCWGmu (ORCPT ); Sat, 23 Mar 2019 02:42:50 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2019 23:42:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="285195857" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 22 Mar 2019 23:42:48 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1h7aMi-0007Cm-3n; Sat, 23 Mar 2019 14:42:48 +0800 Date: Sat, 23 Mar 2019 14:41:50 +0800 From: kbuild test robot To: Yi-Hung Wei Cc: kbuild-all@01.org, netdev@vger.kernel.org, Yi-Hung Wei , Pablo Neira Ayuso Subject: Re: [PATCH net-next 1/2] netfilter: Export nf_ct_destroy_timeout() Message-ID: <201903231402.KFLVGATu%lkp@intel.com> References: <1553116295-16359-1-git-send-email-yihung.wei@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1553116295-16359-1-git-send-email-yihung.wei@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Yi-Hung, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Yi-Hung-Wei/netfilter-Export-nf_ct_destroy_timeout/20190323-094843 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' sparse warnings: (new ones prefixed by >>) net//netfilter/nf_conntrack_timeout.c:38:62: sparse: incompatible types in comparison expression (different base types) >> net//netfilter/nf_conntrack_timeout.c:58:23: sparse: incompatible types in comparison expression (different address spaces) vim +58 net//netfilter/nf_conntrack_timeout.c 33 34 static int untimeout(struct nf_conn *ct, void *timeout) 35 { 36 struct nf_conn_timeout *timeout_ext = nf_ct_timeout_find(ct); 37 > 38 if (timeout_ext && (!timeout || timeout_ext->timeout == timeout)) 39 RCU_INIT_POINTER(timeout_ext->timeout, NULL); 40 41 /* We are not intended to delete this conntrack. */ 42 return 0; 43 } 44 45 void nf_ct_untimeout(struct net *net, struct nf_ct_timeout *timeout) 46 { 47 nf_ct_iterate_cleanup_net(net, untimeout, timeout, 0, 0); 48 } 49 EXPORT_SYMBOL_GPL(nf_ct_untimeout); 50 51 void nf_ct_destroy_timeout(struct nf_conn *ct) 52 { 53 #ifdef CONFIG_NF_CONNTRACK_TIMEOUT 54 struct nf_conn_timeout *timeout_ext; 55 typeof(nf_ct_timeout_put_hook) timeout_put; 56 57 rcu_read_lock(); > 58 timeout_put = rcu_dereference(nf_ct_timeout_put_hook); 59 60 if (timeout_put) { 61 timeout_ext = nf_ct_timeout_find(ct); 62 if (timeout_ext) { 63 timeout_put(timeout_ext->timeout); 64 RCU_INIT_POINTER(timeout_ext->timeout, NULL); 65 } 66 } 67 rcu_read_unlock(); 68 #endif 69 } 70 EXPORT_SYMBOL_GPL(nf_ct_destroy_timeout); 71 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation