Re: [PATCH 5.9 374/391] null_blk: synchronization fix for zoned device
From: Greg Kroah-Hartman
Date: Wed Nov 04 2020 - 04:09:59 EST
On Tue, Nov 03, 2020 at 11:36:35PM +0000, Damien Le Moal wrote:
> On 2020/11/04 5:52, Greg Kroah-Hartman wrote:
> > From: Kanchan Joshi <joshi.k@xxxxxxxxxxx>
> >
> > commit 35bc10b2eafbb701064b94f283b77c54d3304842 upstream.
> >
> > Parallel write,read,zone-mgmt operations accessing/altering zone state
> > and write-pointer may get into race. Avoid the situation by using a new
> > spinlock for zoned device.
> > Concurrent zone-appends (on a zone) returning same write-pointer issue
> > is also avoided using this lock.
> >
> > Cc: stable@xxxxxxxxxxxxxxx
> > Fixes: e0489ed5daeb ("null_blk: Support REQ_OP_ZONE_APPEND")
> > Signed-off-by: Kanchan Joshi <joshi.k@xxxxxxxxxxx>
> > Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx>
> > Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> Greg,
>
> I sent a followup patch fixing a bug introduced by this patch, but I forgot to
> mark it for stable. The patch is
>
> commit aa1c09cb65e2 "null_blk: Fix locking in zoned mode"
>
> Could you pickup that one too please ?
It doesn't apply cleanly at all, can you provide a backport?
thanks,
greg k-h