All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, edumazet@google.com,
	Stephen Hemminger <stephen@networkplumber.org>,
	David Ahern <dsahern@kernel.org>
Subject: Re: [PATCH net] ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr
Date: Fri, 5 Apr 2024 13:47:31 +0200	[thread overview]
Message-ID: <20240405134731.5db239c0@griffin> (raw)
In-Reply-To: <3e90336c-6859-474c-aa1e-01ccc665ad49@gmail.com>

On Fri, 5 Apr 2024 13:31:52 +0200, Eric Dumazet wrote:
> refcount_t semantic should prevent this double transition to 0  ?

You're right. This was found in an old kernel where it manifested
by a crash. In not so ancient kernels there's a refcount_t WARN:

[  202.500654] refcount_t: addition on 0; use-after-free.
[  202.500665] WARNING: CPU: 0 PID: 1327 at lib/refcount.c:25 refcount_warn_saturate+0x74/0x110

I knew about that but I wrote the commit message on the old kernel and
when updating it I missed this spot. Sorry about that.

> Can you include a stack trace in the changelog ?

I don't think I have a stack trace from the latest net kernel; let me
get one.

> Otherwise patch looks good to me, thanks !
> 
> Reviewed-by: Eric Dumazet <edumazet@google.com>

Thanks for the review! v2 with the updated commit message coming on
Monday.

 Jiri


  reply	other threads:[~2024-04-05 11:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 10:54 [PATCH net] ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr Jiri Benc
2024-04-05 11:31 ` Eric Dumazet
2024-04-05 11:47   ` Jiri Benc [this message]
2024-04-06 19:51 ` David Ahern

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=20240405134731.5db239c0@griffin \
    --to=jbenc@redhat.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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.