From: Thomas Graf <tgraf@suug.ch>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org
Subject: Re: rhashtable: Fix potential crash on destroy in rhashtable_shrink
Date: Sat, 31 Jan 2015 11:16:52 +0000 [thread overview]
Message-ID: <20150131111652.GA22448@casper.infradead.org> (raw)
In-Reply-To: <20150131093637.GA29106@gondor.apana.org.au>
On 01/31/15 at 08:36pm, Herbert Xu wrote:
> The current being_destroyed check in rhashtable_expand is not
> enough since if we start a shrinking process after freeing all
> elements in the table that's also going to crash.
(The check in expand() is just an optimization to drop out of
work cycles if it does not make sense to continue anymore.)
>
> This patch adds a being_destroyed check to the deferred worker
> thread so that we bail out as soon as we take the lock.
Shouldn't the cancel_work_sync() in rhashtable_destroy() block
until the deferred worker is done and cancelled?
next prev parent reply other threads:[~2015-01-31 11:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-31 9:36 rhashtable: Fix potential crash on destroy in rhashtable_shrink Herbert Xu
2015-01-31 11:16 ` Thomas Graf [this message]
2015-01-31 11:22 ` Herbert Xu
2015-01-31 12:15 ` Thomas Graf
2015-02-02 9:34 ` Ying Xue
2015-02-02 9:48 ` Thomas Graf
2015-02-03 3:19 ` David Miller
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=20150131111652.GA22448@casper.infradead.org \
--to=tgraf@suug.ch \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).