Skip to content
Snippets Groups Projects
  1. Sep 22, 2010
    • Eric Dumazet's avatar
      ip: fix truesize mismatch in ip fragmentation · 3d13008e
      Eric Dumazet authored
      
      Special care should be taken when slow path is hit in ip_fragment() :
      
      When walking through frags, we transfert truesize ownership from skb to
      frags. Then if we hit a slow_path condition, we must undo this or risk
      uncharging frags->truesize twice, and in the end, having negative socket
      sk_wmem_alloc counter, or even freeing socket sooner than expected.
      
      Many thanks to Nick Bowler, who provided a very clean bug report and
      test program.
      
      Thanks to Jarek for reviewing my first patch and providing a V2
      
      While Nick bisection pointed to commit 2b85a34e (net: No more
      expensive sock_hold()/sock_put() on each tx), underlying bug is older
      (2.6.12-rc5)
      
      A side effect is to extend work done in commit b2722b1c
      (ip_fragment: also adjust skb->truesize for packets not owned by a
      socket) to ipv6 as well.
      
      Reported-and-bisected-by: default avatarNick Bowler <nbowler@elliptictech.com>
      Tested-by: default avatarNick Bowler <nbowler@elliptictech.com>
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      CC: Jarek Poplawski <jarkao2@gmail.com>
      CC: Patrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d13008e
  2. Sep 21, 2010
  3. Sep 20, 2010
  4. Sep 18, 2010
  5. Sep 17, 2010
    • Wey-Yi Guy's avatar
      iwlwifi: do not perferm force reset while doing scan · 7acc7c68
      Wey-Yi Guy authored
      
      When uCode error condition detected, driver try to perform either
      rf reset or firmware reload in order bring device back to
      working condition.
      
      If rf reset is required and scan is in process, there is no need
      to issue rf reset since scan already reset the rf.
      
      If firmware reload is required and scan is in process, skip the
      reload request. There is a possibility firmware reload during
      scan cause problem.
      
      [  485.804046] WARNING: at net/mac80211/main.c:310 ieee80211_restart_hw+0x28/0x62()
      [  485.804049] Hardware name: Latitude E6400
      [  485.804052] ieee80211_restart_hw called with hardware scan in progress
      [  485.804054] Modules linked in: iwlagn iwlcore bnep sco rfcomm l2cap crc16 bluetooth [last unloaded: iwlcore]
      [  485.804069] Pid: 812, comm: kworker/u:3 Tainted: G        W   2.6.36-rc3-wl+ #74
      [  485.804072] Call Trace:
      [  485.804079]  [<c103019a>] warn_slowpath_common+0x60/0x75
      [  485.804084]  [<c1030213>] warn_slowpath_fmt+0x26/0x2a
      [  485.804089]  [<c145da67>] ieee80211_restart_hw+0x28/0x62
      [  485.804102]  [<f8b35dc6>] iwl_bg_restart+0x113/0x150 [iwlagn]
      [  485.804108]  [<c10415d5>] process_one_work+0x181/0x25c
      [  485.804119]  [<f8b35cb3>] ? iwl_bg_restart+0x0/0x150 [iwlagn]
      [  485.804124]  [<c104190a>] worker_thread+0xf9/0x1f2
      [  485.804128]  [<c1041811>] ? worker_thread+0x0/0x1f2
      [  485.804133]  [<c10451b0>] kthread+0x64/0x69
      [  485.804137]  [<c104514c>] ? kthread+0x0/0x69
      [  485.804141]  [<c1002df6>] kernel_thread_helper+0x6/0x10
      [  485.804145] ---[ end trace 3d4ebdc02d524bbb ]---
      [  485.804148] WG> 1
      [  485.804153] Pid: 812, comm: kworker/u:3 Tainted: G        W   2.6.36-rc3-wl+ #74
      [  485.804156] Call Trace:
      [  485.804161]  [<c145da9b>] ? ieee80211_restart_hw+0x5c/0x62
      [  485.804172]  [<f8b35dcb>] iwl_bg_restart+0x118/0x150 [iwlagn]
      [  485.804177]  [<c10415d5>] process_one_work+0x181/0x25c
      [  485.804188]  [<f8b35cb3>] ? iwl_bg_restart+0x0/0x150 [iwlagn]
      [  485.804192]  [<c104190a>] worker_thread+0xf9/0x1f2
      [  485.804197]  [<c1041811>] ? worker_thread+0x0/0x1f2
      [  485.804201]  [<c10451b0>] kthread+0x64/0x69
      [  485.804205]  [<c104514c>] ? kthread+0x0/0x69
      [  485.804209]  [<c1002df6>] kernel_thread_helper+0x6/0x10
      
      Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
      7acc7c68
    • Dan Carpenter's avatar
      net/llc: storing negative error codes in unsigned short · 2507136f
      Dan Carpenter authored
      
      If the alloc_skb() fails then we return 65431 instead of -ENOBUFS
      (-105).
      
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2507136f
    • Chris Snook's avatar
      MAINTAINERS: move atlx discussions to netdev · e443e383
      Chris Snook authored
      
      The atlx drivers are sufficiently mature that we no longer need a separate
      mailing list for them.  Move the discussion to netdev, so we can decommission
      atl1-devel, which is now mostly spam.
      
      Signed-off-by: default avatarChris Snook <chris.snook@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e443e383
    • Dan Rosenberg's avatar
      drivers/net/cxgb3/cxgb3_main.c: prevent reading uninitialized stack memory · 49c37c03
      Dan Rosenberg authored
      
      Fixed formatting (tabs and line breaks).
      
      The CHELSIO_GET_QSET_NUM device ioctl allows unprivileged users to read
      4 bytes of uninitialized stack memory, because the "addr" member of the
      ch_reg struct declared on the stack in cxgb_extension_ioctl() is not
      altered or zeroed before being copied back to the user.  This patch
      takes care of it.
      
      Signed-off-by: default avatarDan Rosenberg <dan.j.rosenberg@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49c37c03
    • Dan Rosenberg's avatar
      drivers/net/eql.c: prevent reading uninitialized stack memory · 44467187
      Dan Rosenberg authored
      
      Fixed formatting (tabs and line breaks).
      
      The EQL_GETMASTRCFG device ioctl allows unprivileged users to read 16
      bytes of uninitialized stack memory, because the "master_name" member of
      the master_config_t struct declared on the stack in eql_g_master_cfg()
      is not altered or zeroed before being copied back to the user.  This
      patch takes care of it.
      
      Signed-off-by: default avatarDan Rosenberg <dan.j.rosenberg@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44467187
    • Dan Rosenberg's avatar
      drivers/net/usb/hso.c: prevent reading uninitialized memory · 7011e660
      Dan Rosenberg authored
      
      Fixed formatting (tabs and line breaks).
      
      The TIOCGICOUNT device ioctl allows unprivileged users to read
      uninitialized stack memory, because the "reserved" member of the
      serial_icounter_struct struct declared on the stack in hso_get_count()
      is not altered or zeroed before being copied back to the user.  This
      patch takes care of it.
      
      Signed-off-by: default avatarDan Rosenberg <dan.j.rosenberg@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7011e660
    • Eric Dumazet's avatar
      xfrm: dont assume rcu_read_lock in xfrm_output_one() · e71895a1
      Eric Dumazet authored
      
      ip_local_out() is called with rcu_read_lock() held from ip_queue_xmit()
      but not from other call sites.
      
      Reported-and-bisected-by: default avatarNick Bowler <nbowler@elliptictech.com>
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e71895a1
  6. Sep 16, 2010
  7. Sep 15, 2010
    • Denis Kirjanov's avatar
      3c59x: Remove atomic context inside vortex_{set|get}_wol · 84176b7b
      Denis Kirjanov authored
      
      There is no need to use spinlocks in vortex_{set|get}_wol.
      This also fixes a bug:
      [  254.214993] 3c59x 0000:00:0d.0: PME# enabled
      [  254.215021] BUG: sleeping function called from invalid context at kernel/mutex.c:94
      [  254.215030] in_atomic(): 0, irqs_disabled(): 1, pid: 4875, name: ethtool
      [  254.215042] Pid: 4875, comm: ethtool Tainted: G        W   2.6.36-rc3+ #7
      [  254.215049] Call Trace:
      [  254.215050]  [] __might_sleep+0xb1/0xb6
      [  254.215050]  [] mutex_lock+0x17/0x30
      [  254.215050]  [] acpi_enable_wakeup_device_power+0x2b/0xb1
      [  254.215050]  [] acpi_pm_device_sleep_wake+0x42/0x7f
      [  254.215050]  [] acpi_pci_sleep_wake+0x5d/0x63
      [  254.215050]  [] platform_pci_sleep_wake+0x1d/0x20
      [  254.215050]  [] __pci_enable_wake+0x90/0xd0
      [  254.215050]  [] acpi_set_WOL+0x8e/0xf5 [3c59x]
      [  254.215050]  [] vortex_set_wol+0x4e/0x5e [3c59x]
      [  254.215050]  [] dev_ethtool+0x1cf/0xb61
      [  254.215050]  [] ? debug_mutex_free_waiter+0x45/0x4a
      [  254.215050]  [] ? __mutex_lock_common+0x204/0x20e
      [  254.215050]  [] ? __mutex_lock_slowpath+0x12/0x15
      [  254.215050]  [] ? mutex_lock+0x23/0x30
      [  254.215050]  [] dev_ioctl+0x42c/0x533
      [  254.215050]  [] ? _cond_resched+0x8/0x1c
      [  254.215050]  [] ? lock_page+0x1c/0x30
      [  254.215050]  [] ? page_address+0x15/0x7c
      [  254.215050]  [] ? filemap_fault+0x187/0x2c4
      [  254.215050]  [] sock_ioctl+0x1d4/0x1e0
      [  254.215050]  [] ? sock_ioctl+0x0/0x1e0
      [  254.215050]  [] vfs_ioctl+0x19/0x33
      [  254.215050]  [] do_vfs_ioctl+0x424/0x46f
      [  254.215050]  [] ? selinux_file_ioctl+0x3c/0x40
      [  254.215050]  [] sys_ioctl+0x40/0x5a
      [  254.215050]  [] sysenter_do_call+0x12/0x22
      
      vortex_set_wol protected with a spinlock, but nested  acpi_set_WOL acquires a mutex inside atomic context.
      Ethtool operations are already serialized by RTNL mutex, so it is safe to drop the locks.
      
      Signed-off-by: default avatarDenis Kirjanov <dkirjanov@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84176b7b
    • Alexey Kuznetsov's avatar
      tcp: Prevent overzealous packetization by SWS logic. · 01f83d69
      Alexey Kuznetsov authored
      
      If peer uses tiny MSS (say, 75 bytes) and similarly tiny advertised
      window, the SWS logic will packetize to half the MSS unnecessarily.
      
      This causes problems with some embedded devices.
      
      However for large MSS devices we do want to half-MSS packetize
      otherwise we never get enough packets into the pipe for things
      like fast retransmit and recovery to work.
      
      Be careful also to handle the case where MSS > window, otherwise
      we'll never send until the probe timer.
      
      Reported-by: default avatarツ Leandro Melo de Sales <leandroal@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      01f83d69
    • David S. Miller's avatar
      net: RPS needs to depend upon USE_GENERIC_SMP_HELPERS · 6dcbc122
      David S. Miller authored
      
      You cannot invoke __smp_call_function_single() unless the
      architecture sets this symbol.
      
      Reported-by: default avatarDaniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6dcbc122
  8. Sep 14, 2010
  9. Sep 13, 2010
    • Bob Arendt's avatar
      ipv4: force_igmp_version ignored when a IGMPv3 query received · 79981563
      Bob Arendt authored
      
      After all these years, it turns out that the
          /proc/sys/net/ipv4/conf/*/force_igmp_version
      parameter isn't fully implemented.
      
      *Symptom*:
      When set force_igmp_version to a value of 2, the kernel should only perform
      multicast IGMPv2 operations (IETF rfc2236).  An host-initiated Join message
      will be sent as a IGMPv2 Join message.  But if a IGMPv3 query message is
      received, the host responds with a IGMPv3 join message.  Per rfc3376 and
      rfc2236, a IGMPv2 host should treat a IGMPv3 query as a IGMPv2 query and
      respond with an IGMPv2 Join message.
      
      *Consequences*:
      This is an issue when a IGMPv3 capable switch is the querier and will only
      issue IGMPv3 queries (which double as IGMPv2 querys) and there's an
      intermediate switch that is only IGMPv2 capable.  The intermediate switch
      processes the initial v2 Join, but fails to recognize the IGMPv3 Join responses
      to the Query, resulting in a dropped connection when the intermediate v2-only
      switch times it out.
      
      *Identifying issue in the kernel source*:
      The issue is in this section of code (in net/ipv4/igmp.c), which is called when
      an IGMP query is received  (from mainline 2.6.36-rc3 gitweb):
       ...
      A IGMPv3 query has a length >= 12 and no sources.  This routine will exit after
      line 880, setting the general query timer (random timeout between 0 and query
      response time).  This calls igmp_gq_timer_expire():
      ...
      .. which only sends a v3 response.  So if a v3 query is received, the kernel
      always sends a v3 response.
      
      IGMP queries happen once every 60 sec (per vlan), so the traffic is low.  A
      IGMPv3 query *is* a strict superset of a IGMPv2 query, so this patch properly
      short circuit's the v3 behaviour.
      
      One issue is that this does not address force_igmp_version=1.  Then again, I've
      never seen any IGMPv1 multicast equipment in the wild.  However there is a lot
      of v2-only equipment. If it's necessary to support the IGMPv1 case as well:
      
      837         if (len == 8 || IGMP_V2_SEEN(in_dev) || IGMP_V1_SEEN(in_dev)) {
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79981563
    • Dan Carpenter's avatar
      ppp: potential NULL dereference in ppp_mp_explode() · 3429769b
      Dan Carpenter authored
      
      Smatch complains because we check whether "pch->chan" is NULL and then
      dereference it unconditionally on the next line.  Partly the reason this
      bug was introduced is because code was too complicated.  I've simplified
      it a little.
      
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3429769b
    • Dan Carpenter's avatar
      net/llc: make opt unsigned in llc_ui_setsockopt() · 339db11b
      Dan Carpenter authored
      
      The members of struct llc_sock are unsigned so if we pass a negative
      value for "opt" it can cause a sign bug.  Also it can cause an integer
      overflow when we multiply "opt * HZ".
      
      CC: stable@kernel.org
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      339db11b
  10. Sep 12, 2010
  11. Sep 10, 2010
  12. Sep 09, 2010
Loading