jerpelea opened a new pull request, #21160:
URL: https://github.com/apache/nuttx/pull/21160

   ## Summary
   
   set_intr_wrapper() allocates a new intr_handle_data_t from the kernel heap 
each time the Wi-Fi driver calls it, and the driver calls it on every 
esp_wifi_start() -- twice per start on esp32s3 -- not only the first time.  
clear_intr_wrapper() is a no-op, so the IRQ still holds the handle from the 
previous start: esp_set_handle() refuses to replace it with -EINVAL, the return 
value is ignored, and the new block is lost.
   
   Any application that stops and restarts Wi-Fi to save power therefore loses 
a few bytes of kernel heap per cycle, without bound.
   
   Look up the vector descriptor first, then reuse the handle already 
registered for the IRQ and only allocate and register one when there is none.  
A failed descriptor lookup no longer touches the registered handle.
   
   The same code is present in the esp32, esp32s2, esp32s3, esp32c3 and esp32c6 
Wi-Fi adapters; all five are fixed the same way.
   
   ## Impact
   
   RELEASE
   
   ## Testing
   
   CI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to