Commit 662bbcb2747c2422cf98d3d97619509379eee466 removed might_sleep() checks
for all user access code (that uses might_fault()).
The reason was to disable wrong sleep in atomic warnings in the following
scenario:
pagefault_disable();
rc = copy_to_user(...);
On Thu, Nov 27, 2014 at 06:10:17PM +0100, David Hildenbrand wrote:
Commit 662bbcb2747c2422cf98d3d97619509379eee466 removed might_sleep() checks
for all user access code (that uses might_fault()).
The reason was to disable wrong sleep in atomic warnings in the following
scenario:
On Thu, Nov 27, 2014 at 07:24:49PM +0200, Michael S. Tsirkin wrote:
On Thu, Nov 27, 2014 at 06:10:17PM +0100, David Hildenbrand wrote:
Commit 662bbcb2747c2422cf98d3d97619509379eee466 removed might_sleep() checks
for all user access code (that uses might_fault()).
The reason was to
-
- __might_sleep(__FILE__, __LINE__, 0);
+ if (unlikely(!pagefault_disabled()))
+ __might_sleep(__FILE__, __LINE__, 0);
Same here: so maybe make might_fault a wrapper
around __might_fault as well.
Yes, I also noticed that. It was part of the original code.
For now
On Thu, Nov 27, 2014 at 07:08:42PM +0100, David Hildenbrand wrote:
-
- __might_sleep(__FILE__, __LINE__, 0);
+ if (unlikely(!pagefault_disabled()))
+ __might_sleep(__FILE__, __LINE__, 0);
Same here: so maybe make might_fault a wrapper
around