Re: [LKP] [workqueue] 4d43d395fe: WARNING:at_kernel/workqueue.c:#__flush_work

From: James Smart
Date: Mon Mar 04 2019 - 13:38:29 EST


On 3/4/2019 10:21 AM, Sagi Grimberg wrote:

Forwarding to NMVE people:

kernel test robot found that
flush_work(&ctrl->async_event_work) is called from nvmet_ctrl_free()
without INIT_WORK(&ctrl->async_event_work, nvmet_async_event_work)
after ctrl was allocated (probably initialized with 0).
Will you make sure that INIT_WORK() is always called?

I cannot reproduce this issue. When following the code I don't
immediately see how this can happen.. Was there something special
in this specific test run? Is it 100% reproduce-able?

I agree. INIT_WORK is setup as almost one of the first items for a new controller. Smells more like a double-free or a corrupt ctrl struct from the transport.

-- james