mctp i2c: Fix potential use-after-free
authorMatt Johnston <matt@codeconstruct.com.au>
Fri, 25 Feb 2022 05:39:37 +0000 (13:39 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 26 Feb 2022 06:23:29 +0000 (22:23 -0800)
commit06bf1ce69d55729dc132d423d626398254fedc58
tree98f4322027d4904f8cc4c1f262c3b572eb49ae75
parentf62457df5cc46ea0729fface07ffa885e85ef404
mctp i2c: Fix potential use-after-free

The skb is handed off to netif_rx() which may free it.
Found by Smatch.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/mctp/mctp-i2c.c