Embedded Buildroot and Yocto Linux crash 50% of the time

It looks like the problem was introduced by the patch: regulator: stpmic1: Usb boost over-current protection workaround.

  • The “boost” interrupt handler stpmic1_boost_irq_handler calls regulator_lock(usb_data->boost_rdev);
  • The “boost” interrupt handler (stpmic1_boost_irq_handler) is set up by the stpmic1_boost_register function, but usb_data->boost_rdev is still null at this time.
  • usb_data->boost_rdev is set to the return value of the stpmic1_boost_register function by thestpmic1_regulator_probe function.
  • If the “boost” interrupt handler stpmic1_boost_irq_handler gets called before usb_data->boost_rdev has been set by the stpmic1_regulator_probe function, then the crash occurs.

A workaround would be to set usb_data->boost_rdev = rdev; in the stpmic1_boost_register function after it has set rdev but before it sets up the interrupt handler.

This should be reported to the author of the patch. See the “Signed-off-by:” line in the patch for the email address.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top