Re: [PATCH] net: tipc: prevent possible null deref of link
From: David Miller
Date: Tue Dec 08 2020 - 18:56:03 EST
From: Cengiz Can <cengiz@xxxxxxxxxx>
Date: Mon, 7 Dec 2020 11:14:24 +0300
> `tipc_node_apply_property` does a null check on a `tipc_link_entry`
> pointer but also accesses the same pointer out of the null check block.
>
> This triggers a warning on Coverity Static Analyzer because we're
> implying that `e->link` can BE null.
>
> Move "Update MTU for node link entry" line into if block to make sure
> that we're not in a state that `e->link` is null.
>
> Signed-off-by: Cengiz Can <cengiz@xxxxxxxxxx>
> ---
Applied, thanks.,