Re: [PATCH 1/2] livepatch: handle kzalloc failure

2018-12-13 Thread Nicholas Mc Guire
On Thu, Dec 13, 2018 at 01:31:39PM +0100, Petr Mladek wrote: > On Thu 2018-12-13 12:09:49, 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 > > livepatch_fix1_dummy_alloc() should retur

Re: [PATCH 1/2] livepatch: handle kzalloc failure

2018-12-13 Thread Petr Mladek
On Thu 2018-12-13 12:09:49, 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 > livepatch_fix1_dummy_alloc() should return NULL. > > Signed-off-by: Nicholas Mc Guire > --- > > Problem was

[PATCH 1/2] livepatch: handle kzalloc failure

2018-12-13 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 livepatch_fix1_dummy_alloc() should return NULL. Signed-off-by: Nicholas Mc Guire --- Problem was located with an experimental coccinelle script Patch was compile te