Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread Stefan Schmidt
Hello. On 03/29/2017 06:21 PM, Eric Dumazet wrote: On Wed, 2017-03-29 at 16:54 +0100, Colin King wrote: From: Colin Ian King Ensure we don't end up with a null pointer dereferences by checking for for allocation failures. Allocate by sizeof(*ptr) rather than the

Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread Stefan Schmidt
Hello. On 03/29/2017 06:21 PM, Eric Dumazet wrote: On Wed, 2017-03-29 at 16:54 +0100, Colin King wrote: From: Colin Ian King Ensure we don't end up with a null pointer dereferences by checking for for allocation failures. Allocate by sizeof(*ptr) rather than the type to fix checkpack

Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread walter harms
Am 29.03.2017 17:54, schrieb Colin King: > From: Colin Ian King > > Ensure we don't end up with a null pointer dereferences by checking > for for allocation failures. Allocate by sizeof(*ptr) rather than > the type to fix checkpack warnings. Also merge multiple

Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread walter harms
Am 29.03.2017 17:54, schrieb Colin King: > From: Colin Ian King > > Ensure we don't end up with a null pointer dereferences by checking > for for allocation failures. Allocate by sizeof(*ptr) rather than > the type to fix checkpack warnings. Also merge multiple lines into > one line for the

Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread Eric Dumazet
On Wed, 2017-03-29 at 16:54 +0100, Colin King wrote: > From: Colin Ian King > > Ensure we don't end up with a null pointer dereferences by checking > for for allocation failures. Allocate by sizeof(*ptr) rather than > the type to fix checkpack warnings. Also merge

Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread Eric Dumazet
On Wed, 2017-03-29 at 16:54 +0100, Colin King wrote: > From: Colin Ian King > > Ensure we don't end up with a null pointer dereferences by checking > for for allocation failures. Allocate by sizeof(*ptr) rather than > the type to fix checkpack warnings. Also merge multiple lines into > one

[PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread Colin King
From: Colin Ian King Ensure we don't end up with a null pointer dereferences by checking for for allocation failures. Allocate by sizeof(*ptr) rather than the type to fix checkpack warnings. Also merge multiple lines into one line for the kmalloc call. Detected by

[PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread Colin King
From: Colin Ian King Ensure we don't end up with a null pointer dereferences by checking for for allocation failures. Allocate by sizeof(*ptr) rather than the type to fix checkpack warnings. Also merge multiple lines into one line for the kmalloc call. Detected by CoverityScan, CID#1422435