Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1612246
| From | Marcel Holtmann <marcel@holtmann.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures |
| Date | 2017-03-29 21:00 +0200 |
| Message-ID | <tqqZ4-2xD-3@gated-at.bofh.it> (permalink) |
| References | <tqpgC-1u5-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Colin,
> 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 ("Dereference null return value")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/ieee802154/ca8210.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures Colin King <colin.king@canonical.com> - 2017-03-29 19:10 +0200
Re: [PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures David Miller <davem@davemloft.net> - 2017-03-29 19:20 +0200
Re: [PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures Marcel Holtmann <marcel@holtmann.org> - 2017-03-29 21:00 +0200
Re: [PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures Marcel Holtmann <marcel@holtmann.org> - 2017-03-29 21:00 +0200
csiph-web