Message ID | 20240820113336.19860-1-yanjun.zhu@linux.dev (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | [v2,1/1] RDMA/iwcm: Fix WARNING:at_kernel/workqueue.c:#check_flush_dependency | expand |
On 8/20/24 4:33 AM, Zhu Yanjun wrote: > diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c > index 1a6339f3a63f..7e3a55349e10 100644 > --- a/drivers/infiniband/core/iwcm.c > +++ b/drivers/infiniband/core/iwcm.c > @@ -1182,7 +1182,7 @@ static int __init iw_cm_init(void) > if (ret) > return ret; > > - iwcm_wq = alloc_ordered_workqueue("iw_cm_wq", 0); > + iwcm_wq = alloc_ordered_workqueue("iw_cm_wq", WQ_MEM_RECLAIM); > if (!iwcm_wq) > goto err_alloc; Reviewed-by: Bart Van Assche <bvanassche@acm.org>
On Tue, Aug 20, 2024 at 01:33:36PM +0200, Zhu Yanjun wrote: > In the commit aee2424246f9 ("RDMA/iwcm: Fix a use-after-free related to > destroying CM IDs"), the function flush_workqueue is invoked to flush > the work queue iwcm_wq. .. > Fixes: aee2424246f9 ("RDMA/iwcm: Fix a use-after-free related to destroying CM IDs") > Reported-by: kernel test robot <oliver.sang@intel.com> > Closes: https://lore.kernel.org/oe-lkp/202408151633.fc01893c-oliver.sang@intel.com > Tested-by: kernel test robot <oliver.sang@intel.com> > Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev> > Reviewed-by: Bart Van Assche <bvanassche@acm.org> > --- > V1 -> V2: Modify commit logs based on Bart and Jason' suggestions > --- > drivers/infiniband/core/iwcm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to for-next, thanks Jason
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c index 1a6339f3a63f..7e3a55349e10 100644 --- a/drivers/infiniband/core/iwcm.c +++ b/drivers/infiniband/core/iwcm.c @@ -1182,7 +1182,7 @@ static int __init iw_cm_init(void) if (ret) return ret; - iwcm_wq = alloc_ordered_workqueue("iw_cm_wq", 0); + iwcm_wq = alloc_ordered_workqueue("iw_cm_wq", WQ_MEM_RECLAIM); if (!iwcm_wq) goto err_alloc;