Re: [PATCH v4 3/5] blktrace: fix debugfs use after free

2020-05-11 Thread Luis Chamberlain
On Sun, May 10, 2020 at 08:26:36AM +0200, Greg KH wrote: > On Sat, May 09, 2020 at 03:10:56AM +, Luis Chamberlain wrote: > > diff --git a/block/blk-debugfs.c b/block/blk-debugfs.c > > index 19091e1effc0..d40f12aecf8a 100644 > > --- a/block/blk-debugfs.c > > +++ b/block/blk-debugfs.c > > +static

Re: [PATCH v4 3/5] blktrace: fix debugfs use after free

2020-05-11 Thread Luis Chamberlain
On Sat, May 09, 2020 at 05:58:55PM -0700, Bart Van Assche wrote: > On 2020-05-08 20:10, Luis Chamberlain wrote: > > Screenshots of what the debugfs for block looks like after running > > blktrace on a system with sg0 which has a raid controllerand then sg1 > > as the media changer: > > > > # ls

Re: [PATCH v4 3/5] blktrace: fix debugfs use after free

2020-05-09 Thread Greg KH
On Sat, May 09, 2020 at 03:10:56AM +, Luis Chamberlain wrote: > On commit 6ac93117ab00 ("blktrace: use existing disk debugfs directory") > merged on v4.12 Omar fixed the original blktrace code for request-based > drivers (multiqueue). This however left in place a possible crash, if you > happen

Re: [PATCH v4 3/5] blktrace: fix debugfs use after free

2020-05-09 Thread Bart Van Assche
On 2020-05-08 20:10, Luis Chamberlain wrote: > Screenshots of what the debugfs for block looks like after running > blktrace on a system with sg0 which has a raid controllerand then sg1 > as the media changer: > > # ls -l /sys/kernel/debug/block > total 0 > drwxr-xr-x 3 root root 0 May 9 02:31

[PATCH v4 3/5] blktrace: fix debugfs use after free

2020-05-08 Thread Luis Chamberlain
On commit 6ac93117ab00 ("blktrace: use existing disk debugfs directory") merged on v4.12 Omar fixed the original blktrace code for request-based drivers (multiqueue). This however left in place a possible crash, if you happen to abuse blktrace while racing to remove / add a device. We used to use