From: kernel test robot <lkp@intel.com>
To: Daniil Tatianin <d-tatianin@yandex-team.ru>, Song Liu <song@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
Daniil Tatianin <d-tatianin@yandex-team.ru>,
linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] md/md-multipath: guard against a possible NULL dereference
Date: Thu, 20 Apr 2023 23:35:56 +0800 [thread overview]
Message-ID: <202304202346.fddWOoq1-lkp@intel.com> (raw)
In-Reply-To: <20230420071851.326726-1-d-tatianin@yandex-team.ru>
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 <lkp@intel.com>
| 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
prev parent reply other threads:[~2023-04-20 15:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 7:18 Daniil Tatianin
2023-04-20 15:35 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202304202346.fddWOoq1-lkp@intel.com \
--to=lkp@intel.com \
--cc=d-tatianin@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®