Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp98425rdb; Wed, 20 Dec 2023 07:15:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFkegEozJbvu0Hee8G388iUv5PGAWBzGCPOlBDli3vlb/GdW2Vf6d1yjSFHi9HZI1TQxlVK X-Received: by 2002:a17:90a:5ac4:b0:28b:7d4f:3109 with SMTP id n62-20020a17090a5ac400b0028b7d4f3109mr2690352pji.66.1703085330430; Wed, 20 Dec 2023 07:15:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703085330; cv=none; d=google.com; s=arc-20160816; b=u3qCEdneNf/P4ViIyuZ02kPPEPBhnhV4Gwdqzc0zdVsaeV6KPttc8v7+utgPNadodP YfMCfYMdO9xLcHwFg7Dgz2mABHWXmNLY8vXMNXC1XgaeKHiZMukASczQSfRRaWa7D7sQ FyFOYcr/bNOFSwLPOhB50YPaxTW3jvtLxs6YC94TFULP9rZCARrQ2jb8Cz7eWBlp2LiG WS2MJ68eKOuyxhHypBKFCWwsCipVQjgTkW8WBlmIdViQDBHeq6c2n7gQz4EfyLVZQZRT ssJzkU3/jAlK1trVTZoUUR95QuuZNyNkl1Z2N2HYDALgAg0ap0EISqpehHChnOBqkaSM YvFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eXZ8txxapwhRwio2CnxzsGxrNymjKKrPKSnlKoDdiKM=; fh=d/nzv7I7to8jaFi1ApragjmU4rzMYH+YY4iOZ4loB20=; b=PctbePGrBSZxKFTYP4+hq7S8rwLzNvDZAFZ5ReSVL80Xrz0dVE3BAXM/TqFQFnZtk7 JNFKXBQdZaV/T/JqlNPgo5uvIUugqwIdivOe76K3ff0+O0MM5LqX+EWPCI0I2AnB+34j Frnw9RAT3e2Q2jre+LA6r4jMW3X1yd7/9H6m6LR4hCp+zm03pswE/iPVBcJMFBk2tQ9W IYTjDJLlSYquRZ02KH2tVyoG4rgVn4nDSm/rb3GfSr4hOfTlexy3IQCIR7yCKTOfp9V/ tEvyjqnpI5Jl6cnrXZXyEAP2JTFQMES/zJrvFREg01zIDainnd2EROFg94ac5mU8N77n tC8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Wacwklq8; spf=pass (google.com: domain of linux-kernel+bounces-7124-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7124-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p1-20020a17090ac00100b0028bd27d3f3fsi1559459pjt.92.2023.12.20.07.15.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:15:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7124-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Wacwklq8; spf=pass (google.com: domain of linux-kernel+bounces-7124-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7124-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B3416B24CD5 for ; Wed, 20 Dec 2023 15:14:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECF113FB0B; Wed, 20 Dec 2023 15:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Wacwklq8" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A01923D38F; Wed, 20 Dec 2023 15:14:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703085284; x=1734621284; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ULvCCsVn4cqIVLiFeZesMLdDzimmihjmZz9S7LtZK9I=; b=Wacwklq89/7WWhlBLn/54lbeuyQzWOtOPGArJ00suyr4/x3MkXFjzrSM BE3b4YRMJ1Hp5Ccz1BNdRFL/O0D+eaPmtBjwFJizkXFJh2lkyN0OihB93 a36dx+YOEgk6uGYO53HZe1Y6/nx+WXIrpQVh/NZnmoTUqE3xEuPErF5x1 7EPaWhzvhkK8VUHyq674sHZLMCF4/WDOxIptsntzhVHvan9NueNVjFLNB RoBAOzCrU47VSDNhwcTidWR9jfrWviCueAeuVdTl8iCjeKG1hS0u9PZOK 3KA2nSLuaB10ewudteP5POTpWyKFoLGx8lYrNYCoNd27x9tdfmBa2a3bB g==; X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="9293728" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="9293728" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 07:14:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="776372196" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="776372196" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by orsmga002.jf.intel.com with ESMTP; 20 Dec 2023 07:14:40 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rFyHO-00073J-1B; Wed, 20 Dec 2023 15:14:38 +0000 Date: Wed, 20 Dec 2023 23:13:56 +0800 From: kernel test robot To: Hangyu Hua , jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, tgraf@suug.ch Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Hangyu Hua Subject: Re: [PATCH] net: sched: em_text: fix possible memory leak in em_text_destroy() Message-ID: <202312202228.58nFn5h0-lkp@intel.com> References: <20231220030838.11751-1-hbh25y@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231220030838.11751-1-hbh25y@gmail.com> Hi Hangyu, kernel test robot noticed the following build warnings: [auto build test WARNING on net-next/main] [also build test WARNING on net/main linus/master v6.7-rc6] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Hangyu-Hua/net-sched-em_text-fix-possible-memory-leak-in-em_text_destroy/20231220-111317 base: net-next/main patch link: https://lore.kernel.org/r/20231220030838.11751-1-hbh25y%40gmail.com patch subject: [PATCH] net: sched: em_text: fix possible memory leak in em_text_destroy() config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20231220/202312202228.58nFn5h0-lkp@intel.com/config) compiler: m68k-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231220/202312202228.58nFn5h0-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202312202228.58nFn5h0-lkp@intel.com/ All warnings (new ones prefixed by >>): net/sched/em_text.c: In function 'em_text_destroy': >> net/sched/em_text.c:102:24: warning: passing argument 1 of 'kfree' makes pointer from integer without a cast [-Wint-conversion] 102 | kfree(m->data); | ~^~~~~~ | | | long unsigned int In file included from net/sched/em_text.c:8: include/linux/slab.h:227:24: note: expected 'const void *' but argument is of type 'long unsigned int' 227 | void kfree(const void *objp); | ~~~~~~~~~~~~^~~~ vim +/kfree +102 net/sched/em_text.c 97 98 static void em_text_destroy(struct tcf_ematch *m) 99 { 100 if (EM_TEXT_PRIV(m) && EM_TEXT_PRIV(m)->config) { 101 textsearch_destroy(EM_TEXT_PRIV(m)->config); > 102 kfree(m->data); 103 } 104 } 105 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki