1. 09 11月, 2016 11 次提交
  2. 05 8月, 2016 1 次提交
  3. 21 7月, 2016 2 次提交
  4. 14 7月, 2016 2 次提交
  5. 13 7月, 2016 1 次提交
  6. 01 3月, 2016 1 次提交
  7. 14 10月, 2013 2 次提交
    • J
      scsi: Convert uses of compare_ether_addr to ether_addr_equal · 6942df7f
      Joe Perches 提交于
      Preliminary to removing compare_ether_addr altogether:
      
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      Done via cocci script:
      
      $ cat compare_ether_addr.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr(a, b)
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr(a, b)
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) == 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) != 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) == 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) != 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal(a, b)
      +	ether_addr_equal(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      6942df7f
    • N
      fcoe: Fix missing mutex_unlock in fcoe_sysfs_fcf_add error path · 55d0ac5d
      Neil Horman 提交于
      In this pending patch:
      http://patchwork.open-fcoe.org/patch/104/
      
      Tomas Henzl noted that the error path when fcoe_fcf_device_add fails, was
      missing a mutex_unlock call.
      
      Not sure what staet the integration of the above patch is in, but if you could
      either merge this with it, or apply it on top of what you already have, that
      would be great.  Thanks!
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: thenzl@redhat.com
      Reported-by: thenzl@redhat.com
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      55d0ac5d
  8. 12 10月, 2013 1 次提交
    • R
      libfcoe: Make fcoe_sysfs optional / fix fnic NULL exception · 9d34876f
      Robert Love 提交于
      fnic doesn't use any of the create/destroy/enable/disable interfaces
      either from the (legacy) module paramaters or the (new) fcoe_sysfs
      interfaces. When fcoe_sysfs was introduced fnic wasn't changed since
      it wasn't using the interfaces. libfcoe incorrectly assumed that that
      all of its users were using fcoe_sysfs and when adding and deleting
      FCFs would assume the existance of a fcoe_ctlr_device. fnic was not
      allocating this structure because it doesn't care about the standard
      user interfaces (fnic starts on link only). If/When libfcoe tried to use
      the fcoe_ctlr_device's lock for the first time a NULL pointer exception
      would be triggered.
      
      Since fnic doesn't care about sysfs or user interfaces, the solution
      is to drop libfcoe's assumption that all drivers are using fcoe_sysfs.
      
      This patch accomplishes this by changing some of the structure
      relationships.
      
      We need a way to determine when a LLD is using fcoe_sysfs or not and
      we can do that by checking for the existance of the fcoe_ctlr_device.
      Prior to this patch, it was assumed that the fcoe_ctlr structure was
      allocated with the fcoe_ctlr_device and immediately followed it in
      memory. To reach the fcoe_ctlr_device we would simply go back in memory
      from the fcoe_ctlr to get the fcoe_ctlr_device.
      
      Since fnic doesn't allocate the fcoe_ctlr_device, we cannot keep that
      assumption. This patch adds a pointer from the fcoe_ctlr to the
      fcoe_ctlr_device. For bnx2fc and fcoe we will continue to allocate the
      two structures together, but then we'll set the ctlr->cdev pointer
      to point at the fcoe_ctlr_device. fnic will not change and will continue
      to allocate the fcoe_ctlr itself, and ctlr->cdev will remain NULL.
      
      When libfcoe adds fcoe_fcf's to the fcoe_ctlr it will check if ctlr->cdev
      is set and only if so will it continue to interact with fcoe_sysfs.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Tested-by: NHiral Patel <hiralpat@cisco.com>
      9d34876f
  9. 05 9月, 2013 3 次提交
    • B
      fcoe: Reduce fcoe_sysfs_fcf_add() stack usage · 1c2c1b4f
      Bart Van Assche 提交于
      This patch fixes the following compiler warning:
      
      drivers/scsi/fcoe/fcoe_ctlr.c: In function fcoe_sysfs_fcf_add:
      drivers/scsi/fcoe/fcoe_ctlr.c:211:1: warning: the frame size of 1480 bytes is larger than 1024 bytes [-Wframe-larger-than=]
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      1c2c1b4f
    • B
      fcoe: Declare fcoe_ctlr_mode_set() static · 41463a88
      Bart Van Assche 提交于
      The function fcoe_ctlr_mode_set() is local, hence declare it static.
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      41463a88
    • N
      fcoe: ensure that skb placed on the fip_recv_list are unshared · c0866286
      Neil Horman 提交于
      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: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      c0866286
  10. 10 7月, 2013 1 次提交
    • M
      fcoe: Stop fc_rport_priv structure leak · d17efa00
      Mark Rustad 提交于
      When repeatedly doing rmmod and modprobe on the ixgbe
      driver while FCoE is active in a VN2VN configuration,
      memory leaks would be discovered by kmemleak with the
      following backtrace:
      
      unreferenced object 0xffff88003d076000 (size 1024):
        comm "kworker/0:3", pid 2998, jiffies 4295436448 (age 1015.332s)
        hex dump (first 32 bytes):
          48 8a fe 6f 00 88 ff ff 00 00 00 00 00 00 00 00  H..o............
          01 00 00 00 02 00 00 00 7b ac 87 21 1b 00 00 10  ........{..!....
        backtrace:
          [<ffffffff814b308b>] kmemleak_alloc+0x5b/0xc0
          [<ffffffff8115c6e8>] __kmalloc+0xd8/0x1b0
          [<ffffffffa0216638>] fc_rport_create+0x48/0x1f0 [libfc]
          [<ffffffffa023cd86>] fcoe_ctlr_vn_add.isra.10+0x56/0x1a0 [libfcoe]
          [<ffffffffa023f440>] fcoe_ctlr_vn_recv+0x8b0/0xab0 [libfcoe]
          [<ffffffffa023fb06>] fcoe_ctlr_recv_work+0x4c6/0xf60 [libfcoe]
          [<ffffffff81067404>] process_one_work+0x1e4/0x4d0
          [<ffffffff81068def>] worker_thread+0x10f/0x380
          [<ffffffff8107019a>] kthread+0xea/0xf0
          [<ffffffff814d32ec>] ret_from_fork+0x7c/0xb0
          [<ffffffffffffffff>] 0xffffffffffffffff
      
      This patch stops the leak of the fc_rport_priv structure.
      Signed-off-by: NMark Rustad <mark.d.rustad@intel.com>
      Tested-by: NJack Morgan <jack.morgan@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      d17efa00
  11. 11 5月, 2013 1 次提交
  12. 30 4月, 2013 1 次提交
  13. 26 3月, 2013 3 次提交
  14. 20 2月, 2013 1 次提交
  15. 12 2月, 2013 1 次提交
  16. 18 12月, 2012 1 次提交
    • A
      random32: rename random32 to prandom · 496f2f93
      Akinobu Mita 提交于
      This renames all random32 functions to have 'prandom_' prefix as follows:
      
        void prandom_seed(u32 seed);	/* rename from srandom32() */
        u32 prandom_u32(void);		/* rename from random32() */
        void prandom_seed_state(struct rnd_state *state, u64 seed);
        				/* rename from prandom32_seed() */
        u32 prandom_u32_state(struct rnd_state *state);
        				/* rename from prandom32() */
      
      The purpose of this renaming is to prevent some kernel developers from
      assuming that prandom32() and random32() might imply that only
      prandom32() was the one using a pseudo-random number generator by
      prandom32's "p", and the result may be a very embarassing security
      exposure.  This concern was expressed by Theodore Ts'o.
      
      And furthermore, I'm going to introduce new functions for getting the
      requested number of pseudo-random bytes.  If I continue to use both
      prandom32 and random32 prefixes for these functions, the confusion
      is getting worse.
      
      As a result of this renaming, "prandom_" is the common prefix for
      pseudo-random number library.
      
      Currently, srandom32() and random32() are preserved because it is
      difficult to rename too many users at once.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Robert Love <robert.w.love@intel.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
      Cc: David Laight <david.laight@aculab.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Artem Bityutskiy <dedekind1@gmail.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      496f2f93
  17. 15 12月, 2012 1 次提交
    • R
      fcoe: Use the fcoe_sysfs control interface · 435c8667
      Robert Love 提交于
      This patch adds support for the new fcoe_sysfs
      control interface to fcoe.ko. It keeps the deprecated
      interface in tact and therefore either the legacy
      or the new control interfaces can be used. A mixed mode
      is not supported. A user must either use the new
      interfaces or the old ones, but not both.
      
      The fcoe_ctlr's link state is now driven by both the
      netdev link state as well as the fcoe_ctlr_device's
      enabled attribute. The link must be up and the
      fcoe_ctlr_device must be enabled before the FCoE
      Controller starts discovery or login.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      435c8667
  18. 20 7月, 2012 1 次提交
  19. 23 5月, 2012 1 次提交
    • R
      [SCSI] fcoe, bnx2fc, libfcoe: SW FCoE and bnx2fc use FCoE Syfs · 8d55e507
      Robert Love 提交于
      This patch has the SW FCoE driver and the bnx2fc
      driver make use of the new fcoe_sysfs API added
      earlier in this patch series.
      
      After this patch a fcoe_ctlr_device is allocated with
      private data in this order.
      
      +------------------+   +------------------+
      | fcoe_ctlr_device |   | fcoe_ctlr_device |
      +------------------+   +------------------+
      | fcoe_ctlr        |   | fcoe_ctlr        |
      +------------------+   +------------------+
      | fcoe_interface   |   | bnx2fc_interface |
      +------------------+   +------------------+
      
      libfcoe also takes part in this new model since it
      discovers and manages fcoe_fcf instances. The memory
      allocation is different for FCFs. I didn't want to
      impact libfcoe's fcoe_fcf processing, so this patch
      creates fcoe_fcf_device instances for each discovered
      fcoe_fcf. The two are paired using a (void * priv)
      member of the fcoe_ctlr_device. This allows libfcoe
      to continue maintaining its list of fcoe_fcf instances
      and simply attaches and detaches them from existing
      or new fcoe_fcf_device instances.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      8d55e507
  20. 10 5月, 2012 1 次提交
  21. 28 3月, 2012 2 次提交
  22. 15 12月, 2011 1 次提交