All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: a.darwish@linutronix.de, axboe@kernel.dk, bigeasy@linutronix.de,
	stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] block: nr_sects_write(): Disable preemption on seqcount write" failed to apply to 5.4-stable tree
Date: Mon, 22 Jun 2020 20:35:50 -0400	[thread overview]
Message-ID: <20200623003550.GP1931@sasha-vm> (raw)
In-Reply-To: <1592574219220115@kroah.com>

On Fri, Jun 19, 2020 at 03:43:39PM +0200, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 5.4-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 15b81ce5abdc4b502aa31dff2d415b79d2349d2f Mon Sep 17 00:00:00 2001
>From: "Ahmed S. Darwish" <a.darwish@linutronix.de>
>Date: Wed, 3 Jun 2020 16:49:48 +0200
>Subject: [PATCH] block: nr_sects_write(): Disable preemption on seqcount write
>
>For optimized block readers not holding a mutex, the "number of sectors"
>64-bit value is protected from tearing on 32-bit architectures by a
>sequence counter.
>
>Disable preemption before entering that sequence counter's write side
>critical section. Otherwise, the read side can preempt the write side
>section and spin for the entire scheduler tick. If the reader belongs to
>a real-time scheduling class, it can spin forever and the kernel will
>livelock.
>
>Fixes: c83f6bf98dc1 ("block: add partition resize function to blkpg ioctl")
>Cc: <stable@vger.kernel.org>
>Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
>Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>Signed-off-by: Jens Axboe <axboe@kernel.dk>

part_nr_sects_write() was in include/linux/genhd.h before 581e26004a09
("block: move block layer internals out of include/linux/genhd.h").
Fixed and queued for all branched.

-- 
Thanks,
Sasha

      reply	other threads:[~2020-06-23  0:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 13:43 FAILED: patch "[PATCH] block: nr_sects_write(): Disable preemption on seqcount write" failed to apply to 5.4-stable tree gregkh
2020-06-23  0:35 ` Sasha Levin [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=20200623003550.GP1931@sasha-vm \
    --to=sashal@kernel.org \
    --cc=a.darwish@linutronix.de \
    --cc=axboe@kernel.dk \
    --cc=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --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 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.