From: Tejun Heo <tj@kernel.org>
To: Roman Pen <roman.penyaev@profitbricks.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] percpu-refcount: do not forget to rcu_barrier() just before freeing
Date: Wed, 10 Aug 2016 18:09:32 -0400 [thread overview]
Message-ID: <20160810220932.GA2695@mtj.duckdns.org> (raw)
In-Reply-To: <20160810195539.6588-1-roman.penyaev@profitbricks.com>
On Wed, Aug 10, 2016 at 09:55:39PM +0200, Roman Pen wrote:
> percpu issues some RCU callbacks to synchronize its state, so before
> freeing we have to wait all those callbacks to finish.
>
> E.g. the following simple sequence on stack causes nasty crash:
>
> struct percpu_ref ref;
>
> percpu_ref_init(&ref, release, 0, GFP_KERNEL);
> percpu_ref_kill(&ref);
> percpu_ref_exit(&ref);
Hmmm... that's just an illegal sequence of operations. You can't exit
a ref which hasn't completed killing yet (the kill callback hasn't
been called).
Thanks.
--
tejun
next prev parent reply other threads:[~2016-08-10 22:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 19:55 Roman Pen
2016-08-10 22:09 ` Tejun Heo [this message]
2016-08-11 9:07 ` Roman Penyaev
2016-08-11 16:29 ` Tejun Heo
2016-08-11 17:29 ` Roman Penyaev
2016-08-15 4:34 ` [lkp] [percpu] e1bd8275fa: xfstests.generic.323.fail kernel test robot
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=20160810220932.GA2695@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roman.penyaev@profitbricks.com \
/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®