1. 15 Jul, 2007 2 commits
    • Patrick McHardy's avatar
      [NET]: Add net_device change_rx_mode callback · 24023451
      Patrick McHardy authored
      Currently the set_multicast_list (and set_rx_mode) callbacks are
      responsible for configuring the device according to the IFF_PROMISC,
      IFF_MULTICAST and IFF_ALLMULTI flags and the mc_list (and uc_list in
      case of set_rx_mode).
      
      These callbacks can be invoked from BH context without the rtnl_mutex
      by dev_mc_add/dev_mc_delete, which makes reading the device flags and
      promiscous/allmulti count racy. For real hardware drivers that just
      commit all changes to the hardware this is not a real problem since
      the stack guarantees to call them for every change, so at least the
      final call will not race and commit the correct configuration to the
      hardware.
      
      For software devices that want to synchronize promiscous and multicast
      state to an underlying device however this can cause corruption of the
      underlying device's flags or promisc/allmulti counts.
      
      When the software device is concurrently put in promiscous or allmulti
      mode while set_multicast_list is invoked from bottem half context, the
      device might synchronize the change to the underlying device without
      holding the rtnl_mutex, which races with concurrent changes to the
      underlying device.
      
      Add a dev->change_rx_flags hook that is invoked when any of the flags
      that affect rx filtering change (under the rtnl_mutex), which allows
      drivers to perform synchronization immediately and only synchronize
      the address lists in set_multicast_list/set_rx_mode.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      24023451
    • Ingo Molnar's avatar
      [RFKILL]: fix net/rfkill/rfkill-input.c bug on 64-bit systems · e6c9116d
      Ingo Molnar authored
      Subject: [patch] net/input: fix net/rfkill/rfkill-input.c bug on 64-bit systems
      
      this recent commit:
      
       commit cf4328cd
       Author: Ivo van Doorn <IvDoorn@gmail.com>
       Date:   Mon May 7 00:34:20 2007 -0700
      
           [NET]: rfkill: add support for input key to control wireless radio
      
      added this 64-bit bug:
      
              ....
      	unsigned int flags;
       
       	spin_lock_irqsave(&task->lock, flags);
              ....
      
      irq 'flags' must be unsigned long, not unsigned int. The -rt tree has 
      strict checks about this on 64-bit so this triggered a build failure. 
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6c9116d
  2. 13 Jul, 2007 38 commits