Re: [Linux-kernel-mentees] [PATCH] block: Fix use-after-free in bdev_del_partition()

2020-09-03 Thread Peilin Ye
On Thu, Sep 03, 2020 at 08:59:50AM +0200, Christoph Hellwig wrote: > On Thu, Sep 03, 2020 at 02:55:34AM -0400, Peilin Ye wrote: > > In bdev_del_partition(), `part` is being looked up outside the critical > > section. This is causing bdev_del_partition() to delete the same partition > > more than

Re: [Linux-kernel-mentees] [PATCH] block: Fix use-after-free in bdev_del_partition()

2020-09-03 Thread Christoph Hellwig
On Thu, Sep 03, 2020 at 02:55:34AM -0400, Peilin Ye wrote: > In bdev_del_partition(), `part` is being looked up outside the critical > section. This is causing bdev_del_partition() to delete the same partition > more than once. Fix it by reverting commit cddae808aeb7. We've already fix the

[Linux-kernel-mentees] [PATCH] block: Fix use-after-free in bdev_del_partition()

2020-09-03 Thread Peilin Ye
In bdev_del_partition(), `part` is being looked up outside the critical section. This is causing bdev_del_partition() to delete the same partition more than once. Fix it by reverting commit cddae808aeb7. Fixes: cddae808aeb7 ("block: pass a hd_struct to delete_partition") Reported-and-tested-by: