LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Paolo Abeni <pabeni@redhat.com>, Thomas Graf <tgraf@suug.ch>,
Herbert Xu <herbert@gondor.apana.org.au>,
David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [4/4] rhashtable: improve rhashtable_walk stability when stop/start used.
Date: Sun, 08 Jul 2018 08:11:54 +1000 [thread overview]
Message-ID: <87tvpawv9x.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <86f305ff238d7cdac7ab20b0d6395cc6571cf4e0.camel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]
On Thu, Jul 05 2018, Paolo Abeni wrote:
>
> While testing new code that uses the rhashtable walker, I'm obeserving
> an use after free, that is apparently caused by the above:
>
> [ 146.834815] ==================================================================
> [ 146.842933] BUG: KASAN: use-after-free in inet_frag_worker+0x9f/0x210
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Hi,
did you get a chance to run ./scripts/faddr2line on this address and
find out where it is crashing? I had a look in the code you posted and
couldn't see anything obvious.
> [ 146.850120] Read of size 4 at addr ffff881b6b9342d8 by task kworker/13:1/177
> [ 146.857984]
> [ 146.859645] CPU: 13 PID: 177 Comm: kworker/13:1 Not tainted 4.18.0-rc3.mirror_unclone_6_frag_dbg+ #1974
> [ 146.870128] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.1.7 06/16/2016
> [ 146.878478] Workqueue: events inet_frag_worker
> [ 146.883433] Call Trace:
> [ 146.886162] dump_stack+0x90/0xe3
> [ 146.889861] print_address_description+0x6a/0x2a0
> [ 146.895109] kasan_report+0x176/0x2d0
> [ 146.899193] ? inet_frag_worker+0x9f/0x210
> [ 146.903762] inet_frag_worker+0x9f/0x210
> [ 146.908142] process_one_work+0x24f/0x6e0
> [ 146.912614] ? process_one_work+0x1a6/0x6e0
> [ 146.917285] worker_thread+0x4e/0x3d0
> [ 146.921373] kthread+0x106/0x140
> [ 146.924970] ? process_one_work+0x6e0/0x6e0
> [ 146.929637] ? kthread_bind+0x10/0x10
> [ 146.933723] ret_from_fork+0x3a/0x50
> [ 146.937717]
> [ 146.939377] Allocated by task 177:
> [ 146.943170] kasan_kmalloc+0x86/0xb0
> [ 146.947158] __kmalloc_node+0x181/0x430
> [ 146.951438] kvmalloc_node+0x4f/0x70
> [ 146.955427] alloc_bucket_spinlocks+0x34/0xa0
This seems to suggest that it is one of the bucket spinlocks that is
being incorrectly referenced, but they aren't referenced in the failing
code at all. I cannot imagine how to interpret that.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-07-07 22:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 22:29 [PATCH 0/4] A few rhashtables cleanups NeilBrown
2018-04-23 22:29 ` [PATCH 4/4] rhashtable: improve rhashtable_walk stability when stop/start used NeilBrown
2018-07-05 11:20 ` [4/4] " Paolo Abeni
2018-07-05 22:56 ` NeilBrown
2018-07-07 22:11 ` NeilBrown [this message]
2018-04-23 22:29 ` [PATCH 2/4] rhashtable: Revise incorrect comment on r{hl, hash}table_walk_enter() NeilBrown
2018-04-23 22:29 ` [PATCH 3/4] rhashtable: reset iter when rhashtable_walk_start sees new table NeilBrown
2018-04-23 22:29 ` [PATCH 1/4] rhashtable: remove outdated comments about grow_decision etc NeilBrown
2018-04-24 17:38 ` [PATCH 0/4] A few rhashtables cleanups 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=87tvpawv9x.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tgraf@suug.ch \
--subject='Re: [4/4] rhashtable: improve rhashtable_walk stability when stop/start used.' \
/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
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).