linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Maurizio Lombardi <mlombard@redhat.com>
To: Martin Wilck <mwilck@suse.com>
Cc: Hannes Reinecke <hare@suse.de>, Christoph Hellwig <hch@lst.de>,
	Keith Busch <kbusch@kernel.org>,
	 Sagi Grimberg <sagi@grimberg.me>,
	Chao Leng <lengchao@huawei.com>, Daniel Wagner <dwagner@suse.de>,
	 linux-nvme@lists.infradead.org, stable@vger.kernel.org
Subject: Re: [PATCH v3] nvme: rdma/tcp: fix list corruption with anatt timer
Date: Wed, 28 Apr 2021 09:21:56 +0200	[thread overview]
Message-ID: <CAFL455=fqaaymf8PrmT4W_qkvcH0roymwFeE2g-ihAg4tcrKCw@mail.gmail.com> (raw)
In-Reply-To: <e11706e498a583b764ff9e9b1b7de409f996ad07.camel@suse.com>

st 28. 4. 2021 v 9:06 odesílatel Martin Wilck <mwilck@suse.com> napsal:
>
> Yes, that's what I think has happened. timer_setup() doesn't clear any
> pointers in the list of pending timers pointing to this entry. If the
> newly-initialized timer is then added with mod_timer(), it becomes
> linked in a second timer list. When the first one expires, the timer
> will be detached, but only from one of the lists it's pending in. In a
> scenario like the one we faced, this could actually happen multiple
> times. If the detached timer remains linked into a timer list, once
> that list is traversed, the kernel dereferences a pointer with value
> LIST_POISON2, and crashes.

Yes I think it makes sense.
timer_setup() modifies the timer's base in the "flags" field, then mod_timer()
could add the timer to the wrong base structure.

Maurizio


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

      reply	other threads:[~2021-04-28  7:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27  8:52 [PATCH v3] nvme: rdma/tcp: fix list corruption with anatt timer mwilck
2021-04-27  9:16 ` Daniel Wagner
2021-04-27  9:33 ` Hannes Reinecke
2021-04-27 16:25   ` Christoph Hellwig
2021-04-27 18:05     ` Hannes Reinecke
2021-04-27 18:10       ` Christoph Hellwig
2021-04-27 19:54       ` Martin Wilck
2021-04-28  6:35         ` Hannes Reinecke
2021-04-28  6:41           ` Martin Wilck
2021-04-28  6:39         ` Maurizio Lombardi
2021-04-28  7:06           ` Martin Wilck
2021-04-28  7:21             ` Maurizio Lombardi [this message]

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='CAFL455=fqaaymf8PrmT4W_qkvcH0roymwFeE2g-ihAg4tcrKCw@mail.gmail.com' \
    --to=mlombard@redhat.com \
    --cc=dwagner@suse.de \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=lengchao@huawei.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mwilck@suse.com \
    --cc=sagi@grimberg.me \
    --cc=stable@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).