Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0be8f57 authored by Surabhi Vishnoi's avatar Surabhi Vishnoi
Browse files

wlan: Fix the access to uninitialized objects in SSR sequence

Currently, hdd_init_tx_rx and hdd_sta_id_hash_attach are called
only when the interface is opened. During SSR, in hdd_reset_all_adapters
hdd_deinit_tx_rx and hdd_sta_id_hash_detach are called unconditionally,
this leads to invalid access to unintialized objects of that inteface.

Fix this issue by calling hdd_deinit_tx_rx and hdd_sta_id_hash_detach
on condition whether interface is open or not.

Change-Id: If251be60a7ad0d8f374b4bf401f4d83804502630
CRs-Fixed: 2729530
parent bfcc1c4f
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -11063,16 +11063,19 @@ VOS_STATUS hdd_reset_all_adapters( hdd_context_t *pHddCtx )
      if (pAdapter->device_mode == WLAN_HDD_MONITOR)
          pAdapter->sessionCtx.monitor.state = MON_MODE_STOP;
      if (test_bit(DEVICE_IFACE_OPENED, &pAdapterNode->pAdapter->event_flags))
          hdd_deinit_tx_rx(pAdapter);
      if(pAdapter->device_mode == WLAN_HDD_IBSS )
         hdd_ibss_deinit_tx_rx(pAdapter);
      if (test_bit(DEVICE_IFACE_OPENED, &pAdapterNode->pAdapter->event_flags)) {
         status = hdd_sta_id_hash_detach(pAdapter);
         if (status != VOS_STATUS_SUCCESS)
             hddLog(VOS_TRACE_LEVEL_ERROR,
                    FL("sta id hash detach failed for session id %d"),
                    pAdapter->sessionId);
         }
      wlan_hdd_decr_active_session(pHddCtx, pAdapter->device_mode);