Re: [PATCH v3] block: Fix use-after-free in blkdev_get()

2020-06-07 Thread Jason Yan
在 2020/6/5 22:37, Jan Kara 写道: No need for braces here after you remove bdput(). With this fixed, feel free to add: Reviewed-by: Jan Kara Thanks, I will fix it in v4. Jason

Re: [PATCH v3] block: Fix use-after-free in blkdev_get()

2020-06-07 Thread Jason Yan
在 2020/6/5 19:05, Sedat Dilek 写道: On Fri, Jun 5, 2020 at 12:23 PM Jason Yan wrote: In blkdev_get() we call __blkdev_get() to do some internal jobs and if there is some errors in __blkdev_get(), the bdput() is called which means we have released the refcount of the bdev (actually the refcoun

Re: [PATCH v3] block: Fix use-after-free in blkdev_get()

2020-06-05 Thread Jan Kara
On Fri 05-06-20 18:45:58, Jason Yan wrote: > In blkdev_get() we call __blkdev_get() to do some internal jobs and if > there is some errors in __blkdev_get(), the bdput() is called which > means we have released the refcount of the bdev (actually the refcount of > the bdev inode). This means we cann

Re: [PATCH v3] block: Fix use-after-free in blkdev_get()

2020-06-05 Thread Sedat Dilek
On Fri, Jun 5, 2020 at 12:23 PM Jason Yan wrote: > > In blkdev_get() we call __blkdev_get() to do some internal jobs and if > there is some errors in __blkdev_get(), the bdput() is called which > means we have released the refcount of the bdev (actually the refcount of > the bdev inode). This mean

[PATCH v3] block: Fix use-after-free in blkdev_get()

2020-06-05 Thread Jason Yan
In blkdev_get() we call __blkdev_get() to do some internal jobs and if there is some errors in __blkdev_get(), the bdput() is called which means we have released the refcount of the bdev (actually the refcount of the bdev inode). This means we cannot access bdev after that point. But accually bdev