diff options
author | Richard Weinberger | 2014-09-19 17:37:56 +0200 |
---|---|---|
committer | Artem Bityutskiy | 2014-09-24 14:36:16 +0200 |
commit | b91671bb23a79c32a23b0ad5d6e6ad292bb21bdf (patch) | |
tree | bb544e7b059228789411b4a601ad6e2157a38e08 /fs/ubifs/debug.c | |
parent | UBI: return on error in rename_volumes() (diff) | |
download | kernel-qcow2-linux-b91671bb23a79c32a23b0ad5d6e6ad292bb21bdf.tar.gz kernel-qcow2-linux-b91671bb23a79c32a23b0ad5d6e6ad292bb21bdf.tar.xz kernel-qcow2-linux-b91671bb23a79c32a23b0ad5d6e6ad292bb21bdf.zip |
UBI: Fix livelock in produce_free_peb()
The while loop in produce_free_peb() assumes that each work will produce a
free PEB. This is not true.
If ubi->works_count is 1 and the only scheduled work is the
wear_leveling_worker() produce_free_peb() can loop forever in case
nobody schedules an erase work.
Fix this issue by checking in the while loop whether work is scheduled.
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs/debug.c')
0 files changed, 0 insertions, 0 deletions