Re: [PATCH 13/21] memory-device: Fix latent memory pre-plug error handling bugs

2019-12-03 Thread Eric Blake
On 12/1/19 11:07 PM, Markus Armbruster wrote: { +Error *err = NULL; I remember that some time ago, the best practice was to use "local_err", what is the latest state of that? Hundreds of local Error * variables are named @local_err, and hundreds more are named @err. For what it's wor

Re: [PATCH 13/21] memory-device: Fix latent memory pre-plug error handling bugs

2019-12-01 Thread Markus Armbruster
David Hildenbrand writes: > On 30.11.19 20:42, Markus Armbruster wrote: >> memory_device_get_free_addr() crashes when >> memory_device_check_addable() fails and its @errp argument is null. >> Messed up in commit 1b6d6af21b "pc-dimm: factor out capacity and slot >> checks into MemoryDevice". >> >

Re: [PATCH 13/21] memory-device: Fix latent memory pre-plug error handling bugs

2019-12-01 Thread David Hildenbrand
On 30.11.19 20:42, Markus Armbruster wrote: > memory_device_get_free_addr() crashes when > memory_device_check_addable() fails and its @errp argument is null. > Messed up in commit 1b6d6af21b "pc-dimm: factor out capacity and slot > checks into MemoryDevice". > > The bug can't bite as no caller ac

[PATCH 13/21] memory-device: Fix latent memory pre-plug error handling bugs

2019-11-30 Thread Markus Armbruster
memory_device_get_free_addr() crashes when memory_device_check_addable() fails and its @errp argument is null. Messed up in commit 1b6d6af21b "pc-dimm: factor out capacity and slot checks into MemoryDevice". The bug can't bite as no caller actually passes null. Fix it anyway. Cc: David Hildenbra