Re: [PATCH 2/2] livepatch: check kzalloc return values

2018-12-18 Thread Jiri Kosina
On Fri, 14 Dec 2018, Nicholas Mc Guire wrote: > kzalloc() return should always be checked - notably in example code > where this may be seen as reference. On failure of allocation in > livepatch_fix1_dummy_alloc() respectively dummy_alloc() previous > allocation is freed (thanks to Petr Mladek

Re: [PATCH 2/2] livepatch: check kzalloc return values

2018-12-17 Thread Miroslav Benes
On Fri, 14 Dec 2018, Nicholas Mc Guire wrote: > kzalloc() return should always be checked - notably in example code > where this may be seen as reference. On failure of allocation in > livepatch_fix1_dummy_alloc() respectively dummy_alloc() previous > allocation is freed (thanks to Petr Mladek

Re: [PATCH 2/2] livepatch: check kzalloc return values

2018-12-17 Thread Petr Mladek
On Fri 2018-12-14 17:56:10, Nicholas Mc Guire wrote: > kzalloc() return should always be checked - notably in example code > where this may be seen as reference. On failure of allocation in > livepatch_fix1_dummy_alloc() respectively dummy_alloc() previous > allocation is freed (thanks to Petr

Re: [PATCH 2/2] livepatch: check kzalloc return values

2018-12-14 Thread Joe Lawrence
On 12/14/2018 11:56 AM, Nicholas Mc Guire wrote: > kzalloc() return should always be checked - notably in example code > where this may be seen as reference. On failure of allocation in > livepatch_fix1_dummy_alloc() respectively dummy_alloc() previous > allocation is freed (thanks to Petr Mladek

[PATCH 2/2] livepatch: check kzalloc return values

2018-12-14 Thread Nicholas Mc Guire
kzalloc() return should always be checked - notably in example code where this may be seen as reference. On failure of allocation in livepatch_fix1_dummy_alloc() respectively dummy_alloc() previous allocation is freed (thanks to Petr Mladek for catching this) and NULL returned. Signed-off-by: