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

Skip to content
Commit 298c8545 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Alexandre Belloni
Browse files

rtc: r7301: Fix a possible sleep-in-atomic bug in rtc7301_set_time



The driver may sleep under a spinlock.
The function call path is:
rtc7301_set_time (acquire the spinlock)
  usleep_range --> may sleep

To fix it, usleep_range is replaced with udelay.

This bug is found by my static analysis tool(DSAC) and checked by my code review.

Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent cd8c0bb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment