Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1772409lqp; Sat, 23 Mar 2024 08:09:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpxUwNnFk+KduXVuL70UZDux/74sk0T4kpYuZ3+iSePfZiOJk6a7gZYFP+61aHkHeX80R+n3d/ThTf87x0ufgqCXMJOOmq42KvucsZnQ== X-Google-Smtp-Source: AGHT+IEP4RjVH4S9T8kTgTyZj2lj+Zm9aQTNAHKqsyvOaN33du+iIzqmNTlqKXYtcAxWZPQ68g/E X-Received: by 2002:a05:6a21:3297:b0:1a3:6a10:fa3e with SMTP id yt23-20020a056a21329700b001a36a10fa3emr2486165pzb.10.1711206557451; Sat, 23 Mar 2024 08:09:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711206557; cv=pass; d=google.com; s=arc-20160816; b=M92SlXdiBOC2MTNzcNyQiEs9tIivT3BycutzupcgPpB1shr9CxWhtJWhoIzCm+FoCr RTAh0O62sp63j3zQIYDDuHyHv0WWOSktkC3CT7WGKuigwPT6KLqcywe/eXqJ8wWB2EQ/ iSWx3EsRmZ5YCNCLDkSte0P9yNRAR/ZOJUWp7V/yEM1moIzRG0iKEqRduXNJR8FKBvWg FLoJPqoFiSOFtzTy7NvYGxYmtdG+qHDsGFIozMm7M4ZWHRtRtBT4spTToSc5XspwkWOc /Ha0B6lc2th2p0+uWlDugfOZo8Im6GP8SNAY2ivanR+mV+kRdWNdJZ0Hb2EAYCVMmZm/ eaEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=z7dNu+dqoksTixczgXpGOxwfRNv+59xihSXtn4EdxhM=; fh=Nmlq0vtbwrA0Xa4SLgFpexyBC1Hul0fjkSEavt8+Xi4=; b=aWA/8JcI/W55AxV6fplSTNNYF2090F0pBgNTwZfC+KeBGnFUd1xBJZ1FxnJfoOPFcd TqWaVmLeIpZzwavyT+UJRRNzBj/DdJjrIPQVyittlr6mQr3RXClztQS1BmGXID6OPtQ/ S9p/o6K+HNqz6rRR/0O5FjidRF58/xME4aU/mqGdAlRpJA+kYFKyQZz8oA6yLK5nxEmQ eJQtsbtt1qDt6cEHW2wvFsDNBO/ou+qD1G3mM6SSmVSBtcv03sl4PDybJVNmOHVDrq6y Yu8KmQKAFGw9eHQ79nCwjaxE9EzjurpGl12M4kj2NECVseY2t3pik2M1mQ2mDugkeW/T WaQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mx5NN6Pz; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-112386-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112386-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 w10-20020a63d74a000000b005dcbb9cf3a4si4233446pgi.129.2024.03.23.08.09.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 08:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112386-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=mx5NN6Pz; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-112386-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112386-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 E6BFFB21B43 for ; Sat, 23 Mar 2024 15:09:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 559964087A; Sat, 23 Mar 2024 15:09:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mx5NN6Pz" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 C67BD25568 for ; Sat, 23 Mar 2024 15:09:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711206546; cv=none; b=lL5hVQRaPmOdALsUSk0DP8rBY295wEe2FMzuTuFq/CY3DDe50ob4mURr1ZrZRh6XMoHDJJvEgke8WTvZNhFtSSt80JiKM7sjWqLca1C8VfMYqFHmQyd1AAAQvsMLMZzHs64G2kLAtdVqc0OodCw/5Mr0TdMNV0VuYh2JA7PiDOc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711206546; c=relaxed/simple; bh=YztTkRP1Rs6RE6uoc2ayBCPwYuZ4QDIWawY64DRegsI=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=EBEqHEstIm40Y8+TIiNkcPRSS1Dx+GZLF8k9mYMzBnuGAnwR1Oex7o4KA3an7p6ou6gTwezkfid8yCGyw0TvhDoCcMr7KhXME7OphTY8gIg0aHlqDPRYJaSHY1uEmxQnh+jQXvMfINMxYf+i70X2g315QWIFDVjrnQMAQV4HOsg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mx5NN6Pz; arc=none smtp.client-ip=192.198.163.12 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=1711206544; x=1742742544; h=date:from:to:cc:subject:message-id:mime-version; bh=YztTkRP1Rs6RE6uoc2ayBCPwYuZ4QDIWawY64DRegsI=; b=mx5NN6PzEbKd9K1gShQ/CtxpsrvjeN2ROkjx9xuKXXDNM+k7A8io55sX /yCB3SUIzio6b0VlIqA6z+JytuUpth1YZ0L4DMXSvniRvUmhigQaltIA1 QUk064ofEfSHIjLTqtR61MjizYdDvM9scrJ3lbzdsBq+mKWzUzAG3s04d a7VPmBtCZqeqNw9uUf5/8okGDvzlhfGJkb6k13dieUDNxzBVenSOvWJUK x3Py1YUZ1uwCMQsMW1MYdd45hbZcYD0oPW1B8L1hEiXTcsg3QIgfjZS6c 4LDvgz2RTk3z4554Nj3vB8UkhTdeziW2ZhBXo+6C8gdwHKMLYjx9nxl9K g==; X-IronPort-AV: E=McAfee;i="6600,9927,11021"; a="10024512" X-IronPort-AV: E=Sophos;i="6.07,149,1708416000"; d="scan'208";a="10024512" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2024 08:09:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,149,1708416000"; d="scan'208";a="38313816" Received: from lkp-server01.sh.intel.com (HELO b21307750695) ([10.239.97.150]) by fmviesa002.fm.intel.com with ESMTP; 23 Mar 2024 08:09:01 -0700 Received: from kbuild by b21307750695 with local (Exim 4.96) (envelope-from ) id 1ro2zT-000LF9-1r; Sat, 23 Mar 2024 15:08:59 +0000 Date: Sat, 23 Mar 2024 23:08:59 +0800 From: kernel test robot To: Dave Chinner Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Chandan Babu R , "Darrick J. Wong" Subject: fs/xfs/libxfs/xfs_dir2.c:336:15-22: WARNING opportunity for kmemdup Message-ID: <202403232305.aLpp8AlJ-lkp@intel.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 tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: bfa8f18691ed2e978e4dd51190569c434f93e268 commit: f078d4ea827607867d42fb3b2ef907caf86ce49d xfs: convert kmem_alloc() to kmalloc() date: 6 weeks ago config: x86_64-randconfig-103-20240323 (https://download.01.org/0day-ci/archive/20240323/202403232305.aLpp8AlJ-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 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/202403232305.aLpp8AlJ-lkp@intel.com/ cocci warnings: (new ones prefixed by >>) >> fs/xfs/libxfs/xfs_dir2.c:336:15-22: WARNING opportunity for kmemdup vim +336 fs/xfs/libxfs/xfs_dir2.c 319 320 /* 321 * If doing a CI lookup and case-insensitive match, dup actual name into 322 * args.value. Return EEXIST for success (ie. name found) or an error. 323 */ 324 int 325 xfs_dir_cilookup_result( 326 struct xfs_da_args *args, 327 const unsigned char *name, 328 int len) 329 { 330 if (args->cmpresult == XFS_CMP_DIFFERENT) 331 return -ENOENT; 332 if (args->cmpresult != XFS_CMP_CASE || 333 !(args->op_flags & XFS_DA_OP_CILOOKUP)) 334 return -EEXIST; 335 > 336 args->value = kmalloc(len, GFP_NOFS | __GFP_RETRY_MAYFAIL); 337 if (!args->value) 338 return -ENOMEM; 339 340 memcpy(args->value, name, len); 341 args->valuelen = len; 342 return -EEXIST; 343 } 344 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki