Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp997238rwr; Thu, 20 Apr 2023 08:42:04 -0700 (PDT) X-Google-Smtp-Source: AKy350bdFpujuSvpc7YX++8Ruwo15zfI1UGm+ZPd9S+ZFlNX0elomLF34uEKxmfQ5sCil0r6mXYX X-Received: by 2002:a17:90b:4c0c:b0:247:83fe:12b6 with SMTP id na12-20020a17090b4c0c00b0024783fe12b6mr2017360pjb.43.1682005323915; Thu, 20 Apr 2023 08:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682005323; cv=none; d=google.com; s=arc-20160816; b=JNvDxNMAXe1iCyTebECTPs9M24LbhpbMt8fVKoZie9yAuaF9E5TJr5k/Xp4RMtuvtH DBbOyDLhYtxsiOGymJxTkooH7wgR/p8tZ6iPh5giUf1gAyvEYFFbEtL2u2AN5IsxhfGa p962OonFsSZr7HYxdozfWJdaKDb4r32T3kV2kvmvRn32P+au2PlLeiD5Rev0N46a5cqy P1sqxyRpOa0jZ9r3gF0zFLB7m4n60mC7ozvhLmHANV3SyeVOdMiBJa6IiSpuB9Z9/z6e JswR+jFqFhHoPfX8CjT0LuhNC33hozOx9ogcNETUY+hbNkc94hNDeTXoUl/KR39WZHQh H6hQ== 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=vaFLMKuVZblVR9sC/x/uFanAfQBoE84jsL6Vp8WXx6A=; b=Dtod6Nd+UsnzViZn453rcISXs4lBpmpnCpZAZzKnwHdlPdZcvPyNBy+3lRT759/tjw 3d/JTvd344P9UL1EKZS0O0TvhDtOfwGCjtoB9djoFwel5086i3SOZh4QDOgV16g5h6V2 JZSn5VJX0QHUuOpwzHRg2UJ2Yd9xUpNRu8wwTbmFHj8Dfm/ChnqgbvUL6j/xtu0PNAuY V6O/YIQGlZMOwPFQBfkDStnKGqU3f+1EaM66HXkJ/iSOso30QPA+hurQcmfNNUNGglFE awf51iV2doVvZDwieaC/p9jOS9NOMMyhS5213ji9yiFgPUTtERgrYff3VlhQw6lsbEvu TWjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Xcmt9R/L"; 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 em14-20020a17090b014e00b00247b413f4ffsi2079053pjb.185.2023.04.20.08.41.46; Thu, 20 Apr 2023 08:42:03 -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="Xcmt9R/L"; 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 S231805AbjDTPgv (ORCPT + 99 others); Thu, 20 Apr 2023 11:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjDTPgt (ORCPT ); Thu, 20 Apr 2023 11:36:49 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D1575581; Thu, 20 Apr 2023 08:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682005007; x=1713541007; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=iO/i2tt5DEzt8gruW8+zs93sVMgkJU4X3e0uYovtxx8=; b=Xcmt9R/LozyKo+AlCCS4SPBwcVfJgdODNuBGbRQSpqvqUnbK3sDI3WWI Ai9hQm5jAvuUV2y3tE+tkWgpzj8oh8jaE5qTq8qItSuygO3ur+XtgZCyi Pk71I+UdVneHTCpxXlD4D6ZGboWGAahcA9V5GMYvnzTvu63eq6ITxudyW oWQUfYN6nfA+u8pFno9gA26F7D9haAaM4rkPcD6cmSL8H8+RUCOEK6iHD z8r/+l/H6W+NV/yuJTfHjNZ7YZI+nY5/GP/kKR3+zH2xNq458Aw/vOLqv nSsX+C06jjP1Ux5uqJ9VKQtCex5+fu7ZuFC0nIXEb5M6DKuANcbyNfVlc w==; X-IronPort-AV: E=McAfee;i="6600,9927,10686"; a="348533242" X-IronPort-AV: E=Sophos;i="5.99,213,1677571200"; d="scan'208";a="348533242" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 08:36:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10686"; a="756537428" X-IronPort-AV: E=Sophos;i="5.99,213,1677571200"; d="scan'208";a="756537428" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by fmsmga008.fm.intel.com with ESMTP; 20 Apr 2023 08:36:44 -0700 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1ppWKx-000fuA-2b; Thu, 20 Apr 2023 15:36:43 +0000 Date: Thu, 20 Apr 2023 23:35:56 +0800 From: kernel test robot To: Daniil Tatianin , Song Liu Cc: oe-kbuild-all@lists.linux.dev, Daniil Tatianin , linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] md/md-multipath: guard against a possible NULL dereference Message-ID: <202304202346.fddWOoq1-lkp@intel.com> References: <20230420071851.326726-1-d-tatianin@yandex-team.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230420071851.326726-1-d-tatianin@yandex-team.ru> X-Spam-Status: No, score=-4.4 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_NONE,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 Daniil, kernel test robot noticed the following build errors: [auto build test ERROR on song-md/md-next] [also build test ERROR on linus/master v6.3-rc7 next-20230419] [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/Daniil-Tatianin/md-md-multipath-guard-against-a-possible-NULL-dereference/20230420-152235 base: git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git md-next patch link: https://lore.kernel.org/r/20230420071851.326726-1-d-tatianin%40yandex-team.ru patch subject: [PATCH] md/md-multipath: guard against a possible NULL dereference config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230420/202304202346.fddWOoq1-lkp@intel.com/config) compiler: m68k-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/3b0e378bb2e165f35044ecb535fb1ed973ea392e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Daniil-Tatianin/md-md-multipath-guard-against-a-possible-NULL-dereference/20230420-152235 git checkout 3b0e378bb2e165f35044ecb535fb1ed973ea392e # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202304202346.fddWOoq1-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/md/md-multipath.c: In function 'multipath_make_request': >> drivers/md/md-multipath.c:111:14: error: 'map_bh' undeclared (first use in this function); did you mean 'mp_bh'? 111 | if (!map_bh) | ^~~~~~ | mp_bh drivers/md/md-multipath.c:111:14: note: each undeclared identifier is reported only once for each function it appears in vim +111 drivers/md/md-multipath.c 99 100 static bool multipath_make_request(struct mddev *mddev, struct bio * bio) 101 { 102 struct mpconf *conf = mddev->private; 103 struct multipath_bh * mp_bh; 104 struct multipath_info *multipath; 105 106 if (unlikely(bio->bi_opf & REQ_PREFLUSH) 107 && md_flush_request(mddev, bio)) 108 return true; 109 110 mp_bh = mempool_alloc(&conf->pool, GFP_NOIO); > 111 if (!map_bh) 112 return false; 113 114 mp_bh->master_bio = bio; 115 mp_bh->mddev = mddev; 116 117 mp_bh->path = multipath_map(conf); 118 if (mp_bh->path < 0) { 119 bio_io_error(bio); 120 mempool_free(mp_bh, &conf->pool); 121 return true; 122 } 123 multipath = conf->multipaths + mp_bh->path; 124 125 bio_init_clone(multipath->rdev->bdev, &mp_bh->bio, bio, GFP_NOIO); 126 127 mp_bh->bio.bi_iter.bi_sector += multipath->rdev->data_offset; 128 mp_bh->bio.bi_opf |= REQ_FAILFAST_TRANSPORT; 129 mp_bh->bio.bi_end_io = multipath_end_request; 130 mp_bh->bio.bi_private = mp_bh; 131 mddev_check_write_zeroes(mddev, &mp_bh->bio); 132 submit_bio_noacct(&mp_bh->bio); 133 return true; 134 } 135 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests