[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130813222038.GC5635@electric-eye.fr.zoreil.com>
Date: Wed, 14 Aug 2013 00:20:38 +0200
From: Francois Romieu <romieu@...zoreil.com>
To: Peter Wu <lekensteyn@...il.com>
Cc: netdev@...r.kernel.org, nic_swsd@...ltek.com
Subject: Re: [PATCH] r8169: fix invalid register dump
Peter Wu <lekensteyn@...il.com> :
[...]
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index b5eb419..28af01c 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -1897,12 +1897,17 @@ static void rtl8169_get_regs(struct net_device *dev, struct ethtool_regs *regs,
[...]
> - memcpy_fromio(p, tp->mmio_addr, regs->len);
> + for (i = 0; i < regs->len - 4; i += 4)
> + memcpy_fromio(bytes + i, tp->mmio_addr + i, 4);
regs->len is u32. regs->len - 4 should not underflow on normal situation but
it's a bit sloppy.
--
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists