qcacld-3.0: Protect pld_del_dev function as part of psoc trans
Protect pld_del_dev function as part of psoc transaction to avoid race condition with pld_deinit. Change-Id: I57531d649d02a37beb702c8f0467dc60b455804b
此提交包含在:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "pld_internal.h"
|
||||
#include "pld_ipci.h"
|
||||
#include "osif_psoc_sync.h"
|
||||
|
||||
#ifdef CONFIG_PLD_IPCI_ICNSS
|
||||
/**
|
||||
@@ -72,15 +73,28 @@ out:
|
||||
static void pld_ipci_remove(struct device *dev)
|
||||
{
|
||||
struct pld_context *pld_context;
|
||||
int errno;
|
||||
struct osif_psoc_sync *psoc_sync;
|
||||
|
||||
errno = osif_psoc_sync_trans_start_wait(dev, &psoc_sync);
|
||||
if (errno)
|
||||
return;
|
||||
|
||||
osif_psoc_sync_unregister(dev);
|
||||
osif_psoc_sync_wait_for_ops(psoc_sync);
|
||||
|
||||
pld_context = pld_get_global_context();
|
||||
|
||||
if (!pld_context)
|
||||
return;
|
||||
goto out;
|
||||
|
||||
pld_context->ops->remove(dev, PLD_BUS_TYPE_SNOC);
|
||||
|
||||
pld_del_dev(pld_context, dev);
|
||||
|
||||
out:
|
||||
osif_psoc_sync_trans_stop(psoc_sync);
|
||||
osif_psoc_sync_destroy(psoc_sync);
|
||||
}
|
||||
|
||||
/**
|
||||
|
新增問題並參考
封鎖使用者