lkml.org 
[lkml]   [2017]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] bpf: don't kfree an uninitialized im_node
On Tue, Jan 24, 2017 at 6:16 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> There are some error exit paths to the label 'out' that end up
> kfree'ing an uninitialized im_node. Fix this by inititializing
> im_node to NULL to avoid kfree'ing a garbage address.

this fix already landed. See:
commit d140199af510 ("bpf, lpm: fix kfree of im_node in trie_update_elem")

> Issue found by CoverityScan, CID#1398022 ("Uninitialized pointer read")

Nice. Good to know that static analysis can do such checks.

\
 
 \ /
  Last update: 2017-01-24 18:54    [W:0.060 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site