1. 18 9月, 2011 2 次提交
  2. 17 9月, 2011 6 次提交
    • N
      iscsi-target: Fix sendpage breakage with proper padding+DataDigest iovec offsets · 40b05497
      Nicholas Bellinger 提交于
      This patch fixes a bug in the iscsit_fe_sendpage_sg() transmit codepath that
      was originally introduced with the v3.1 iscsi-target merge that incorrectly
      uses hardcoded cmd->iov_data_count values to determine cmd->iov_data[] offsets
      for extra outgoing padding and DataDigest payload vectors.
      
      This code is obviously incorrect for the DataDigest enabled case with sendpage
      offload, and this fix ensures correct operation for padding + DataDigest,
      padding only, and DataDigest only cases.  The bug was introduced during a
      pre-merge change in iscsit_fe_sendpage_sg() to natively use struct scatterlist
      instead of the legacy v3.0 struct se_mem logic.
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      40b05497
    • L
      Merge branch 'for-linus' of git://github.com/dtor/input · 279b1e0f
      Linus Torvalds 提交于
      * 'for-linus' of git://github.com/dtor/input:
        Input: wacom - fix touch parsing on newer Bamboos
        Input: bcm5974 - add MacBookAir4,1 trackpad support
        Input: wacom - add POINTER and DIRECT device properties
        Input: adp5588-keys - remove incorrect modalias
        Input: cm109 - fix checking return value of usb_control_msg
        Input: wacom - advertise BTN_TOOL_PEN and BTN_STYLUS for PenPartner
        Input: wacom - remove pressure for touch devices
      279b1e0f
    • M
      firewire: ohci: add no MSI quirk for O2Micro controller · f39aa30d
      Ming Lei 提交于
      This fixes https://bugs.launchpad.net/ubuntu/+source/linux/+bug/801719 .
      
      An O2Micro PCI Express FireWire controller,
      "FireWire (IEEE 1394) [0c00]: O2 Micro, Inc. Device [1217:11f7] (rev 05)"
      which is a combination device together with an SDHCI controller and some
      sort of storage controller, misses SBP-2 status writes from an attached
      FireWire HDD.  This problem goes away if MSI is disabled for this
      FireWire controller.
      
      The device reportedly does not require QUIRK_CYCLE_TIMER.
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (amended changelog)
      Cc: <stable@kernel.org>
      f39aa30d
    • N
      iscsi-target: Disable markers + remove dangerous local scope array usage · 2ff017f5
      Nicholas Bellinger 提交于
      This patch makes iscsi-target explictly disable OFMarker=Yes and IFMarker=yes
      parameter key usage during iscsi login by setting IFMarkInt_Reject and
      OFMarkInt_Reject values in iscsi_enforce_integrity_rules() to effectively
      disable iscsi marker usage.  With this patch, an initiator proposer asking
      to enable either marker parameter keys will be issued a 'No' response, and
      the target sets OFMarkInt + IFMarkInt parameter key response to 'Irrelevant'.
      
      With markers disabled during iscsi login, this patch removes the problematic
      on-stack local-scope array for marker intervals in iscsit_do_rx_data() +
      iscsit_do_tx_data(), and other related marker code in iscsi_target_util.c.
      This fixes a potentional stack smashing scenario with small range markers
      enabled and a large MRDSL as reported by DanC here:
      
      [bug report] target: stack can be smashed
      http://www.spinics.net/lists/target-devel/msg00453.htmlReported-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2ff017f5
    • N
      target: Skip non hex characters for VPD=0x83 NAA IEEE Registered Extended · 784eb99e
      Nicholas Bellinger 提交于
      This patch adds target_parse_naa_6h_vendor_specific() to address a bug where the
      conversion of PRODUCT SERIAL NUMBER to use hex2bin() in target_emulate_evpd_83()
      was not doing proper isxdigit() checking.  This conversion of the vpd_unit_serial
      configifs attribute is done while generating a VPD=0x83 NAA IEEE Registered
      Extended DESIGNATOR format's 100 bits of unique VENDOR SPECIFIC IDENTIFIER +
      VENDOR SPECIFIC IDENTIFIER EXTENSION area.
      
      This patch allows vpd_unit_serial (VPD=0x80) and the T10 Vendor ID DESIGNATOR
      format (VPD=0x83) to continue to use free-form variable length ASCII values,
      and now skips any non hex characters for fixed length NAA IEEE Registered Extended
      DESIGNATOR format (VPD=0x83) requring the binary conversion.
      
      This was originally reported by Martin after the v3.1-rc1 change to use hex2bin()
      in commit 11650b85 where the use of non hex
      characters in vpd_unit_serial generated different values than the original
      v3.0 internal hex -> binary code.  This v3.1 change caused a problem with
      filesystems who write a NAA DESIGNATOR onto it's ondisk metadata, and this patch
      will (again) change existing values to ensure that non hex characters are not
      included in the fixed length NAA DESIGNATOR.
      
      Note this patch still expects vpd_unit_serial to be set via existing userspace
      methods of uuid generation, and does not do strict formatting via configfs input.
      
      The original bug report and thread can be found here:
      
      NAA breakage
      http://www.spinics.net/lists/target-devel/msg00477.html
      
      The v3.1-rc1 formatting of VPD=0x83 w/o this patch:
      
      VPD INQUIRY: Device Identification page
        Designation descriptor number 1, descriptor length: 20
          designator_type: NAA,  code_set: Binary
          associated with the addressed logical unit
            NAA 6, IEEE Company_id: 0x1405
            Vendor Specific Identifier: 0xffde35ebf
            Vendor Specific Identifier Extension: 0x3092f498ffa820f9
            [0x6001405ffde35ebf3092f498ffa820f9]
        Designation descriptor number 2, descriptor length: 56
          designator_type: T10 vendor identification,  code_set: ASCII
          associated with the addressed logical unit
            vendor id: LIO-ORG
            vendor specific: IBLOCK:ffde35ec-3092-4980-a820-917636ca54f1
      
      The v3.1-final formatting of VPD=0x83 w/ this patch:
      
      VPD INQUIRY: Device Identification page
        Designation descriptor number 1, descriptor length: 20
          designator_type: NAA,  code_set: Binary
          associated with the addressed logical unit
            NAA 6, IEEE Company_id: 0x1405
            Vendor Specific Identifier: 0xffde35ec3
            Vendor Specific Identifier Extension: 0x924980a82091763
            [0x6001405ffde35ec30924980a82091763]
        Designation descriptor number 2, descriptor length: 56
          designator_type: T10 vendor identification,  code_set: ASCII
          associated with the addressed logical unit
            vendor id: LIO-ORG
            vendor specific: IBLOCK:ffde35ec-3092-4980-a820-917636ca54f1
      
      (v2: Fix parsing code to dereference + check for string terminator instead
           of null pointer to ensure a zeroed payload for vpd_unit_serial less
           than 100 bits of NAA DESIGNATOR VENDOR SPECIFIC area.  Also, remove
           the unnecessary bitwise assignment)
      Reported-by: NMartin Svec <martin.svec@zoner.cz>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      784eb99e
    • L
      Merge branch 'stable/bug.fixes' of git://oss.oracle.com/git/kwilk/xen · abbe0d3c
      Linus Torvalds 提交于
      * 'stable/bug.fixes' of git://oss.oracle.com/git/kwilk/xen:
        xen/i386: follow-up to "replace order-based range checking of M2P table by linear one"
        xen/irq: Alter the locking to use a mutex instead of a spinlock.
        xen/e820: if there is no dom0_mem=, don't tweak extra_pages.
        xen: disable PV spinlocks on HVM
      abbe0d3c
  3. 16 9月, 2011 9 次提交
    • C
      tcm_fc: Work queue based approach instead of managing own thread and event based mechanism · 58fc73d1
      Christoph Hellwig 提交于
      Problem: Changed from wake_up_interruptible -> wake_up_process and
      wait_event_interruptible-> schedule_timeout_interruptible broke the FCoE
      target.  Earlier approach of wake_up_interruptible was also looking at
      'queue_cnt' which is not necessary, because it increment of 'queue_cnt'
      with wake_up_inetrriptible / waker_up_process introduces race condition.
      
      Fix: Instead of fixing the code which used wake_up_process and remove
      'queue_cnt', using work_queue based approach is cleaner and acheives
      same result. As well, work queue based approach has less programming
      overhead and OS manages threads which processes work queues.
      
      This patch is developed by Christoph Hellwig and reviwed+validated by
      Kiran Patil.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKiran Patil <kiran.patil@intel.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      58fc73d1
    • K
      tcm_fc: Invalidation of DDP context for FCoE target in error conditions · 079587b4
      Kiran Patil 提交于
      Problem: HW DDP context wasn;t invalidated in case of ABORTS, etc...
      This leads to the problem where memory pages which are used for DDP
      as user descriptor could get reused for some other purpose (such as to
      satisfy new memory allocation request either by kernel or user mode threads)
      and since HW DDP context was not invalidated, HW continue to write to
      those pages, hence causing memory corruption.
      
      Fix: Either on incoming ABORTS or due to exchange time out, allowed the
      target to cleanup HW DDP context if it was setup for respective ft_cmd.
      Added new function to perform this cleanup, furthur it can be enhanced
      for other cleanup activity.
      
      Additinal Notes: To avoid calling ddp_done from multiple places, composed
      the functionality in helper function "ft_invl_hw_context" and it is being
      called from multiple places. Cleaned up code in function "ft_recv_write_data"
      w.r.t DDP.
      Signed-off-by: NKiran Patil <kiran.patil@intel.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      079587b4
    • R
      target: Fix race between multiple invocations of target_qf_do_work() · bcac364a
      Roland Dreier 提交于
      When work is scheduled with schedule_work(), the work can end up
      running on multiple CPUs at the same time -- this happens if
      the work is already running on one CPU and schedule_work() is called
      on another CPU.  This leads to list corruption with target_qf_do_work(),
      which is roughly doing:
      
      	spin_lock(...);
      	list_for_each_entry_safe(...) {
      		list_del(...);
      		spin_unlock(...);
      
      		// do stuff
      
      		spin_lock(...);
      	}
      
      With multiple CPUs running this code, one CPU can end up deleting the
      list entry that the other CPU is about to work on.
      
      Fix this by splicing the list entries onto a local list and then
      operating on that in the work function.  This way, each invocation of
      target_qf_do_work() operates on its own local list and so multiple
      invocations don't corrupt each other's list.  This also avoids dropping
      and reacquiring the lock for each list entry.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bcac364a
    • L
      Merge branch 'for-linus' of git://github.com/tiwai/sound · c455ea4f
      Linus Torvalds 提交于
      * 'for-linus' of git://github.com/tiwai/sound:
        ALSA: pcm - fix race condition in wait_for_avail()
        ALSA: HDA: Cirrus - fix "Surround Speaker" volume control name
        ALSA: hda - Terminate the recursive connection search properly
        ASoC: Fix trivial build regression in Kirkwood I2S
        ASoC: Blackfin: bf5xx-ad193x: Fix codec device name
        ASoC: Fix reporting of partial jack updates
        ASoC: imx: Fix build warning of unused 'card' variable
        ASoC: Fix register cache sync register_writable WARN_ONs
        ASoC: snd_soc_codec_{readable,writable}_register change default to true
        ASoC: soc-dapm: Fix parameter comment for snd_soc_dapm_free
        MAINTAINERS: Add some missed Wolfson files
        ASoC: MPC5200: replace of_device with platform_device
      c455ea4f
    • L
      asm alternatives: remove incorrect alignment notes · a7f934d4
      Linus Torvalds 提交于
      On x86-64, they were just wasteful: with the explicitly added (now
      unnecessary) padding, the size of the alternatives structure was 16
      bytes, and an alignment of 8 bytes didn't hurt much.
      
      However, it was still silly, since the natural size and alignment for
      the structure is actually just 12 bytes, 4-byte aligned since commit
      59e97e4d ("x86: Make alternative instruction pointers relative").
      So removing the padding, and removing the extra alignment is just a good
      idea.
      
      On x86-32, the alignment of 4 bytes was correct, but was incorrectly
      hardcoded as 8 bytes in <asm/alternative-asm.h>.  That header file had
      used to be an x86-64 only header file, but various unification efforts
      have made it be used for x86-32 too (ie the unification of rwlock and
      rwsem).
      
      That in turn caused x86-32 boot failures, because the extra alignment
      would result in random zero-filled words in the altinstructions section,
      causing oopses early at boot when doing alternative instruction
      replacement.
      
      So just remove all the alignment noise entirely.  It's wrong, and it's
      unnecessary.  The section itself is already properly aligned by the
      linker scripts, and all additions to the section had better be of the
      proper 12-byte format, keeping it aligned.  So if the align directive
      were to ever make a difference, that would be an indication of a serious
      bug to begin with.
      Reported-by: NWerner Landgraf <w.landgraf@ru.r>
      Acked-by: NAndrew Lutomirski <luto@mit.edu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a7f934d4
    • L
      Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 17d8428e
      Linus Torvalds 提交于
      * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        nfs: Do not allow multiple mounts on same mountpoint when using -o noac
        NFS: Fix a typo in nfs_flush_multi
        NFSv4: renewd needs to be able to handle the NFS4ERR_CB_PATH_DOWN error
        NFSv4: The NFSv4.0 client must send RENEW calls if it holds a delegation
        NFSv4: nfs4_proc_renew should be declared static
        NFSv4: nfs4_proc_async_renew should use a GFP_NOFS allocation
      17d8428e
    • L
      Merge branch 'hwmon-for-linus' of git://github.com/groeck/linux · fa758702
      Linus Torvalds 提交于
      * 'hwmon-for-linus' of git://github.com/groeck/linux:
        hwmon: (coretemp) Initialize tmin
        hwmon: (pmbus) Fix low limit temperature alarms
      fa758702
    • C
      hfsplus: fix filesystem size checks · f1fcd9f0
      Christoph Hellwig 提交于
      generic_check_addressable can't deal with hfsplus's larger than page
      size allocation blocks, so simply opencode the checks that we actually
      need in hfsplus_fill_super.
      Signed-off-by: NChristoph Hellwig <hch@tuxera.com>
      Reported-by: NPavel Ivanov <paivanof@gmail.com>
      Tested-by: NPavel Ivanov <paivanof@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f1fcd9f0
    • S
      hfsplus: Fix kfree of wrong pointers in hfsplus_fill_super() error path · f588c960
      Seth Forshee 提交于
      Commit 6596528e ("hfsplus: ensure bio requests are not smaller than
      the hardware sectors") changed the pointers used for volume header
      allocations but failed to free the correct pointers in the error path
      path of hfsplus_fill_super() and hfsplus_read_wrapper.
      
      The second hunk came from a separate patch by Pavel Ivanov.
      Reported-by: NPavel Ivanov <paivanof@gmail.com>
      Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NChristoph Hellwig <hch@tuxera.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f588c960
  4. 15 9月, 2011 23 次提交