Date: Thu, 19 Feb 2015 17:50:55 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 197535] [re] [panic] if_re (Realtek 8168) causes memory write after free and kernel panic Message-ID: <bug-197535-8-LXMHw61hUi@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-197535-8@https.bugs.freebsd.org/bugzilla/> References: <bug-197535-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197535 --- Comment #9 from luca.pizzamiglio@gmail.com --- I collect some other information about this error and I'm a little bit confused. I added some printf in the re_rxeof() function, to understand who's overwriting the memory after free (my suspect was the DMA was writing in the wrong place): re0: idx 22 - rxstat 0x3201C040 - cur_rx at 0xfffff8000179b160 re0: rl_rx_list 0xfffff8000179b000 - rl_rx_list_addr 0x179b000 Memory modified after free 0xfffff800069da800(2048) val=ffffffff @ 0xfffff800069da800 re0: newbuf m 0xfffff800069f0600 - segs.ds_addr 0x00000000069da800 re0: newbuf m->m_data 0xfffff800069da800 rl_rx_list is the pointer to the rl_desc list rl_rx_list_addr is the phy address used by the device (DMA segment) The newbuf function allocate a new mbuf and load it in a new dma segment: m->m_data is the virtual address segs.ds_addr is the phy address used by the device (DMA segment) Apparently, the driver can really get data from DMA. I've still to explain: * received XX packets, "netstat -s" shows 0 packets received * after the first 256 packets, the first descriptor of the ring is overwritten by a new one that is always: rl_desc->cmdstat is 0x80000800 => no packets * how some rl_desc are flying away causing page faults... The Linux firmware actually is not a real firmware, but it seems to me a way to encode and hide the chip initialization. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197535-8-LXMHw61hUi>