mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-20 19:34:46 +00:00
[PATCH] mmput() might sleep
exit_aio() and exit_mmap() can sleep. But it's easy to accidentally call mmput() from inside locks. Cc: Dave Peterson <dsp@llnl.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
32797f976d
commit
0ae26f1b31
|
@ -368,6 +368,8 @@ void fastcall __mmdrop(struct mm_struct *mm)
|
||||||
*/
|
*/
|
||||||
void mmput(struct mm_struct *mm)
|
void mmput(struct mm_struct *mm)
|
||||||
{
|
{
|
||||||
|
might_sleep();
|
||||||
|
|
||||||
if (atomic_dec_and_test(&mm->mm_users)) {
|
if (atomic_dec_and_test(&mm->mm_users)) {
|
||||||
exit_aio(mm);
|
exit_aio(mm);
|
||||||
exit_mmap(mm);
|
exit_mmap(mm);
|
||||||
|
|
Loading…
Reference in a new issue