Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-25 Thread Tetsuo Handa
Jan Kara wrote: > > void delayed_work_timer_fn(struct timer_list *t) > > { > > struct delayed_work *dwork = from_timer(dwork, t, timer); > > > > /* should have been called from irqsafe timer with irq already off */ > > __queue_work(dwork->cpu, dwork->wq, >work); > > } > > > > Then,

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-21 Thread Jan Kara
On Sat 19-05-18 23:27:09, Tetsuo Handa wrote: > Tetsuo Handa wrote: > > Jan Kara wrote: > > > Make wb_workfn() use wakeup_wb() for requeueing the work which takes all > > > the necessary precautions against racing with bdi unregistration. > > > > Yes, this patch will solve NULL pointer

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-19 Thread Tetsuo Handa
Tetsuo Handa wrote: > Jan Kara wrote: > > Make wb_workfn() use wakeup_wb() for requeueing the work which takes all > > the necessary precautions against racing with bdi unregistration. > > Yes, this patch will solve NULL pointer dereference bug. But is it OK to leave > list_empty(>work_list) ==

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-09 Thread Jens Axboe
On 5/9/18 4:31 AM, Jan Kara wrote: > On Thu 03-05-18 18:26:26, Jan Kara wrote: >> Syzbot has reported that it can hit a NULL pointer dereference in >> wb_workfn() due to wb->bdi->dev being NULL. This indicates that >> wb_workfn() was called for an already unregistered bdi which should not >>

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-09 Thread Jan Kara
On Thu 03-05-18 18:26:26, Jan Kara wrote: > Syzbot has reported that it can hit a NULL pointer dereference in > wb_workfn() due to wb->bdi->dev being NULL. This indicates that > wb_workfn() was called for an already unregistered bdi which should not > happen as wb_shutdown() called from

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-09 Thread Jan Kara
On Fri 04-05-18 07:55:58, Dave Chinner wrote: > On Thu, May 03, 2018 at 06:26:26PM +0200, Jan Kara wrote: > > Syzbot has reported that it can hit a NULL pointer dereference in > > wb_workfn() due to wb->bdi->dev being NULL. This indicates that > > wb_workfn() was called for an already unregistered

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-09 Thread Jan Kara
On Fri 04-05-18 07:35:34, Tetsuo Handa wrote: > Jan Kara wrote: > > Make wb_workfn() use wakeup_wb() for requeueing the work which takes all > > the necessary precautions against racing with bdi unregistration. > > Yes, this patch will solve NULL pointer dereference bug. But is it OK to > leave

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-03 Thread Tetsuo Handa
Jan Kara wrote: > Make wb_workfn() use wakeup_wb() for requeueing the work which takes all > the necessary precautions against racing with bdi unregistration. Yes, this patch will solve NULL pointer dereference bug. But is it OK to leave list_empty(>work_list) == false situation? Who takes over

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-03 Thread Jens Axboe
On 5/3/18 3:55 PM, Dave Chinner wrote: > On Thu, May 03, 2018 at 06:26:26PM +0200, Jan Kara wrote: >> Syzbot has reported that it can hit a NULL pointer dereference in >> wb_workfn() due to wb->bdi->dev being NULL. This indicates that >> wb_workfn() was called for an already unregistered bdi which

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-03 Thread Dave Chinner
On Thu, May 03, 2018 at 06:26:26PM +0200, Jan Kara wrote: > Syzbot has reported that it can hit a NULL pointer dereference in > wb_workfn() due to wb->bdi->dev being NULL. This indicates that > wb_workfn() was called for an already unregistered bdi which should not > happen as wb_shutdown() called

[PATCH] bdi: Fix oops in wb_workfn()

2018-05-03 Thread Jan Kara
Syzbot has reported that it can hit a NULL pointer dereference in wb_workfn() due to wb->bdi->dev being NULL. This indicates that wb_workfn() was called for an already unregistered bdi which should not happen as wb_shutdown() called from bdi_unregister() should make sure all pending writeback