Re: [PATCH 0/3] fix a couple of atm->phy_data related issues

From: Alexander Duyck
Date: Mon Mar 08 2021 - 12:48:16 EST


On Mon, Mar 8, 2021 at 12:39 AM Tong Zhang <ztong0001@xxxxxxxxx> wrote:
>
> there are two drivers(zatm and idt77252) using PRIV() (i.e. atm->phy_data)
> to store private data, but the driver happens to populate wrong
> pointers: atm->dev_data. which actually cause null-ptr-dereference in
> following PRIV(dev). This patch series attemps to fix those two issues
> along with a typo in atm struct.
>
> Tong Zhang (3):
> atm: fix a typo in the struct description
> atm: uPD98402: fix incorrect allocation
> atm: idt77252: fix null-ptr-dereference
>
> drivers/atm/idt77105.c | 4 ++--
> drivers/atm/uPD98402.c | 2 +-
> include/linux/atmdev.h | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)

For the 2 phys you actually seen null pointer dereferences or are your
changes based on just code review?

I ask because it seems like this code has been this way since 2005 and
in the case of uPD98402_start the code doesn't seem like it should
function the way it was as PRIV is phy_data and there being issues
seems pretty obvious since the initialization of things happens
immediately after the allocation.

I'm just wondering if it might make more sense to drop the code if it
hasn't been run in 15+ years rather than updating it?