Messages in this thread Patch in this message | | | Date | Thu, 8 May 2003 13:32:35 +0200 | From | Francois Romieu <> | Subject | [PATCH] drivers/atm/iphase.c - ioremap() cookie dereferencing |
| |
Sneak variant of "ioremap() return dereferencing".
drivers/atm/iphase.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff -puN drivers/atm/iphase.c~drivers-atm-iphase-yuck-yuck-yuck drivers/atm/iphase.c --- linux-2.5.69-1.1042.92.10-to-1.1097/drivers/atm/iphase.c~drivers-atm-iphase-yuck-yuck-yuck Thu May 8 13:12:02 2003 +++ linux-2.5.69-1.1042.92.10-to-1.1097-fr/drivers/atm/iphase.c Thu May 8 13:14:53 2003 @@ -2809,10 +2809,10 @@ static int ia_ioctl(struct atm_dev *dev, rfL = ®s_local->rfredn; /* Copy real rfred registers into the local copy */ for (i=0; i<(sizeof (rfredn_t))/4; i++) - ((u_int *)rfL)[i] = ((u_int *)iadev->reass_reg)[i] & 0xffff; + ((u_int *)rfL)[i] = readl(iadev->reass_reg + i) & 0xffff; /* Copy real ffred registers into the local copy */ for (i=0; i<(sizeof (ffredn_t))/4; i++) - ((u_int *)ffL)[i] = ((u_int *)iadev->seg_reg)[i] & 0xffff; + ((u_int *)ffL)[i] = readl(iadev->seg_reg + i) & 0xffff; if (copy_to_user(ia_cmds.buf, regs_local,sizeof(ia_regs_t))) { kfree(regs_local); _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |