1. 04 Sep, 2013 10 commits
    • Bart Van Assche's avatar
      libfc: Avoid that sending after an abort triggers a kernel warning · cae7b6dd
      Bart Van Assche authored
      Calling fc_seq_send() after an ABTS message has been received triggers
      a kernel warning (WARN_ON(!(ep->esb_stat & ESB_ST_SEQ_INIT))). Avoid
      this by returning -ENXIO to the caller if fc_seq_send() is invoked after
      an ABTS message has been received.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      cae7b6dd
    • Bart Van Assche's avatar
      libfc: Protect ep->esb_stat changes via ex_lock · 5d73bea2
      Bart Van Assche authored
      This patch avoids that the WARN_ON(!(ep->esb_stat & ESB_ST_SEQ_INIT))
      statement in fc_seq_send_locked() gets triggered sporadically when
      running FCoE target code due to concurrent ep->esb_stat modifications.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      5d73bea2
    • Bart Van Assche's avatar
      libfc: Fix a race in fc_exch_timer_set_locked() · b8678865
      Bart Van Assche authored
      It is allowed to pass a zero timeout value to fc_seq_exch_abort().
      Avoid that this can cause the timeout function to drop the exchange
      reference before it has been increased by fc_exch_timer_set_locked().
      This patch fixes a crash when running FCoE target code with poisoning
      enabled in the memory allocator.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      b8678865
    • Bart Van Assche's avatar
      libfc: Clarify fc_exch_find() · 8d080236
      Bart Van Assche authored
      The condition ep != NULL && ep->xid != xid can never be met. Make
      this explicit.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      8d080236
    • Bart Van Assche's avatar
      libfc: Micro-optimize fc_setup_exch_mgr() · a84ea8c7
      Bart Van Assche authored
      Convert a loop into an ilog2() call. Although this code is not performance
      sensitive this conversion makes this code easier to read.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      a84ea8c7
    • Bart Van Assche's avatar
      libfc: Debug code fixes · b20d9bfd
      Bart Van Assche authored
      The second argument of fc_lport_error() may be a valid frame pointer.
      Hence only print it as an error code if it really is an error code.
      
      Debug statements must end in a newline. Add one where it is missing.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      b20d9bfd
    • Bart Van Assche's avatar
      libfc: Source code comment spelling fixes · c1d45424
      Bart Van Assche authored
      Change 'initiaive' into 'initiative', 'remainig' into 'remaining'
      and change 'exected' into 'expected'.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      c1d45424
    • Neil Horman's avatar
      fcoe: cleanup return codes from fcoe_rcv · 34bac2ef
      Neil Horman authored
      the return codes from fcoe_rcv should be NET_RX_*, not 0 or -1.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      34bac2ef
    • Neil Horman's avatar
      fcoe: make sure fcoe frames are unshared prior to manipulating them · 8b612434
      Neil Horman authored
      Based on my last patch I noticed that fcoe_rcv has a simmilar problem, in that
      it manipulates the passed in skb without checking to see if it has other users.
      Making manipulations to a shared skb can result in various corruptions.
      
      Easy fix, just make sure the skb is unshared prior to doing anything with it.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      8b612434
    • Neil Horman's avatar
      fcoe: ensure that skb placed on the fip_recv_list are unshared · c0866286
      Neil Horman authored
      Recently had this Oops reported to me on the 3.10 kernel:
      
      [  807.554955] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
      [  807.562799] IP: [<ffffffff814e6fc7>] skb_dequeue+0x47/0x70
      [  807.568296] PGD 20c889067 PUD 20c8b8067 PMD 0
      [  807.572769] Oops: 0002 [#1] SMP
      [  807.655597] Hardware name: Dell Inc. PowerEdge R415/0DDT2D, BIOS 1.8.6 12/06/2011
      [  807.663079] Workqueue: events fcoe_ctlr_recv_work [libfcoe]
      [  807.668656] task: ffff88020b42a160 ti: ffff88020ae6c000 task.ti: ffff88020ae6c000
      [  807.676126] RIP: 0010:[<ffffffff814e6fc7>]  [<ffffffff814e6fc7>] skb_dequeue+0x47/0x70
      [  807.684046] RSP: 0000:ffff88020ae6dd70  EFLAGS: 00010097
      [  807.689349] RAX: 0000000000000246 RBX: ffff8801d04d6700 RCX: 0000000000000000
      [  807.696474] RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffff88020df26434
      [  807.703598] RBP: ffff88020ae6dd88 R08: 00000000000173e0 R09: ffff880216e173e0
      [  807.710723] R10: ffffffff814e5897 R11: ffffea0007413580 R12: ffff88020df26420
      [  807.717847] R13: ffff88020df26434 R14: 0000000000000004 R15: ffff8801d04c42ce
      [  807.724972] FS:  00007fdaab6048c0(0000) GS:ffff880216e00000(0000) knlGS:0000000000000000
      [  807.733049] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [  807.738785] CR2: 0000000000000008 CR3: 000000020cbc9000 CR4: 00000000000006f0
      [  807.745910] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  807.753033] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [  807.760156] Stack:
      [  807.762162]  ffff8801d04d6700 0000000000000001 ffff88020df26400 ffff88020ae6de20
      [  807.769586]  ffffffffa0444409 ffff88020b046a00 ffff88020ae6dde8 ffffffff810105be
      [  807.777008]  ffff88020b42a868 0000000000000000 ffff88020df264a8 ffff88020df26348
      [  807.784431] Call Trace:
      [  807.786885]  [<ffffffffa0444409>] fcoe_ctlr_recv_work+0x59/0x9a0 [libfcoe]
      [  807.793755]  [<ffffffff810105be>] ? __switch_to+0x13e/0x4a0
      [  807.799324]  [<ffffffff8107d0e6>] process_one_work+0x176/0x420
      [  807.805151]  [<ffffffff8107dd0b>] worker_thread+0x11b/0x3a0
      [  807.810717]  [<ffffffff8107dbf0>] ? rescuer_thread+0x350/0x350
      [  807.816545]  [<ffffffff810842b0>] kthread+0xc0/0xd0
      [  807.821416]  [<ffffffff810841f0>] ? insert_kthread_work+0x40/0x40
      [  807.827503]  [<ffffffff8160ce2c>] ret_from_fork+0x7c/0xb0
      [  807.832897]  [<ffffffff810841f0>] ? insert_kthread_work+0x40/0x40
      [  807.858500] RIP  [<ffffffff814e6fc7>] skb_dequeue+0x47/0x70
      [  807.864076]  RSP <ffff88020ae6dd70>
      [  807.867558] CR2: 0000000000000008
      
      Looks like the root cause is the fact that the packet recieve function
      fcoe_ctlr_recv enqueues the skb to a sk_buff_head_list prior to ensuring that
      the skb is unshared.  This can happen when multiple packet listeners recieve an
      skb, as the deliver_skb function just increments skb->users for each handler.
      As a result, having multiple users of a single skb results in multiple
      manipulators of its methods, implying list corruption, and the oops recorded
      above.
      
      The fix is pretty easy, just make sure that we clone the skb if its got multiple
      users with the skb_share_check function, like other protocols do.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      c0866286
  2. 02 Sep, 2013 4 commits
  3. 31 Aug, 2013 3 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · a8787645
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) There was a simplification in the ipv6 ndisc packet sending
          attempted here, which avoided using memory accounting on the
          per-netns ndisc socket for sending NDISC packets.  It did fix some
          important issues, but it causes regressions so it gets reverted here
          too.  Specifically, the problem with this change is that the IPV6
          output path really depends upon there being a valid skb->sk
          attached.
      
          The reason we want to do this change in some form when we figure out
          how to do it right, is that if a device goes down the ndisc_sk
          socket send queue will fill up and block NDISC packets that we want
          to send to other devices too.  That's really bad behavior.
      
          Hopefully Thomas can come up with a better version of this change.
      
       2) Fix a severe TCP performance regression by reverting a change made
          to dev_pick_tx() quite some time ago.  From Eric Dumazet.
      
       3) TIPC returns wrongly signed error codes, fix from Erik Hugne.
      
       4) Fix OOPS when doing IPSEC over ipv4 tunnels due to orphaning the
          skb->sk too early.  Fix from Li Hongjun.
      
       5) RAW ipv4 sockets can use the wrong routing key during lookup, from
          Chris Clark.
      
       6) Similar to #1 revert an older change that tried to use plain
          alloc_skb() for SYN/ACK TCP packets, this broke the netfilter owner
          mark which needs to see the skb->sk for such frames.  From Phil
          Oester.
      
       7) BNX2x driver bug fixes from Ariel Elior and Yuval Mintz,
          specifically in the handling of virtual functions.
      
       8) IPSEC path error propagations to sockets is not done properly when
          we have v4 in v6, and v6 in v4 type rules.  Fix from Hannes Frederic
          Sowa.
      
       9) Fix missing channel context release in mac80211, from Johannes Berg.
      
      10) Fix network namespace handing wrt.  SCM_RIGHTS, from Andy
          Lutomirski.
      
      11) Fix usage of bogus NAPI weight in jme, netxen, and ps3_gelic
          drivers.  From Michal Schmidt.
      
      12) Hopefully a complete and correct fix for the genetlink dump locking
          and module reference counting.  From Pravin B Shelar.
      
      13) sk_busy_loop() must do a cpu_relax(), from Eliezer Tamir.
      
      14) Fix handling of timestamp offset when restoring a snapshotted TCP
          socket.  From Andrew Vagin.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits)
        net: fec: fix time stamping logic after napi conversion
        net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay
        mISDN: return -EINVAL on error in dsp_control_req()
        net: revert 8728c544 ("net: dev_pick_tx() fix")
        Revert "ipv6: Don't depend on per socket memory for neighbour discovery messages"
        ipv4 tunnels: fix an oops when using ipip/sit with IPsec
        tipc: set sk_err correctly when connection fails
        tcp: tcp_make_synack() should use sock_wmalloc
        bridge: separate querier and query timer into IGMP/IPv4 and MLD/IPv6 ones
        ipv6: Don't depend on per socket memory for neighbour discovery messages
        ipv4: sendto/hdrincl: don't use destination address found in header
        tcp: don't apply tsoffset if rcv_tsecr is zero
        tcp: initialize rcv_tstamp for restored sockets
        net: xilinx: fix memleak
        net: usb: Add HP hs2434 device to ZLP exception table
        net: add cpu_relax to busy poll loop
        net: stmmac: fixed the pbl setting with DT
        genl: Hold reference on correct module while netlink-dump.
        genl: Fix genl dumpit() locking.
        xfrm: Fix potential null pointer dereference in xdst_queue_output
        ...
      a8787645
    • Ian Campbell's avatar
      MAINTAINERS: change my DT related maintainer address · de80963e
      Ian Campbell authored
      Filtering capabilities on my work email are pretty much non-existent and this
      has turned out to be something of a firehose...
      
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Acked-by: default avatarPawel Moll <pawel.moll@arm.com>
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      de80963e
    • Linus Torvalds's avatar
      Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 936dbcc3
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "This contains two Oops fixes (opti9xx and HD-audio) and a simple fixup
        for an Acer laptop.  All marked as stable patches"
      
      * tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: opti9xx: Fix conflicting driver object name
        ALSA: hda - Fix NULL dereference with CONFIG_SND_DYNAMIC_MINORS=n
        ALSA: hda - Add inverted digital mic fixup for Acer Aspire One
      936dbcc3
  4. 30 Aug, 2013 15 commits
  5. 29 Aug, 2013 8 commits