| Message ID | 20241011105954.739139-1-richard.purdie@linuxfoundation.org |
|---|---|
| State | Accepted, archived |
| Commit | 4fbef87adaca2df8c1e877aec5588c2e5466f252 |
| Headers | show |
| Series | utils: Improve multiple lock handling | expand |
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index ebee65d3dd..e722f9113d 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -446,6 +446,7 @@ def fileslocked(files, *args, **kwargs): try: yield finally: + locks.reverse() for lock in locks: bb.utils.unlockfile(lock)
We should release locks in the opposite order to the order we locked them in to avoid potentially problematic behaviour. This hasn't been observed with our current usage and is just a preventative improvement. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/utils.py | 1 + 1 file changed, 1 insertion(+)