All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: bp@alien8.de, tglx@linutronix.de, mingo@redhat.com,
	x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/microcode/amd: Add __list_del_entry_valid() in front of __list_del() in free_cache()
Date: Tue, 28 Sep 2021 15:29:19 +0100	[thread overview]
Message-ID: <YVMmv5AlKcJeKBkh@infradead.org> (raw)
In-Reply-To: <1632819884-800736-1-git-send-email-jiasheng@iscas.ac.cn>

On Tue, Sep 28, 2021 at 09:04:44AM +0000, Jiasheng Jiang wrote:
> Directly use __list_del() to remove 'p->plist' might be unsafe,
> as we can see from the __list_del_entry_valid() of 'lib/list_debug.c'
> that p->plist->prev or p->plist->next may be the LIST_POISON,
> or p->list is not a valid double list.
> In that case, __list_del() will be corruption.
> Therefore, we suggest that __list_del_entry_valid()
> should be added in front of the __list_del() in free_cache.

No one should be using list_del directly anyway, so please fix that.

      reply	other threads:[~2021-09-28 14:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  9:04 [PATCH] x86/microcode/amd: Add __list_del_entry_valid() in front of __list_del() in free_cache() Jiasheng Jiang
2021-09-28 14:29 ` Christoph Hellwig [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=YVMmv5AlKcJeKBkh@infradead.org \
    --to=hch@infradead.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jiasheng@iscas.ac.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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 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.