mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
jffs2: remove from wait queue after schedule()
@wait is a local variable, so if we don't remove it from the wait queue list, later wake_up() may end up accessing invalid memory. This was spotted by eyes. Signed-off-by: Li Zefan <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Artem Bityutskiy <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Brian Norris <[email protected]>
This commit is contained in:
parent
f4f6a0be01
commit
3ead957844
1 changed files with 1 additions and 0 deletions
|
|
@ -179,6 +179,7 @@ int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
|
|||
spin_unlock(&c->erase_completion_lock);
|
||||
|
||||
schedule();
|
||||
remove_wait_queue(&c->erase_wait, &wait);
|
||||
} else
|
||||
spin_unlock(&c->erase_completion_lock);
|
||||
} else if (ret)
|
||||
|
|
|
|||
Loading…
Reference in a new issue