]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wan: pc300too: abort path on failure
authorPan Bian <bianpan2016@163.com>
Sun, 23 Apr 2017 09:38:35 +0000 (17:38 +0800)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:50 +0000 (21:33 -0400)
commitf7b8cd0e055164b0a106bf4590141cae96f0f9a0
treee7f0773304f5f078fbf31c10b23b837b7d27015f
parentad1cd13009bfe2f4c42e28370b16c5489295acd3
wan: pc300too: abort path on failure

[ Upstream commit 2a39e7aa8a98f777f0732ca7125b6c9668791760 ]

In function pc300_pci_init_one(), on the ioremap error path, function
pc300_pci_remove_one() is called to free the allocated memory. However,
the path is not terminated, and the freed memory will be used later,
resulting in use-after-free bugs. This path fixes the bug.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/net/wan/pc300too.c