commit | cd8c0bb2bd57c48c451ebea86065257ef2500b00 | [log] [tgz] |
---|---|---|
author | Jia-Ju Bai <baijiaju1990@gmail.com> | Wed Dec 13 21:55:50 2017 +0800 |
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | Fri Jan 12 00:20:28 2018 +0100 |
tree | 4eb179a50caab10d3ababa0a7f3b6358ae74a8f7 | |
parent | 2da6877f0e2ced7825a31556ada6b2ac2e50877f [diff] |
rtc: r7301: Fix a possible sleep-in-atomic bug in rtc7301_read_time The driver may sleep under a spinlock. The function call path is: rtc7301_read_time (acquire the spinlock) rtc7301_wait_while_busy 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: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>