[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200217.142917.1260854235072889214.davem@davemloft.net>
Date: Mon, 17 Feb 2020 14:29:17 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: michal.kalderon@...vell.com
Cc: aelior@...vell.com, netdev@...r.kernel.org, ariel.elior@...vell.com
Subject: Re: [PATCH net] qede: Fix race between rdma destroy workqueue and
link change event
From: Michal Kalderon <michal.kalderon@...vell.com>
Date: Mon, 17 Feb 2020 13:37:18 +0200
> If an event is added while the rdma workqueue is being destroyed
> it could lead to several races, list corruption, null pointer
> dereference during queue_work or init_queue.
> This fixes the race between the two flows which can occur during
> shutdown.
>
> A kref object and a completion object are added to the rdma_dev
> structure, these are initialized before the workqueue is created.
> The refcnt is used to indicate work is being added to the
> workqueue and ensures the cleanup flow won't start while we're in
> the middle of adding the event.
> Once the work is added, the refcnt is decreased and the cleanup flow
> is safe to run.
>
> Fixes: cee9fbd8e2e ("qede: Add qedr framework")
> Signed-off-by: Ariel Elior <ariel.elior@...vell.com>
> Signed-off-by: Michal Kalderon <michal.kalderon@...vell.com>
Applied and queeud up for -stable, thanks.
Powered by blists - more mailing lists