All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH v3 1/3] blk-mq: Clean up references to old requests when freeing rqs
Date: Sun, 07 Mar 2021 19:33:54 +0800	[thread overview]
Message-ID: <202103071954.596C7OsU-lkp@intel.com> (raw)
In-Reply-To: <1614957294-188540-2-git-send-email-john.garry@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 2986 bytes --]

Hi John,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on block/for-next]
[also build test WARNING on v5.12-rc2 next-20210305]
[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]

url:    https://github.com/0day-ci/linux/commits/John-Garry/blk-mq-Avoid-use-after-free-for-accessing-old-requests/20210307-114941
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-randconfig-s021-20210307 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-245-gacc5c298-dirty
        # https://github.com/0day-ci/linux/commit/674e3d5c77574c2d47df2cf8ab12c48064bac870
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review John-Garry/blk-mq-Avoid-use-after-free-for-accessing-old-requests/20210307-114941
        git checkout 674e3d5c77574c2d47df2cf8ab12c48064bac870
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
>> block/blk-mq.c:2306:33: sparse: sparse: Using plain integer as NULL pointer
>> block/blk-mq.c:2289:6: sparse: sparse: symbol '__blk_mq_free_rqs_ext' was not declared. Should it be static?

Please review and possibly fold the followup patch.

vim +2306 block/blk-mq.c

  2288	
> 2289	void __blk_mq_free_rqs_ext(struct blk_mq_tag_set *set, struct blk_mq_tags *tags,
  2290			     unsigned int hctx_idx, struct blk_mq_tags *ref_tags)
  2291	{
  2292		struct page *page;
  2293	
  2294		if (tags->rqs && set->ops->exit_request) {
  2295			int i;
  2296	
  2297			for (i = 0; i < tags->nr_tags; i++) {
  2298				struct request *rq = tags->static_rqs[i];
  2299				int j;
  2300	
  2301				if (!rq)
  2302					continue;
  2303				set->ops->exit_request(set, rq, hctx_idx);
  2304				/* clean up any references which occur in @ref_tags */
  2305				for (j = 0; ref_tags && j < ref_tags->nr_tags; j++)
> 2306					cmpxchg(&ref_tags->rqs[j], rq, 0);
  2307				tags->static_rqs[i] = NULL;
  2308			}
  2309		}
  2310	
  2311		while (!list_empty(&tags->page_list)) {
  2312			page = list_first_entry(&tags->page_list, struct page, lru);
  2313			list_del_init(&page->lru);
  2314			/*
  2315			 * Remove kmemleak object previously allocated in
  2316			 * blk_mq_alloc_rqs().
  2317			 */
  2318			kmemleak_free(page_address(page));
  2319			__free_pages(page, page->private);
  2320		}
  2321	}
  2322	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37439 bytes --]

  parent reply	other threads:[~2021-03-07 11:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 15:14 [RFC PATCH v3 0/3] blk-mq: Avoid use-after-free for accessing old requests John Garry
2021-03-05 15:14 ` [RFC PATCH v3 1/3] blk-mq: Clean up references to old requests when freeing rqs John Garry
2021-03-06  2:52   ` Khazhy Kumykov
2021-03-08 11:18     ` John Garry
2021-03-06 18:13   ` Bart Van Assche
2021-03-08 10:37     ` John Garry
2021-03-07 11:33   ` kernel test robot [this message]
2021-03-07 11:33   ` [RFC PATCH] blk-mq: __blk_mq_free_rqs_ext() can be static kernel test robot
2021-03-07 12:25   ` [RFC PATCH v3 1/3] blk-mq: Clean up references to old requests when freeing rqs kernel test robot
2021-03-05 15:14 ` [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for tagset in elevator_exit() John Garry
2021-03-06  4:32   ` Bart Van Assche
2021-03-08 10:50     ` John Garry
2021-03-08 19:35       ` Bart Van Assche
2021-03-10 15:57   ` Bart Van Assche
2021-03-11  0:58   ` Ming Lei
2021-03-11  8:21     ` John Garry
2021-03-12 23:05       ` Bart Van Assche
2021-03-16 16:15         ` John Garry
2021-03-16 17:00           ` Bart Van Assche
2021-03-16 17:43             ` John Garry
2021-03-16 19:59               ` Bart Van Assche
2021-03-19 18:19                 ` John Garry
2021-03-19 18:32                   ` Bart Van Assche
2021-03-05 15:14 ` [RFC PATCH v3 3/3] blk-mq: Lockout tagset iterator when exiting elevator John Garry
2021-03-06  4:43   ` Bart Van Assche
2021-03-08 11:17     ` John Garry
2021-03-08 19:59       ` Bart Van Assche
2021-03-09 17:47         ` John Garry
2021-03-09 19:21           ` Bart Van Assche
2021-03-10  8:52             ` John Garry
2021-03-10 16:00               ` Bart Van Assche
2021-03-10 17:26                 ` John Garry
2021-03-18 10:26 ` [RFC PATCH v3 0/3] blk-mq: Avoid use-after-free for accessing old requests Shinichiro Kawasaki

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=202103071954.596C7OsU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.