1. 20 8月, 2012 3 次提交
  2. 17 8月, 2012 4 次提交
  3. 16 8月, 2012 16 次提交
  4. 15 8月, 2012 17 次提交
    • D
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless · 7bab3ae7
      David S. Miller 提交于
      John W. Linville says:
      
      ====================
      Alexey Khoroshilov provides a potential memory leak in rndis_wlan.
      
      Bob Copeland gives us an ath5k fix for a lockdep problem.
      
      Dan Carpenter fixes a signedness mismatch in at76c50x.
      
      Felix Fietkau corrects a regression caused by an earlier commit that can
      lead to an IRQ storm.
      
      Lorenzo Bianconi offers a fix for a bad variable initialization in ath9k
      that can cause it to improperly mark decrypted frames.
      
      Rajkumar Manoharan fixes ath9k to prevent the btcoex time from running
      when the hardware is asleep.
      
      The remainder are Bluetooth fixes, about which Gustavo says:
      
      	"Here goes some fixes for 3.6-rc1, there are a few fix to
      	thte inquiry code by Ram Malovany, support for 2 new devices,
      	and few others fixes for NULL dereference, possible deadlock
      	and a memory leak."
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7bab3ae7
    • B
      ipv6: addrconf: Avoid calling netdevice notifiers with RCU read-side lock · 4acd4945
      Ben Hutchings 提交于
      Cong Wang reports that lockdep detected suspicious RCU usage while
      enabling IPV6 forwarding:
      
       [ 1123.310275] ===============================
       [ 1123.442202] [ INFO: suspicious RCU usage. ]
       [ 1123.558207] 3.6.0-rc1+ #109 Not tainted
       [ 1123.665204] -------------------------------
       [ 1123.768254] include/linux/rcupdate.h:430 Illegal context switch in RCU read-side critical section!
       [ 1123.992320]
       [ 1123.992320] other info that might help us debug this:
       [ 1123.992320]
       [ 1124.307382]
       [ 1124.307382] rcu_scheduler_active = 1, debug_locks = 0
       [ 1124.522220] 2 locks held by sysctl/5710:
       [ 1124.648364]  #0:  (rtnl_mutex){+.+.+.}, at: [<ffffffff81768498>] rtnl_trylock+0x15/0x17
       [ 1124.882211]  #1:  (rcu_read_lock){.+.+.+}, at: [<ffffffff81871df8>] rcu_lock_acquire+0x0/0x29
       [ 1125.085209]
       [ 1125.085209] stack backtrace:
       [ 1125.332213] Pid: 5710, comm: sysctl Not tainted 3.6.0-rc1+ #109
       [ 1125.441291] Call Trace:
       [ 1125.545281]  [<ffffffff8109d915>] lockdep_rcu_suspicious+0x109/0x112
       [ 1125.667212]  [<ffffffff8107c240>] rcu_preempt_sleep_check+0x45/0x47
       [ 1125.781838]  [<ffffffff8107c260>] __might_sleep+0x1e/0x19b
      [...]
       [ 1127.445223]  [<ffffffff81757ac5>] call_netdevice_notifiers+0x4a/0x4f
      [...]
       [ 1127.772188]  [<ffffffff8175e125>] dev_disable_lro+0x32/0x6b
       [ 1127.885174]  [<ffffffff81872d26>] dev_forward_change+0x30/0xcb
       [ 1128.013214]  [<ffffffff818738c4>] addrconf_forward_change+0x85/0xc5
      [...]
      
      addrconf_forward_change() uses RCU iteration over the netdev list,
      which is unnecessary since it already holds the RTNL lock.  We also
      cannot reasonably require netdevice notifier functions not to sleep.
      Reported-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4acd4945
    • J
      drivers/net/ethernet/mellanox/mlx4/mcg.c: fix error return code · 499b95f6
      Julia Lawall 提交于
      Convert a 0 error return code to a negative one, as returned elsewhere in the
      function.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      identifier ret;
      expression e,e1,e2,e3,e4,x;
      @@
      
      (
      if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
      |
      ret = 0
      )
      ... when != ret = e1
      *x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
      ... when != x = e2
          when != ret = e3
      *if (x == NULL || ...)
      {
        ... when != ret = e4
      *  return ret;
      }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      499b95f6
    • J
      drivers/net/ethernet/freescale/fs_enet: fix error return code · 137bc99f
      Julia Lawall 提交于
      Convert a 0 error return code to a negative one, as returned elsewhere in the
      function.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      identifier ret;
      expression e,e1,e2,e3,e4,x;
      @@
      
      (
      if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
      |
      ret = 0
      )
      ... when != ret = e1
      *x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
      ... when != x = e2
          when != ret = e3
      *if (x == NULL || ...)
      {
        ... when != ret = e4
      *  return ret;
      }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      137bc99f
    • J
      drivers/net/ethernet/ti/davinci_cpdma.c: Remove potential NULL dereference · f37c54b6
      Julia Lawall 提交于
      If the NULL test is necessary, the initialization involving a dereference of
      the tested value should be moved after the NULL test.
      
      The sematic patch that fixes this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      type T;
      expression E;
      identifier i,fld;
      statement S;
      @@
      
      - T i = E->fld;
      + T i;
        ... when != E
            when != i
        if (E == NULL) S
      + i = E->fld;
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f37c54b6
    • B
      llc: Fix races between llc2 handler use and (un)registration · aadf31de
      Ben Hutchings 提交于
      When registering the handlers, any state they rely on must be
      completely initialised first.  When unregistering, we must wait until
      they are definitely no longer running.  llc_rcv() must also avoid
      reading the handler pointers again after checking for NULL.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aadf31de
    • B
      llc2: Call llc_station_exit() on llc2_init() failure path · f4f8720f
      Ben Hutchings 提交于
      Otherwise the station packet handler will remain registered even though
      the module is unloaded.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4f8720f
    • B
      llc2: Fix silent failure of llc_station_init() · 6024935f
      Ben Hutchings 提交于
      llc_station_init() creates and processes an event skb with no effect
      other than to change the state from DOWN to UP.  Allocation failure is
      reported, but then ignored by its caller, llc2_init().  Remove this
      possibility by simply initialising the state as UP.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6024935f
    • I
      net: ipv6: proc: Fix error handling · 4855d6f3
      Igor Maravic 提交于
      Fix error handling in case making of dir dev_snmp6 failes
      Signed-off-by: NIgor Maravic <igorm@etf.rs>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4855d6f3
    • Y
      ipv4: Cache local output routes · 7bd86cc2
      Yan, Zheng 提交于
      Commit caacf05e causes big drop of UDP loop back performance.
      The cause of the regression is that we do not cache the local output
      routes. Each time we send a datagram from unconnected UDP socket,
      the kernel allocates a dst_entry and adds it to the rt_uncached_list.
      It creates lock contention on the rt_uncached_lock.
      Reported-by: NAlex Shi <alex.shi@intel.com>
      Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7bd86cc2
    • B
      aefe5c00
    • B
      net: qmi_wwan: compress device_id list using macros · 5ea42963
      Bjørn Mork 提交于
      Take advantage of the matching macros to make the device id
      list easier to read and maintain.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ea42963
    • B
      net: qmi_wwan: add Sierra Wireless devices · 9b469a60
      Bjørn Mork 提交于
      Add 6 new devices and one modified device, based on
      information from laptop vendor Windows drivers.
      
      Sony provides a driver with two new devices using
      a Gobi 2k+ layout (1199:68a5 and 1199:68a9).  The
      Sony driver also adds a non-standard QMI/net
      interface to the already supported 1199:9011
      Gobi device. We do not know whether this is an
      alternate interface number or an additional
      interface which might be present, but that doesn't
      really matter.
      
      Lenovo provides a driver supporting 4 new devices:
       - MC7770 (1199:901b) with standard Gobi 2k+ layout
       - MC7700 (0f3d:68a2) with layout similar to MC7710
       - MC7750 (114f:68a2) with layout similar to MC7710
       - EM7700 (1199:901c) with layout similar to MC7710
      
      Note regaring the three devices similar to MC7710:
      
      The Windows drivers only support interface #8 on these
      devices.  The MC7710 can support QMI/net functions on
      interface #19 and #20 as well, and this driver is
      verified to work on interface #19 (a firmware bug is
      suspected to prevent #20 from working).
      
      We do not enable these additional interfaces until they
      either show up in a Windows driver or are verified to
      work in some other way.  Therefore limiting the new
      devices to interface #8 for now.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b469a60
    • B
      net: qmi_wwan: use fixed interface number matching · 03304bcb
      Bjørn Mork 提交于
      This driver support many composite USB devices where the
      interface class/subclass/protocol provides no information
      about the interface function. Interfaces with different
      functions may all use ff/ff/ff, like this example of
      a device with three serial interfaces and three QMI/wwan
      interfaces:
      
      T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=116 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=1199 ProdID=68a2 Rev= 0.06
      S:  Manufacturer=Sierra Wireless, Incorporated
      S:  Product=MC7710
      S:  SerialNumber=3581780xxxxxx
      C:* #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=  0mA
      I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
      E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
      E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#=19 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
      E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#=20 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=89(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      
      Instead of class/subclass/protocol the vendor use fixed
      interface numbers for each function, and the Windows
      drivers use these numbers to match driver and function.
      
      The driver has had its own interface number whitelisting
      code to simulate this functionality.  Replace this with
      generic interface number matching now that the USB subsystem
      support is there. This
       - removes the need for a driver_info structure per
         interface number,
       - avoids running the probe function for unsupported
         interfaces, and
       - simplifies the code.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      03304bcb
    • D
      netconsole.txt: revision of examples for the receiver of kernel messages · 6556bfde
      Dirk Gouders 提交于
      There are at least 4 implementations of netcat with the BSD-based
      being the only one that has to be used without the -p switch to
      specify the listening port.
      
      Jan Engelhardt suggested to add an example for socat(1).
      Signed-off-by: NDirk Gouders <gouders@et.bocholt.fh-gelsenkirchen.de>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6556bfde
    • A
      netpoll: re-enable irq in poll_napi() · 6bdb7fe3
      Amerigo Wang 提交于
      napi->poll() needs IRQ enabled, so we have to re-enable IRQ before
      calling it.
      
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6bdb7fe3
    • A
      netpoll: handle vlan tags in netpoll tx and rx path · 689971b4
      Amerigo Wang 提交于
      Without this patch, I can't get netconsole logs remotely over
      vlan. The reason is probably we don't handle vlan tags in either
      netpoll tx or rx path.
      
      I am not sure if I use these vlan functions correctly, at
      least this patch works.
      
      Cc: Benjamin LaHaise <bcrl@kvack.org>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      689971b4