Thread (9 messages) flat view 9 messages, 3 authors, 2021-03-08

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

From: Alexander Duyck <hidden>
Date: 2021-03-08 17:48:16
Also in: lkml

On Mon, Mar 8, 2021 at 12:39 AM Tong Zhang [off-list ref] 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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help