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

   ## Summary
   The spi_xx25xx EEPROM driver had a bug (probably from its inception in 2014) 
where the waitwritecomplete() function was expected to be called within an SPI 
bus exclusion lock, but it was not. So the write completion routine was wrongly 
unlocking an already unlocked mutex.
   
   This was not seen before, but a commit on 01 feb 2023 modified 
libs/libc/misc/lib_mutex.c so that nxmutex_lock now calls nxmutex_is_hold
   
   This additional test tripped on the wrong unlock.
   
   Here we have a good change that caught a bug hidden for so many years, and 
obviously not tested at all by millions of hours of useless automatic build 
tests.
   
   ## Impact
   Probably some weird stuff when several spi devices were used on the same bus.
   
   ## Testing
   Absolutely untestable with the current automatic build test infrastructure. 
This needs runtime testing, which we have successfully completed. "Before" code 
produces a cascade of assertion, the new code works as perfectly as visible.
   
   Since the automatic tests are useless here, can this PR be accepted faster 
than usual so we dont have to maintain local patches? Thank you.
   
   I have run checkpatch, the tool was happy.


-- 
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