]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
atm: idt77252: fix null-ptr-dereference
authorTong Zhang <ztong0001@gmail.com>
Mon, 8 Mar 2021 03:25:30 +0000 (22:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:44:59 +0000 (14:44 +0200)
commit0a749fdc901b87778b25fc28f444e7d3dc707234
tree2296a813b91856785abc22c3b23f82ee3e9ca52d
parent59fa1b6b50259c669cee2750ba1f677d575d1330
atm: idt77252: fix null-ptr-dereference

[ Upstream commit 4416e98594dc04590ebc498fc4e530009535c511 ]

this one is similar to the phy_data allocation fix in uPD98402, the
driver allocate the idt77105_priv and store to dev_data but later
dereference using dev->dev_data, which will cause null-ptr-dereference.

fix this issue by changing dev_data to phy_data so that PRIV(dev) can
work correctly.

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>
drivers/atm/idt77105.c