Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp699390iog; Mon, 13 Jun 2022 10:56:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVNokMPcsNclSpWsCqlwxFRMPZNxW60azIQgEYuOjJhrhUI5DcJ+0h8Sz2D4rz/5JR3Nvu X-Received: by 2002:a17:906:4f:b0:712:af2:29d9 with SMTP id 15-20020a170906004f00b007120af229d9mr850636ejg.751.1655142978450; Mon, 13 Jun 2022 10:56:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655142978; cv=none; d=google.com; s=arc-20160816; b=OtI5rOz65fgCj232u0yIl8VGE/+sSkX+Gq8guBp2XGkos4iKRj57kfV2KK5KfREWEP GAHIls4rlr1L4TYuaa8Z8dQSIinUj6k5PgaaEoTsa483fViN5nN5vSF0rmbeZHDT4xiJ WLElMZrGfBZZHVcwzNCaFh5M4pQSaAFxn2qtUjrzhv/1ntnmxdD3uhUwxYwZSzhbimOJ Kr2JvjqwCuaghWq5lYI3MNzW0e6zzXRKtIywJXpyVKvsGSrybsRo3k754zHVKAkt4gma gcbgxIN4c8y2mIk8I+DXtG9zHPJ1j7RZ3LbRbABVIx4Zr01RVhms97byZt4fyiL1AZy6 Ngwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=M7hMxW1+Pl8ykTpq5bldxWBbwcqHb/p7LyQbFx3Llk0=; b=rFp1FZRMcdeE/JXfThHVJCQB1juZfDVR7l8Oq1e1PcefW1WMgNCpS1/waV9T3e7qDK 2w2fUzCXZUX5TLgaD8h1dTpnza8Fjc+PuXJXCbYMM2nYSUOKkTI0rZx4aHGc0RLf43Am fIg3qYC7ekQhPUlUa9t7Aqz+TxM75PiMEEKJpyEdklDwbmleGBxRSDjsmnPl4+oSrc8u L9I1R/3/hjzfDGzkZjR1dBKx360zmMIEheaCKKhxIilI/XtoZ5wA0L7MDd1fEox7FyB0 OjEK/FoulYxmlFALTQSY4DyMbqVcY09f8IkOz3G/2awr8wJJReYdvjOMnJcPT6Z3aJRN r1mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BIf8iJlu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g19-20020aa7dc53000000b0042de30cf6e5si8414086edu.365.2022.06.13.10.55.53; Mon, 13 Jun 2022 10:56:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BIf8iJlu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242051AbiFMRxB (ORCPT + 99 others); Mon, 13 Jun 2022 13:53:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242016AbiFMRwu (ORCPT ); Mon, 13 Jun 2022 13:52:50 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AC3874DC3 for ; Mon, 13 Jun 2022 06:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655127529; x=1686663529; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=bbuir7+M76SzGly2yS37ZmAUAl9BctEhBOZRYhVfaFI=; b=BIf8iJlu5dDBX8GUnA9Dvjq+Y8GatrUAwGEO/1TrAKAEdY2+yYZDcrS8 0qrARb+De8ppk71e3UW3byaakFbq8+vruuAAagM4TkY9bcmZ8EkwbavcD hOhuBr4cZQPs+LPRdhU/+gxR3gq6Fr64SWsi9Z+uHSCZpvRv6Q5bbgJv7 jUvR6AfH7XqQYC8AggZHZHcQ9PtPU9pCZc35myKj6mURyNLJOreI/zzE3 EN31ts4rnxbWa2K0EzEXNchti5CljeoY4WMTQQoTmCcJT3tbcFy/oc3ta CZlNzqtJqiJLAPuO7cgPBVE/maDVsr6t+Ees9Gk7gjWbBxMymckK78KzU w==; X-IronPort-AV: E=McAfee;i="6400,9594,10376"; a="258118177" X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="258118177" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 06:38:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="726273252" Received: from lkp-server01.sh.intel.com (HELO 60dabacc1df6) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 13 Jun 2022 06:38:46 -0700 Received: from kbuild by 60dabacc1df6 with local (Exim 4.95) (envelope-from ) id 1o0kHF-000KqF-B7; Mon, 13 Jun 2022 13:38:45 +0000 Date: Mon, 13 Jun 2022 21:37:48 +0800 From: kernel test robot To: Ren Yu , cl@linux.com Cc: kbuild-all@lists.01.org, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, liqiong@nfschina.com, qixu@nfschina.com, hukun@nfschina.com, yuzhe@nfschina.com, Ren Yu Subject: Re: [PATCH] mm: check the function kmalloc_slab return value Message-ID: <202206132134.VtqdhH9v-lkp@intel.com> References: <20220613102438.27723-1-renyu@nfschina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220613102438.27723-1-renyu@nfschina.com> X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ren, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/Ren-Yu/mm-check-the-function-kmalloc_slab-return-value/20220613-182849 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220613/202206132134.VtqdhH9v-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/5ba2024be9e85177c986e9078e903798cac72f74 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Ren-Yu/mm-check-the-function-kmalloc_slab-return-value/20220613-182849 git checkout 5ba2024be9e85177c986e9078e903798cac72f74 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): mm/slab.c: In function '__kmem_cache_create': >> mm/slab.c:2068:38: warning: returning 'struct kmem_cache *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] 2068 | return cachep->freelist_cache; | ~~~~~~^~~~~~~~~~~~~~~~ vim +2068 mm/slab.c 2063 2064 if (OFF_SLAB(cachep)) { 2065 cachep->freelist_cache = 2066 kmalloc_slab(cachep->freelist_size, 0u); 2067 if (unlikely(ZERO_OR_NULL_PTR(cachep->freelist_cache))) > 2068 return cachep->freelist_cache; 2069 } 2070 2071 err = setup_cpu_cache(cachep, gfp); 2072 if (err) { 2073 __kmem_cache_release(cachep); 2074 return err; 2075 } 2076 2077 return 0; 2078 } 2079 -- 0-DAY CI Kernel Test Service https://01.org/lkp