]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
atm: uPD98402: fix incorrect allocation
authorTong Zhang <ztong0001@gmail.com>
Mon, 8 Mar 2021 03:25:29 +0000 (22:25 -0500)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:24 +0000 (15:42 -0500)
commit0a5b0028977f698d122d75c969fbe0adfec74e0b
treefa9e7e2bd468ba8ad5163a0f9e79bc286bc0fc0e
parent38f19c2708ce44df81e02a40af9c9f12757e22c1
atm: uPD98402: fix incorrect allocation

BugLink: https://bugs.launchpad.net/bugs/1922601
[ Upstream commit 3153724fc084d8ef640c611f269ddfb576d1dcb1 ]

dev->dev_data is set in zatm.c, calling zatm_start() will overwrite this
dev->dev_data in uPD98402_start() and a subsequent PRIV(dev)->lock
(i.e dev->phy_data->lock) will result in a null-ptr-dereference.

I believe this is a typo and what it actually want to do is to allocate
phy_data instead of dev_data.

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/atm/uPD98402.c