Re: [PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-06 Thread Lars Ellenberg
On Wed, Apr 06, 2016 at 01:10:57PM +1000, NeilBrown wrote: > On Wed, Apr 06 2016, Shaohua Li wrote: > > > On Tue, Apr 05, 2016 at 03:36:57PM +0200, Lars Ellenberg wrote: > >> blk_check_plugged() will return a pointer > >> to an object linked on current->plug->cb_list. > >> > >> That list may "at

Re: [PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread NeilBrown
On Wed, Apr 06 2016, Shaohua Li wrote: > On Tue, Apr 05, 2016 at 03:36:57PM +0200, Lars Ellenberg wrote: >> blk_check_plugged() will return a pointer >> to an object linked on current->plug->cb_list. >> >> That list may "at any time" be implicitly cleared by >> blk_flush_plug_list() >>

Re: [PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread Shaohua Li
On Tue, Apr 05, 2016 at 03:36:57PM +0200, Lars Ellenberg wrote: > blk_check_plugged() will return a pointer > to an object linked on current->plug->cb_list. > > That list may "at any time" be implicitly cleared by > blk_flush_plug_list() > flush_plug_callbacks() > either as a result of

Re: [PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread Chris Mason
On Tue, Apr 05, 2016 at 03:36:57PM +0200, Lars Ellenberg wrote: > blk_check_plugged() will return a pointer > to an object linked on current->plug->cb_list. > > That list may "at any time" be implicitly cleared by > blk_flush_plug_list() > flush_plug_callbacks() > either as a result of

Re: [PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread NeilBrown
On Tue, Apr 05 2016, Lars Ellenberg wrote: > blk_check_plugged() will return a pointer > to an object linked on current->plug->cb_list. > > That list may "at any time" be implicitly cleared by > blk_flush_plug_list() > flush_plug_callbacks() > either as a result of blk_finish_plug(), > or

[PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread Lars Ellenberg
blk_check_plugged() will return a pointer to an object linked on current->plug->cb_list. That list may "at any time" be implicitly cleared by blk_flush_plug_list() flush_plug_callbacks() either as a result of blk_finish_plug(), or implicitly by schedule() [and maybe other implicit mechanisms?]