Hi,

I'm reporting you about misuse of rtnl_is_locked() in 
WILC_WFI_deinit_mon_interface() function.
Note, that rtnl_is_locked() *does not mean* rtnl is locked on the *current 
cpu*. This primitive
returns true in case of rtnl is locked somewhere in the system. So, it can't be 
used in the below
code:

int WILC_WFI_deinit_mon_interface(void)
{
        bool rollback_lock = false;

        if (wilc_wfi_mon) {
                if (rtnl_is_locked()) {                 <------Mistake
                        rtnl_unlock();
                        rollback_lock = true;
                }
                unregister_netdev(wilc_wfi_mon);

                if (rollback_lock) {
                        rtnl_lock();
                        rollback_lock = false;
                }
                wilc_wfi_mon = NULL;
        }
        return 0;
}

Kirill

Reply via email to