1. 28 8月, 2013 3 次提交
  2. 16 8月, 2013 1 次提交
  3. 10 8月, 2013 2 次提交
  4. 08 8月, 2013 1 次提交
    • T
      SUNRPC: If the rpcbind channel is disconnected, fail the call to unregister · 786615bc
      Trond Myklebust 提交于
      If rpcbind causes our connection to the AF_LOCAL socket to close after
      we've registered a service, then we want to be careful about reconnecting
      since the mount namespace may have changed.
      
      By simply refusing to reconnect the AF_LOCAL socket in the case of
      unregister, we avoid the need to somehow save the mount namespace. While
      this may lead to some services not unregistering properly, it should
      be safe.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Nix <nix@esperi.org.uk>
      Cc: Jeff Layton <jlayton@redhat.com>
      Cc: stable@vger.kernel.org # 3.9.x
      786615bc
  5. 06 8月, 2013 1 次提交
  6. 03 8月, 2013 4 次提交
    • P
      netlabel: use domain based selectors when address based selectors are not available · 6a8b7f0c
      Paul Moore 提交于
      NetLabel has the ability to selectively assign network security labels
      to outbound traffic based on either the LSM's "domain" (different for
      each LSM), the network destination, or a combination of both.  Depending
      on the type of traffic, local or forwarded, and the type of traffic
      selector, domain or address based, different hooks are used to label the
      traffic; the goal being minimal overhead.
      
      Unfortunately, there is a bug such that a system using NetLabel domain
      based traffic selectors does not correctly label outbound local traffic
      that is not assigned to a socket.  The issue is that in these cases
      the associated NetLabel hook only looks at the address based selectors
      and not the domain based selectors.  This patch corrects this by
      checking both the domain and address based selectors so that the correct
      labeling is applied, regardless of the configuration type.
      
      In order to acomplish this fix, this patch also simplifies some of the
      NetLabel domainhash structures to use a more common outbound traffic
      mapping type: struct netlbl_dommap_def.  This simplifies some of the code
      in this patch and paves the way for further simplifications in the
      future.
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a8b7f0c
    • R
      net: check net.core.somaxconn sysctl values · 5f671d6b
      Roman Gushchin 提交于
      It's possible to assign an invalid value to the net.core.somaxconn
      sysctl variable, because there is no checks at all.
      
      The sk_max_ack_backlog field of the sock structure is defined as
      unsigned short. Therefore, the backlog argument in inet_listen()
      shouldn't exceed USHRT_MAX. The backlog argument in the listen() syscall
      is truncated to the somaxconn value. So, the somaxconn value shouldn't
      exceed 65535 (USHRT_MAX).
      Also, negative values of somaxconn are meaningless.
      
      before:
      $ sysctl -w net.core.somaxconn=256
      net.core.somaxconn = 256
      $ sysctl -w net.core.somaxconn=65536
      net.core.somaxconn = 65536
      $ sysctl -w net.core.somaxconn=-100
      net.core.somaxconn = -100
      
      after:
      $ sysctl -w net.core.somaxconn=256
      net.core.somaxconn = 256
      $ sysctl -w net.core.somaxconn=65536
      error: "Invalid argument" setting key "net.core.somaxconn"
      $ sysctl -w net.core.somaxconn=-100
      error: "Invalid argument" setting key "net.core.somaxconn"
      
      Based on a prior patch from Changli Gao.
      Signed-off-by: NRoman Gushchin <klamm@yandex-team.ru>
      Reported-by: NChangli Gao <xiaosuo@gmail.com>
      Suggested-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f671d6b
    • D
      net: rtm_to_ifaddr: free ifa if ifa_cacheinfo processing fails · 446266b0
      Daniel Borkmann 提交于
      Commit 5c766d64 ("ipv4: introduce address lifetime") leaves the ifa
      resource that was allocated via inet_alloc_ifa() unfreed when returning
      the function with -EINVAL. Thus, free it first via inet_free_ifa().
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Reviewed-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      446266b0
    • S
      htb: fix sign extension bug · cbd37556
      stephen hemminger 提交于
      When userspace passes a large priority value
      the assignment of the unsigned value hopt->prio
      to  signed int cl->prio causes cl->prio to become negative and the
      comparison is with TC_HTB_NUMPRIO is always false.
      
      The result is that HTB crashes by referencing outside
      the array when processing packets. With this patch the large value
      wraps around like other values outside the normal range.
      
      See: https://bugzilla.kernel.org/show_bug.cgi?id=60669Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbd37556
  7. 02 8月, 2013 6 次提交
    • Y
      tipc: fix oops when creating server socket fails · c756891a
      Ying Xue 提交于
      When creation of TIPC internal server socket fails,
      we get an oops with the following dump:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
      IP: [<ffffffffa0011f49>] tipc_close_conn+0x59/0xb0 [tipc]
      PGD 13719067 PUD 12008067 PMD 0
      Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
      Modules linked in: tipc(+)
      CPU: 4 PID: 4340 Comm: insmod Not tainted 3.10.0+ #1
      Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
      task: ffff880014360000 ti: ffff88001374c000 task.ti: ffff88001374c000
      RIP: 0010:[<ffffffffa0011f49>]  [<ffffffffa0011f49>] tipc_close_conn+0x59/0xb0 [tipc]
      RSP: 0018:ffff88001374dc98  EFLAGS: 00010292
      RAX: 0000000000000000 RBX: ffff880012ac09d8 RCX: 0000000000000000
      RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffff880014360000
      RBP: ffff88001374dcb8 R08: 0000000000000001 R09: 0000000000000001
      R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0016fa0
      R13: ffffffffa0017010 R14: ffffffffa0017010 R15: ffff880012ac09d8
      FS:  0000000000000000(0000) GS:ffff880016600000(0063) knlGS:00000000f76668d0
      CS:  0010 DS: 002b ES: 002b CR0: 000000008005003b
      CR2: 0000000000000020 CR3: 0000000012227000 CR4: 00000000000006e0
      Stack:
      ffff88001374dcb8 ffffffffa0016fa0 0000000000000000 0000000000000001
      ffff88001374dcf8 ffffffffa0012922 ffff88001374dce8 00000000ffffffea
      ffffffffa0017100 0000000000000000 ffff8800134241a8 ffffffffa0017150
      Call Trace:
      [<ffffffffa0012922>] tipc_server_stop+0xa2/0x1b0 [tipc]
      [<ffffffffa0009995>] tipc_subscr_stop+0x15/0x20 [tipc]
      [<ffffffffa00130f5>] tipc_core_stop+0x1d/0x33 [tipc]
      [<ffffffffa001f0d4>] tipc_init+0xd4/0xf8 [tipc]
      [<ffffffffa001f000>] ? 0xffffffffa001efff
      [<ffffffff8100023f>] do_one_initcall+0x3f/0x150
      [<ffffffff81082f4d>] ? __blocking_notifier_call_chain+0x7d/0xd0
      [<ffffffff810cc58a>] load_module+0x11aa/0x19c0
      [<ffffffff810c8d60>] ? show_initstate+0x50/0x50
      [<ffffffff8190311c>] ? retint_restore_args+0xe/0xe
      [<ffffffff810cce79>] SyS_init_module+0xd9/0x110
      [<ffffffff8190dc65>] sysenter_dispatch+0x7/0x1f
      Code: 6c 24 70 4c 89 ef e8 b7 04 8f e1 8b 73 04 4c 89 e7 e8 7c 9e 32 e1 41 83 ac 24
      b8 00 00 00 01 4c 89 ef e8 eb 0a 8f e1 48 8b 43 08 <4c> 8b 68 20 4d 8d a5 48 03 00
      00 4c 89 e7 e8 04 05 8f e1 4c 89
      RIP  [<ffffffffa0011f49>] tipc_close_conn+0x59/0xb0 [tipc]
      RSP <ffff88001374dc98>
      CR2: 0000000000000020
      ---[ end trace b02321f40e4269a3 ]---
      
      We have the following call chain:
      
      tipc_core_start()
          ret = tipc_subscr_start()
              ret = tipc_server_start(){
                        server->enabled = 1;
                        ret = tipc_open_listening_sock()
                    }
      
      I.e., the server->enabled flag is unconditionally set to 1, whatever
      the return value of tipc_open_listening_sock().
      
      This causes a crash when tipc_core_start() tries to clean up
      resources after a failed initialization:
      
          if (ret == failed)
              tipc_subscr_stop()
                  tipc_server_stop(){
                      if (server->enabled)
                          tipc_close_conn(){
                              NULL reference of con->sock-sk
                              OOPS!
                      }
                  }
      
      To avoid this, tipc_server_start() should only set server->enabled
      to 1 in case of a succesful socket creation. In case of failure, it
      should release all allocated resources before returning.
      
      Problem introduced in commit c5fa7b3c
      ("tipc: introduce new TIPC server infrastructure") in v3.11-rc1.
      Note that it won't be seen often; it takes a module load under memory
      constrained conditions in order to trigger the failure condition.
      Signed-off-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c756891a
    • C
      net: rename CONFIG_NET_LL_RX_POLL to CONFIG_NET_RX_BUSY_POLL · e0d1095a
      Cong Wang 提交于
      Eliezer renames several *ll_poll to *busy_poll, but forgets
      CONFIG_NET_LL_RX_POLL, so in case of confusion, rename it too.
      
      Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0d1095a
    • J
      ipv6: prevent race between address creation and removal · 8a226b2c
      Jiri Benc 提交于
      There's a race in IPv6 automatic addess assignment. The address is created
      with zero lifetime when it's added to various address lists. Before it gets
      assigned the correct lifetime, there's a window where a new address may be
      configured. This causes the semi-initiated address to be deleted in
      addrconf_verify.
      
      This was discovered as a reference leak caused by concurrent run of
      __ipv6_ifa_notify for both RTM_NEWADDR and RTM_DELADDR with the same
      address.
      
      Fix this by setting the lifetime before the address is added to
      inet6_addr_lst.
      
      A few notes:
      
      1. In addrconf_prefix_rcv, by setting update_lft to zero, the
         if (update_lft) { ... } condition is no longer executed for newly
         created addresses. This is okay, as the ifp fields are set in
         ipv6_add_addr now and ipv6_ifa_notify is called (and has been called)
         through addrconf_dad_start.
      
      2. The removal of the whole block under ifp->lock in inet6_addr_add is okay,
         too, as tstamp is initialized to jiffies in ipv6_add_addr.
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a226b2c
    • J
      ipv6: move peer_addr init into ipv6_add_addr() · 3f8f5298
      Jiri Pirko 提交于
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f8f5298
    • M
      ipv6: update ip6_rt_last_gc every time GC is run · 49a18d86
      Michal Kubeček 提交于
      As pointed out by Eric Dumazet, net->ipv6.ip6_rt_last_gc should
      hold the last time garbage collector was run so that we should
      update it whenever fib6_run_gc() calls fib6_clean_all(), not only
      if we got there from ip6_dst_gc().
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49a18d86
    • M
      ipv6: prevent fib6_run_gc() contention · 2ac3ac8f
      Michal Kubeček 提交于
      On a high-traffic router with many processors and many IPv6 dst
      entries, soft lockup in fib6_run_gc() can occur when number of
      entries reaches gc_thresh.
      
      This happens because fib6_run_gc() uses fib6_gc_lock to allow
      only one thread to run the garbage collector but ip6_dst_gc()
      doesn't update net->ipv6.ip6_rt_last_gc until fib6_run_gc()
      returns. On a system with many entries, this can take some time
      so that in the meantime, other threads pass the tests in
      ip6_dst_gc() (ip6_rt_last_gc is still not updated) and wait for
      the lock. They then have to run the garbage collector one after
      another which blocks them for quite long.
      
      Resolve this by replacing special value ~0UL of expire parameter
      to fib6_run_gc() by explicit "force" parameter to choose between
      spin_lock_bh() and spin_trylock_bh() and call fib6_run_gc() with
      force=false if gc_thresh is reached but not max_size.
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ac3ac8f
  8. 01 8月, 2013 7 次提交
    • J
      svcrpc: set cr_gss_mech from gss-proxy as well as legacy upcall · 7193bd17
      J. Bruce Fields 提交于
      The change made to rsc_parse() in
      0dc1531a "svcrpc: store gss mech in
      svc_cred" should also have been propagated to the gss-proxy codepath.
      This fixes a crash in the gss-proxy case.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      7193bd17
    • J
      svcrpc: fix kfree oops in gss-proxy code · 743e2171
      J. Bruce Fields 提交于
      mech_oid.data is an array, not kmalloc()'d memory.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      743e2171
    • J
      svcrpc: fix gss-proxy xdr decoding oops · dc43376c
      J. Bruce Fields 提交于
      Uninitialized stack data was being used as the destination for memcpy's.
      
      Longer term we'll just delete some of this code; all we're doing is
      skipping over xdr that we don't care about.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      dc43376c
    • J
      svcrpc: fix gss_rpc_upcall create error · 9f96392b
      J. Bruce Fields 提交于
      Cc: stable@vger.kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      9f96392b
    • N
      NFSD/sunrpc: avoid deadlock on TCP connection due to memory pressure. · 447383d2
      NeilBrown 提交于
      Since we enabled auto-tuning for sunrpc TCP connections we do not
      guarantee that there is enough write-space on each connection to
      queue a reply.
      
      If memory pressure causes the window to shrink too small, the request
      throttling in sunrpc/svc will not accept any requests so no more requests
      will be handled.  Even when pressure decreases the window will not
      grow again until data is sent on the connection.
      This means we get a deadlock:  no requests will be handled until there
      is more space, and no space will be allocated until a request is
      handled.
      
      This can be simulated by modifying svc_tcp_has_wspace to inflate the
      number of byte required and removing the 'svc_sock_setbufsize' calls
      in svc_setup_socket.
      
      I found that multiplying by 16 was enough to make the requirement
      exceed the default allocation.  With this modification in place:
         mount -o vers=3,proto=tcp 127.0.0.1:/home /mnt
      would block and eventually time out because the nfs server could not
      accept any requests.
      
      This patch relaxes the request throttling to always allow at least one
      request through per connection.  It does this by checking both
        sk_stream_min_wspace() and xprt->xpt_reserved
      are zero.
      The first is zero when the TCP transmit queue is empty.
      The second is zero when there are no RPC requests being processed.
      When both of these are zero the socket is idle and so one more
      request can safely be allowed through.
      
      Applying this patch allows the above mount command to succeed cleanly.
      Tracing shows that the allocated write buffer space quickly grows and
      after a few requests are handled, the extra tests are no longer needed
      to permit further requests to be processed.
      
      The main purpose of request throttling is to handle the case when one
      client is slow at collecting replies and the send queue gets full of
      replies that the client hasn't acknowledged (at the TCP level) yet.
      As we only change behaviour when the send queue is empty this main
      purpose is still preserved.
      Reported-by: NBen Myers <bpm@sgi.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      447383d2
    • L
      bridge: disable snooping if there is no querier · b00589af
      Linus Lüssing 提交于
      If there is no querier on a link then we won't get periodic reports and
      therefore won't be able to learn about multicast listeners behind ports,
      potentially leading to lost multicast packets, especially for multicast
      listeners that joined before the creation of the bridge.
      
      These lost multicast packets can appear since c5c23260
      ("bridge: Add multicast_querier toggle and disable queries by default")
      in particular.
      
      With this patch we are flooding multicast packets if our querier is
      disabled and if we didn't detect any other querier.
      
      A grace period of the Maximum Response Delay of the querier is added to
      give multicast responses enough time to arrive and to be learned from
      before disabling the flooding behaviour again.
      Signed-off-by: NLinus Lüssing <linus.luessing@web.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b00589af
    • D
      net_sched: info leak in atm_tc_dump_class() · 8cb3b9c3
      Dan Carpenter 提交于
      The "pvc" struct has a hole after pvc.sap_family which is not cleared.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8cb3b9c3
  9. 31 7月, 2013 3 次提交
  10. 30 7月, 2013 1 次提交
  11. 29 7月, 2013 2 次提交
    • J
      Bluetooth: Fix calling request callback more than once · 53e21fbc
      Johan Hedberg 提交于
      In certain circumstances, such as an HCI driver using __hci_cmd_sync_ev
      with HCI_EV_CMD_COMPLETE as the expected completion event there is the
      chance that hci_event_packet will call hci_req_cmd_complete twice (once
      for the explicitly looked after event and another time in the actual
      handler of cmd_complete).
      
      In the case of __hci_cmd_sync_ev this introduces a race where the first
      call wakes up the blocking __hci_cmd_sync_ev and lets it complete.
      However, by the time that a second __hci_cmd_sync_ev call is already in
      progress the second hci_req_cmd_complete call (from the previous
      operation) will wake up the blocking function prematurely and cause it
      to fail, as witnessed by the following log:
      
      [  639.232195] hci_rx_work: hci0 Event packet
      [  639.232201] hci_req_cmd_complete: opcode 0xfc8e status 0x00
      [  639.232205] hci_sent_cmd_data: hci0 opcode 0xfc8e
      [  639.232210] hci_req_sync_complete: hci0 result 0x00
      [  639.232220] hci_cmd_complete_evt: hci0 opcode 0xfc8e
      [  639.232225] hci_req_cmd_complete: opcode 0xfc8e status 0x00
      [  639.232228] __hci_cmd_sync_ev: hci0 end: err 0
      [  639.232234] __hci_cmd_sync_ev: hci0
      [  639.232238] hci_req_add_ev: hci0 opcode 0xfc8e plen 250
      [  639.232242] hci_prepare_cmd: skb len 253
      [  639.232246] hci_req_run: length 1
      [  639.232250] hci_sent_cmd_data: hci0 opcode 0xfc8e
      [  639.232255] hci_req_sync_complete: hci0 result 0x00
      [  639.232266] hci_cmd_work: hci0 cmd_cnt 1 cmd queued 1
      [  639.232271] __hci_cmd_sync_ev: hci0 end: err 0
      [  639.232276] Bluetooth: hci0 sending Intel patch command (0xfc8e) failed (-61)
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      53e21fbc
    • J
      Bluetooth: Fix HCI init for BlueFRITZ! devices · 3f8e2d75
      Johan Hedberg 提交于
      None of the BlueFRITZ! devices with manufacurer ID 31 (AVM Berlin)
      support HCI_Read_Local_Supported_Commands. It is safe to use the
      manufacturer ID (instead of e.g. a USB ID specific quirk) because the
      company never created any newer controllers.
      
      < HCI Command: Read Local Supported Comm.. (0x04|0x0002) plen 0 [hci0] 0.210014
      > HCI Event: Command Status (0x0f) plen 4 [hci0] 0.217361
            Read Local Supported Commands (0x04|0x0002) ncmd 1
              Status: Unknown HCI Command (0x01)
      Reported-by: NJörg Esser <jackfritt@boh.de>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Tested-by: NJörg Esser <jackfritt@boh.de>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      3f8e2d75
  12. 28 7月, 2013 1 次提交
    • S
      genetlink: release cb_lock before requesting additional module · c74f2b26
      Stanislaw Gruszka 提交于
      Requesting external module with cb_lock taken can result in
      the deadlock like showed below:
      
      [ 2458.111347] Showing all locks held in the system:
      [ 2458.111347] 1 lock held by NetworkManager/582:
      [ 2458.111347]  #0:  (cb_lock){++++++}, at: [<ffffffff8162bc79>] genl_rcv+0x19/0x40
      [ 2458.111347] 1 lock held by modprobe/603:
      [ 2458.111347]  #0:  (cb_lock){++++++}, at: [<ffffffff8162baa5>] genl_lock_all+0x15/0x30
      
      [ 2461.579457] SysRq : Show Blocked State
      [ 2461.580103]   task                        PC stack   pid father
      [ 2461.580103] NetworkManager  D ffff880034b84500  4040   582      1 0x00000080
      [ 2461.580103]  ffff8800197ff720 0000000000000046 00000000001d5340 ffff8800197fffd8
      [ 2461.580103]  ffff8800197fffd8 00000000001d5340 ffff880019631700 7fffffffffffffff
      [ 2461.580103]  ffff8800197ff880 ffff8800197ff878 ffff880019631700 ffff880019631700
      [ 2461.580103] Call Trace:
      [ 2461.580103]  [<ffffffff817355f9>] schedule+0x29/0x70
      [ 2461.580103]  [<ffffffff81731ad1>] schedule_timeout+0x1c1/0x360
      [ 2461.580103]  [<ffffffff810e69eb>] ? mark_held_locks+0xbb/0x140
      [ 2461.580103]  [<ffffffff817377ac>] ? _raw_spin_unlock_irq+0x2c/0x50
      [ 2461.580103]  [<ffffffff810e6b6d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
      [ 2461.580103]  [<ffffffff81736398>] wait_for_completion_killable+0xe8/0x170
      [ 2461.580103]  [<ffffffff810b7fa0>] ? wake_up_state+0x20/0x20
      [ 2461.580103]  [<ffffffff81095825>] call_usermodehelper_exec+0x1a5/0x210
      [ 2461.580103]  [<ffffffff817362ed>] ? wait_for_completion_killable+0x3d/0x170
      [ 2461.580103]  [<ffffffff81095cc3>] __request_module+0x1b3/0x370
      [ 2461.580103]  [<ffffffff810e6b6d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
      [ 2461.580103]  [<ffffffff8162c5c9>] ctrl_getfamily+0x159/0x190
      [ 2461.580103]  [<ffffffff8162d8a4>] genl_family_rcv_msg+0x1f4/0x2e0
      [ 2461.580103]  [<ffffffff8162d990>] ? genl_family_rcv_msg+0x2e0/0x2e0
      [ 2461.580103]  [<ffffffff8162da1e>] genl_rcv_msg+0x8e/0xd0
      [ 2461.580103]  [<ffffffff8162b729>] netlink_rcv_skb+0xa9/0xc0
      [ 2461.580103]  [<ffffffff8162bc88>] genl_rcv+0x28/0x40
      [ 2461.580103]  [<ffffffff8162ad6d>] netlink_unicast+0xdd/0x190
      [ 2461.580103]  [<ffffffff8162b149>] netlink_sendmsg+0x329/0x750
      [ 2461.580103]  [<ffffffff815db849>] sock_sendmsg+0x99/0xd0
      [ 2461.580103]  [<ffffffff810bb58f>] ? local_clock+0x5f/0x70
      [ 2461.580103]  [<ffffffff810e96e8>] ? lock_release_non_nested+0x308/0x350
      [ 2461.580103]  [<ffffffff815dbc6e>] ___sys_sendmsg+0x39e/0x3b0
      [ 2461.580103]  [<ffffffff810565af>] ? kvm_clock_read+0x2f/0x50
      [ 2461.580103]  [<ffffffff810218b9>] ? sched_clock+0x9/0x10
      [ 2461.580103]  [<ffffffff810bb2bd>] ? sched_clock_local+0x1d/0x80
      [ 2461.580103]  [<ffffffff810bb448>] ? sched_clock_cpu+0xa8/0x100
      [ 2461.580103]  [<ffffffff810e33ad>] ? trace_hardirqs_off+0xd/0x10
      [ 2461.580103]  [<ffffffff810bb58f>] ? local_clock+0x5f/0x70
      [ 2461.580103]  [<ffffffff810e3f7f>] ? lock_release_holdtime.part.28+0xf/0x1a0
      [ 2461.580103]  [<ffffffff8120fec9>] ? fget_light+0xf9/0x510
      [ 2461.580103]  [<ffffffff8120fe0c>] ? fget_light+0x3c/0x510
      [ 2461.580103]  [<ffffffff815dd1d2>] __sys_sendmsg+0x42/0x80
      [ 2461.580103]  [<ffffffff815dd222>] SyS_sendmsg+0x12/0x20
      [ 2461.580103]  [<ffffffff81741ad9>] system_call_fastpath+0x16/0x1b
      [ 2461.580103] modprobe        D ffff88000f2c8000  4632   603    602 0x00000080
      [ 2461.580103]  ffff88000f04fba8 0000000000000046 00000000001d5340 ffff88000f04ffd8
      [ 2461.580103]  ffff88000f04ffd8 00000000001d5340 ffff8800377d4500 ffff8800377d4500
      [ 2461.580103]  ffffffff81d0b260 ffffffff81d0b268 ffffffff00000000 ffffffff81d0b2b0
      [ 2461.580103] Call Trace:
      [ 2461.580103]  [<ffffffff817355f9>] schedule+0x29/0x70
      [ 2461.580103]  [<ffffffff81736d4d>] rwsem_down_write_failed+0xed/0x1a0
      [ 2461.580103]  [<ffffffff810bb200>] ? update_cpu_load_active+0x10/0xb0
      [ 2461.580103]  [<ffffffff8137b473>] call_rwsem_down_write_failed+0x13/0x20
      [ 2461.580103]  [<ffffffff8173492d>] ? down_write+0x9d/0xb2
      [ 2461.580103]  [<ffffffff8162baa5>] ? genl_lock_all+0x15/0x30
      [ 2461.580103]  [<ffffffff8162baa5>] genl_lock_all+0x15/0x30
      [ 2461.580103]  [<ffffffff8162cbb3>] genl_register_family+0x53/0x1f0
      [ 2461.580103]  [<ffffffffa01dc000>] ? 0xffffffffa01dbfff
      [ 2461.580103]  [<ffffffff8162d650>] genl_register_family_with_ops+0x20/0x80
      [ 2461.580103]  [<ffffffffa01dc000>] ? 0xffffffffa01dbfff
      [ 2461.580103]  [<ffffffffa017fe84>] nl80211_init+0x24/0xf0 [cfg80211]
      [ 2461.580103]  [<ffffffffa01dc000>] ? 0xffffffffa01dbfff
      [ 2461.580103]  [<ffffffffa01dc043>] cfg80211_init+0x43/0xdb [cfg80211]
      [ 2461.580103]  [<ffffffff810020fa>] do_one_initcall+0xfa/0x1b0
      [ 2461.580103]  [<ffffffff8105cb93>] ? set_memory_nx+0x43/0x50
      [ 2461.580103]  [<ffffffff810f75af>] load_module+0x1c6f/0x27f0
      [ 2461.580103]  [<ffffffff810f2c90>] ? store_uevent+0x40/0x40
      [ 2461.580103]  [<ffffffff810f82c6>] SyS_finit_module+0x86/0xb0
      [ 2461.580103]  [<ffffffff81741ad9>] system_call_fastpath+0x16/0x1b
      [ 2461.580103] Sched Debug Version: v0.10, 3.11.0-0.rc1.git4.1.fc20.x86_64 #1
      
      Problem start to happen after adding net-pf-16-proto-16-family-nl80211
      alias name to cfg80211 module by below commit (though that commit
      itself is perfectly fine):
      
      commit fb4e1568
      Author: Marcel Holtmann <marcel@holtmann.org>
      Date:   Sun Apr 28 16:22:06 2013 -0700
      
          nl80211: Add generic netlink module alias for cfg80211/nl80211
      Reported-and-tested-by: NJeff Layton <jlayton@redhat.com>
      Reported-by: NRichard W.M. Jones <rjones@redhat.com>
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Reviewed-by: NPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c74f2b26
  13. 27 7月, 2013 1 次提交
  14. 26 7月, 2013 2 次提交
    • G
      Bluetooth: Fix race between hci_register_dev() and hci_dev_open() · fcee3377
      Gustavo Padovan 提交于
      If hci_dev_open() is called after hci_register_dev() added the device to
      the hci_dev_list but before the workqueue are created we could run into a
      NULL pointer dereference (see below).
      
      This bug is very unlikely to happen, systems using bluetoothd to
      manage their bluetooth devices will never see this happen.
      
      BUG: unable to handle kernel NULL pointer dereference
      0100
      IP: [<ffffffff81077502>] __queue_work+0x32/0x3d0
      (...)
      Call Trace:
       [<ffffffff81077be5>] queue_work_on+0x45/0x50
       [<ffffffffa016e8ff>] hci_req_run+0xbf/0xf0 [bluetooth]
       [<ffffffffa01709b0>] ? hci_init2_req+0x720/0x720 [bluetooth]
       [<ffffffffa016ea06>] __hci_req_sync+0xd6/0x1c0 [bluetooth]
       [<ffffffff8108ee10>] ? try_to_wake_up+0x2b0/0x2b0
       [<ffffffff8150e3f0>] ? usb_autopm_put_interface+0x30/0x40
       [<ffffffffa016fad5>] hci_dev_open+0x275/0x2e0 [bluetooth]
       [<ffffffffa0182752>] hci_sock_ioctl+0x1f2/0x3f0 [bluetooth]
       [<ffffffff815c6050>] sock_do_ioctl+0x30/0x70
       [<ffffffff815c75f9>] sock_ioctl+0x79/0x2f0
       [<ffffffff811a8046>] do_vfs_ioctl+0x96/0x560
       [<ffffffff811a85a1>] SyS_ioctl+0x91/0xb0
       [<ffffffff816d989d>] system_call_fastpath+0x1a/0x1f
      Reported-by: NSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      fcee3377
    • J
      Bluetooth: Fix invalid length check in l2cap_information_rsp() · da9910ac
      Jaganath Kanakkassery 提交于
      The length check is invalid since the length varies with type of
      info response.
      
      This was introduced by the commit cb3b3152
      
      Because of this, l2cap info rsp is not handled and command reject is sent.
      
      > ACL data: handle 11 flags 0x02 dlen 16
              L2CAP(s): Info rsp: type 2 result 0
                Extended feature mask 0x00b8
                  Enhanced Retransmission mode
                  Streaming mode
                  FCS Option
                  Fixed Channels
      < ACL data: handle 11 flags 0x00 dlen 10
              L2CAP(s): Command rej: reason 0
                Command not understood
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJaganath Kanakkassery <jaganath.k@samsung.com>
      Signed-off-by: NChan-Yeol Park <chanyeol.park@samsung.com>
      Acked-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      da9910ac
  15. 25 7月, 2013 4 次提交
    • A
      regulatory: use correct regulatory initiator on wiphy register · 23df0b73
      Arik Nemtsov 提交于
      The current regdomain was not always set by the core. This causes
      cards with a custom regulatory domain to ignore user initiated changes
      if done before the card was registered.
      Signed-off-by: NArik Nemtsov <arik@wizery.com>
      Acked-by: NLuis R. Rodriguez <mcgrof@do-not-panic.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      23df0b73
    • F
      net: fix comment above build_skb() · deceb4c0
      Florian Fainelli 提交于
      build_skb() specifies that the data parameter must come from a kmalloc'd
      area, this is only true if frag_size equals 0, because then build_skb()
      will use kzsize(data) to figure out the actual data size. Update the
      comment to reflect that special condition.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      deceb4c0
    • H
      ipv6: take rtnl_lock and mark mrt6 table as freed on namespace cleanup · 905a6f96
      Hannes Frederic Sowa 提交于
      Otherwise we end up dereferencing the already freed net->ipv6.mrt pointer
      which leads to a panic (from Srivatsa S. Bhat):
      
      BUG: unable to handle kernel paging request at ffff882018552020
      IP: [<ffffffffa0366b02>] ip6mr_sk_done+0x32/0xb0 [ipv6]
      PGD 290a067 PUD 207ffe0067 PMD 207ff1d067 PTE 8000002018552060
      Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
      Modules linked in: ebtable_nat ebtables nfs fscache nf_conntrack_ipv4 nf_defrag_ipv4 ipt_REJECT xt_CHECKSUM iptable_mangle iptable_filter ip_tables nfsd lockd nfs_acl exportfs auth_rpcgss autofs4 sunrpc 8021q garp bridge stp llc ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter
      +ip6_tables ipv6 vfat fat vhost_net macvtap macvlan vhost tun kvm_intel kvm uinput iTCO_wdt iTCO_vendor_support cdc_ether usbnet mii microcode i2c_i801 i2c_core lpc_ich mfd_core shpchp ioatdma dca mlx4_core be2net wmi acpi_cpufreq mperf ext4 jbd2 mbcache dm_mirror dm_region_hash dm_log dm_mod
      CPU: 0 PID: 7 Comm: kworker/u33:0 Not tainted 3.11.0-rc1-ea45e-a #4
      Hardware name: IBM  -[8737R2A]-/00Y2738, BIOS -[B2E120RUS-1.20]- 11/30/2012
      Workqueue: netns cleanup_net
      task: ffff8810393641c0 ti: ffff881039366000 task.ti: ffff881039366000
      RIP: 0010:[<ffffffffa0366b02>]  [<ffffffffa0366b02>] ip6mr_sk_done+0x32/0xb0 [ipv6]
      RSP: 0018:ffff881039367bd8  EFLAGS: 00010286
      RAX: ffff881039367fd8 RBX: ffff882018552000 RCX: dead000000200200
      RDX: 0000000000000000 RSI: ffff881039367b68 RDI: ffff881039367b68
      RBP: ffff881039367bf8 R08: ffff881039367b68 R09: 2222222222222222
      R10: 2222222222222222 R11: 2222222222222222 R12: ffff882015a7a040
      R13: ffff882014eb89c0 R14: ffff8820289e2800 R15: 0000000000000000
      FS:  0000000000000000(0000) GS:ffff88103fc00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: ffff882018552020 CR3: 0000000001c0b000 CR4: 00000000000407f0
      Stack:
       ffff881039367c18 ffff882014eb89c0 ffff882015e28c00 0000000000000000
       ffff881039367c18 ffffffffa034d9d1 ffff8820289e2800 ffff882014eb89c0
       ffff881039367c58 ffffffff815bdecb ffffffff815bddf2 ffff882014eb89c0
      Call Trace:
       [<ffffffffa034d9d1>] rawv6_close+0x21/0x40 [ipv6]
       [<ffffffff815bdecb>] inet_release+0xfb/0x220
       [<ffffffff815bddf2>] ? inet_release+0x22/0x220
       [<ffffffffa032686f>] inet6_release+0x3f/0x50 [ipv6]
       [<ffffffff8151c1d9>] sock_release+0x29/0xa0
       [<ffffffff81525520>] sk_release_kernel+0x30/0x70
       [<ffffffffa034f14b>] icmpv6_sk_exit+0x3b/0x80 [ipv6]
       [<ffffffff8152fff9>] ops_exit_list+0x39/0x60
       [<ffffffff815306fb>] cleanup_net+0xfb/0x1a0
       [<ffffffff81075e3a>] process_one_work+0x1da/0x610
       [<ffffffff81075dc9>] ? process_one_work+0x169/0x610
       [<ffffffff81076390>] worker_thread+0x120/0x3a0
       [<ffffffff81076270>] ? process_one_work+0x610/0x610
       [<ffffffff8107da2e>] kthread+0xee/0x100
       [<ffffffff8107d940>] ? __init_kthread_worker+0x70/0x70
       [<ffffffff8162a99c>] ret_from_fork+0x7c/0xb0
       [<ffffffff8107d940>] ? __init_kthread_worker+0x70/0x70
      Code: 20 48 89 5d e8 4c 89 65 f0 4c 89 6d f8 66 66 66 66 90 4c 8b 67 30 49 89 fd e8 db 3c 1e e1 49 8b 9c 24 90 08 00 00 48 85 db 74 06 <4c> 39 6b 20 74 20 bb f3 ff ff ff e8 8e 3c 1e e1 89 d8 4c 8b 65
      RIP  [<ffffffffa0366b02>] ip6mr_sk_done+0x32/0xb0 [ipv6]
       RSP <ffff881039367bd8>
      CR2: ffff882018552020
      Reported-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Tested-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      905a6f96
    • J
      fib_trie: potential out of bounds access in trie_show_stats() · f585a991
      Jerry Snitselaar 提交于
      With the <= max condition in the for loop, it will be always go 1
      element further than needed. If the condition for the while loop is
      never met, then max is MAX_STAT_DEPTH, and for loop will walk off the
      end of nodesizes[].
      Signed-off-by: NJerry Snitselaar <jerry.snitselaar@oracle.com>
      Acked-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f585a991
  16. 23 7月, 2013 1 次提交