On Tue, Sep 19, 2017 at 3:11 PM, Coly Li <colyli@xxxxxxx> wrote: > In bcache code, sysfs entries are created before all resources get > allocated, e.g. allocation thread of a cache set. > > There is posibility for NULL pointer deference if a resource is accessed > but which is not initialized yet. Indeed Jorg Bornschein catches one on > cache set allocation thread and gets a kernel oops. > Signed-off-by: Coly Li <colyli@xxxxxxx> > Reported-by: Jorg Bornschein <jb@xxxxxxxxxx> > Cc: Kent Overstreet <kent.overstreet@xxxxxxxxx> > Cc: stable@xxxxxxxxxxxxxxx Reviewed-by: Michael Lyle <mlyle@xxxxxxxx>