public inbox for [email protected]
 help / color / mirror / Atom feed
From: Dan Carpenter <[email protected]>
To: Jens Axboe <[email protected]>
Cc: Dmitry Vyukov <[email protected]>,
	syzbot <[email protected]>,
	Al Viro <[email protected]>,
	[email protected],
	linux-fsdevel <[email protected]>,
	Borislav Petkov <[email protected]>, "H. Peter Anvin" <[email protected]>,
	LKML <[email protected]>,
	Ingo Molnar <[email protected]>,
	Peter Zijlstra <[email protected]>,
	syzkaller-bugs <[email protected]>,
	Thomas Gleixner <[email protected]>,
	[email protected], the arch/x86 maintainers <[email protected]>
Subject: Re: KASAN: use-after-free Read in percpu_ref_switch_to_atomic_rcu
Date: Fri, 6 Mar 2020 17:35:52 +0300	[thread overview]
Message-ID: <20200306143552.GC19839@kadam> (raw)
In-Reply-To: <[email protected]>


There a bunch of similar bugs.  It's seems a common anti-pattern.

block/blk-cgroup.c:85 blkg_free() warn: freeing 'blkg' which has percpu_ref_exit()
block/blk-core.c:558 blk_alloc_queue_node() warn: freeing 'q' which has percpu_ref_exit()
drivers/md/md.c:5528 md_free() warn: freeing 'mddev' which has percpu_ref_exit()
drivers/target/target_core_transport.c:583 transport_free_session() warn: freeing 'se_sess' which has percpu_ref_exit()
fs/aio.c:592 free_ioctx() warn: freeing 'ctx' which has percpu_ref_exit()
fs/aio.c:806 ioctx_alloc() warn: freeing 'ctx' which has percpu_ref_exit()
fs/io_uring.c:6115 io_sqe_files_unregister() warn: freeing 'data' which has percpu_ref_exit()
fs/io_uring.c:6431 io_sqe_files_register() warn: freeing 'ctx->file_data' which has percpu_ref_exit()
fs/io_uring.c:7134 io_ring_ctx_free() warn: freeing 'ctx' which has percpu_ref_exit()
kernel/cgroup/cgroup.c:4948 css_free_rwork_fn() warn: freeing 'css' which has percpu_ref_exit()
mm/backing-dev.c:615 cgwb_create() warn: freeing 'wb' which has percpu_ref_exit()

regards,
dan carpenter


  reply	other threads:[~2020-03-06 14:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[email protected]>
2020-03-04  7:59 ` KASAN: use-after-free Read in percpu_ref_switch_to_atomic_rcu Dmitry Vyukov
2020-03-04 14:40   ` Jens Axboe
2020-03-06 14:35     ` Dan Carpenter [this message]
2020-03-06 14:57       ` Jens Axboe
2020-03-06 14:57     ` Jann Horn
2020-03-06 15:34       ` Jens Axboe
2020-03-06 15:36         ` Jann Horn
2020-03-06 16:44           ` Paul E. McKenney
2020-03-06 17:00             ` Jens Axboe
2020-03-06 17:08               ` Jens Axboe
2020-03-06 17:19               ` Paul E. McKenney
2020-03-06 17:21                 ` Jens Axboe

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=20200306143552.GC19839@kadam \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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