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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100316071242.M65171@cooldavid.org>
Date:	Tue, 16 Mar 2010 15:15:50 +0800
From:	"Guo-Fu Tseng" <cooldavid@...ldavid.org>
To:	David Miller <davem@...emloft.net>
Cc:	chavey@...gle.com, ethanhsiao@...cron.com, netdev@...r.kernel.org
Subject: Re: [PATCH v2.6.33 2/2] jme: Adding lock to protect vlgrp structure.

On Mon, 15 Mar 2010 15:53:50 -0700 (PDT), David Miller wrote
> From: "Guo-Fu Tseng" <cooldavid@...ldavid.org>
> Date: Tue, 16 Mar 2010 03:13:33 +0800
> 
> > The vlan_rx_register is called through ioctl.
> > And the packet feeding is called in the tasklet.
> > I see no lock in register_vlan_dev(), register_vlan_device(), and vlan_ioctl_handler()
> > which is related to the vlan_hwaccel_receive_skb(), vlan_hwaccel_rx().
> > 
> > It prevents the vlgrp pointer be modified while trying to feed the packet.
> 
> This is not how you fix this.  Adding a new lock to your hot code
> path of packet receiving is the last thing you should be doing.
> 
> Instead, do what other drivers do, take down the device and bring it
> back up again when changing the ->vlgrp pointer.
> 
> See drivers/net/tg3.c:tg3_vlan_rx_register() for an example.
I see. I'll work on it.

--
Guo-Fu Tseng

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ