[pve-devel] applied: [PATCH pve-cluster] Fix #2553: Prevent the Deadlock by aligning the lockorder

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jan 14 13:35:20 CET 2020


On 1/14/20 12:48 PM, Kevin Greßlehner wrote:
> Kevin Greßlehner (1):
>   Fix #2553: Fix for Deadlock by aligning the lockorder - Lock
>     &memdb->mutex in memdb_read and refer to a new method
>     "memdb_read_nolock" in memdb.c which doesn't handle locks by itself.
>     This method then handles the stuff which was originally in
>     memdb_read. Therefore everything except
>     cfs_create_guest_conf_property_msg uses memdb_read (which handles
>     the locking itself), and cfs_create_guest_conf_property_msg prelocks
>     &memdb->mutex and invokes memdb_read_nolock.
> 
> Signed-off-by: Kevin Greßlehner <kevin_gressi at live.at>
> ---
> Approach #3 (Comment #7 of Bug #2553):
> Tested for 6h straight - no Crashes nor Deadlocks appeared.

applied, much thanks! I had to adapt the line-endings as they were in Windows
format (\r\n vs only \n), thus git complained that it could not apply the patch.
Further the indentation of the new "memdb_read_nolock" was off, used whitespaces
instead of tabs like the rest of this c code, adapted this too as it makes the
diff a bit nicer. As that were just cosmetic changes I just squished them into
your patch, hope that was OK.

cheers,
Thomas





More information about the pve-devel mailing list