qcacmn: Panic on uninitialized lock destroy
Currently, if an uninitialized QDF mutex or spinlock is destroyed, the issue is logged in dmesg. This has allowed multiple uninitialized spinlock issues to merge into mainline and remain unnoticed for several weeks. Instead, if an uninitialized lock is detected during destroy, panic. Change-Id: I929cfa3f295cb1e76634653bbd4aec3a6f1268b7 CRs-Fixed: 2347717
This commit is contained in:
@@ -855,10 +855,8 @@ void qdf_lock_stats_cookie_destroy(struct lock_stats *stats)
|
|||||||
{
|
{
|
||||||
struct qdf_lock_cookie *cookie = stats->cookie;
|
struct qdf_lock_cookie *cookie = stats->cookie;
|
||||||
|
|
||||||
if (cookie == NULL) {
|
if (!cookie) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
QDF_DEBUG_PANIC("Lock destroyed twice or never created");
|
||||||
"%s: Double cookie destroy", __func__);
|
|
||||||
QDF_ASSERT(0);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user