lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 03 Feb 2011 14:21:45 -0800 (PST) From: David Miller <davem@...emloft.net> To: fleitner@...hat.com Cc: netdev@...r.kernel.org Subject: Re: [PATCH] niu: fix SMP race protecting rx_rings and tx_rings From: Flavio Leitner <fleitner@...hat.com> Date: Thu, 3 Feb 2011 16:45:17 -0200 > It's possible to trigger a crash if one CPU is opening > the device while another CPU gets its statistics. > > It happens because niu_alloc_channels() called from > niu_open() sets num_tx/rx_rings before allocating the > ring, so the other thread crashes when accessing > np->tx_rings[i].tx_packets at niu_get_tx_stats(). > > Signed-off-by: Flavio Leitner <fleitner@...hat.com> ... > Compile tested only because I don't have the hardware. I'll apply this and give it a quick test, thanks. Can you have the person who reported this crash to you test the patch out at least? That's how you learned about this problem, right, someone else hit the crash? In such cases I'd really appreciate it if you got positive testing feedback from the reporter before posting the patch. Longer term a better way to fix this is to RCU free the ring data structures, and use a quick NULL test at the top of the get stats implementation. -- 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