03 Dec, 2013

1 commit

  • Pull networking updates from David Miller:
    "Here is a pile of bug fixes that accumulated while I was in Europe"

    1) In fixing kernel leaks to userspace during copying of socket
    addresses, we broke a case that used to work, namely the user
    providing a buffer larger than the in-kernel generic socket address
    structure. This broke Ruby amongst other things. Fix from Dan
    Carpenter.

    2) Fix regression added by byte queue limit support in 8139cp driver,
    from Yang Yingliang.

    3) The addition of MSG_SENDPAGE_NOTLAST buggered up a few sendpage
    implementations, they should just treat it the same as MSG_MORE.
    Fix from Richard Weinberger and Shawn Landden.

    4) Handle icmpv4 errors received on ipv6 SIT tunnels correctly, from
    Oussama Ghorbel. In particular we should send an ICMPv6 unreachable
    in such situations.

    5) Fix some regressions in the recent genetlink fixes, in particular
    get the pmcraid driver to use the new safer interfaces correctly.
    From Johannes Berg.

    6) macvtap was converted to use a per-cpu set of statistics, but some
    code was still bumping tx_dropped elsewhere. From Jason Wang.

    7) Fix build failure of xen-netback due to missing include on some
    architectures, from Andy Whitecroft.

    8) macvtap double counts received packets in statistics, fix from Vlad
    Yasevich.

    9) Fix various cases of using *_STATS_BH() when *_STATS() is more
    appropriate. From Eric Dumazet and Hannes Frederic Sowa.

    10) Pktgen ipsec mode doesn't update the ipv4 header length and checksum
    properly after encapsulation. Fix from Fan Du.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits)
    net/mlx4_en: Remove selftest TX queues empty condition
    {pktgen, xfrm} Update IPv4 header total len and checksum after tranformation
    virtio_net: make all RX paths handle erors consistently
    virtio_net: fix error handling for mergeable buffers
    virtio_net: Fixed a trivial typo (fitler --> filter)
    netem: fix gemodel loss generator
    netem: fix loss 4 state model
    netem: missing break in ge loss generator
    net/hsr: Support iproute print_opt ('ip -details ...')
    net/hsr: Very small fix of comment style.
    MAINTAINERS: Added net/hsr/ maintainer
    ipv6: fix possible seqlock deadlock in ip6_finish_output2
    ixgbe: Make ixgbe_identify_qsfp_module_generic static
    ixgbe: turn NETIF_F_HW_L2FW_DOFFLOAD off by default
    ixgbe: ixgbe_fwd_ring_down needs to be static
    e1000: fix possible reset_task running after adapter down
    e1000: fix lockdep warning in e1000_reset_task
    e1000: prevent oops when adapter is being closed and reset simultaneously
    igb: Fixed Wake On LAN support
    inet: fix possible seqlock deadlocks
    ...

    Linus Torvalds
     

29 Nov, 2013

1 commit

  • The pmcraid driver is abusing the genetlink API and is using its
    family ID as the multicast group ID, which is invalid and may
    belong to somebody else (and likely will.)

    Make it use the correct API, but since this may already be used
    as-is by userspace, reserve a family ID for this code and also
    reserve that group ID to not break userspace assumptions.

    My previous patch broke event delivery in the driver as I missed
    that it wasn't using the right API and forgot to update it later
    in my series.

    While changing this, I noticed that the genetlink code could use
    the static group ID instead of a strcmp(), so also do that for
    the VFS_DQUOT family.

    Cc: Anil Ravindranath
    Cc: "James E.J. Bottomley"
    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

23 Nov, 2013

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "Things have been quiet this round with mostly bugfixes, percpu
    conversions, and other minor iscsi-target conformance testing changes.

    The highlights include:

    - Add demo_mode_discovery attribute for iscsi-target (Thomas)
    - Convert tcm_fc(FCoE) to use percpu-ida pre-allocation
    - Add send completion interrupt coalescing for ib_isert
    - Convert target-core to use percpu-refcounting for se_lun
    - Fix mutex_trylock usage bug in iscsit_increment_maxcmdsn
    - tcm_loop updates (Hannes)
    - target-core ALUA cleanups + prep for v3.14 SCSI Referrals support (Hannes)

    v3.14 is currently shaping to be a busy development cycle in target
    land, with initial support for T10 Referrals and T10 DIF currently on
    the roadmap"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (40 commits)
    iscsi-target: chap auth shouldn't match username with trailing garbage
    iscsi-target: fix extract_param to handle buffer length corner case
    iscsi-target: Expose default_erl as TPG attribute
    target_core_configfs: split up ALUA supported states
    target_core_alua: Make supported states configurable
    target_core_alua: Store supported ALUA states
    target_core_alua: Rename ALUA_ACCESS_STATE_OPTIMIZED
    target_core_alua: spellcheck
    target core: rename (ex,im)plict -> (ex,im)plicit
    percpu-refcount: Add percpu-refcount.o to obj-y
    iscsi-target: Do not reject non-immediate CmdSNs exceeding MaxCmdSN
    iscsi-target: Convert iscsi_session statistics to atomic_long_t
    target: Convert se_device statistics to atomic_long_t
    target: Fix delayed Task Aborted Status (TAS) handling bug
    iscsi-target: Reject unsupported multi PDU text command sequence
    ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call
    iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn
    target: Core does not need blkdev.h
    target: Pass through I/O topology for block backstores
    iser-target: Avoid using FRMR for single dma entry requests
    ...

    Linus Torvalds
     

20 Nov, 2013

3 commits

  • It appears that driver runs into a problem here if fibsize is too small
    because we allocate user_srbcmd with fibsize size only but later we
    access it until user_srbcmd->sg.count to copy it over to srbcmd.

    It is not correct to test (fibsize < sizeof(*user_srbcmd)) because this
    structure already includes one sg element and this is not needed for
    commands without data. So, we would recommend to add the following
    (instead of test for fibsize == 0).

    Signed-off-by: Mahesh Rajashekhara
    Reported-by: Nico Golde
    Reported-by: Fabian Yamaguchi
    Signed-off-by: Linus Torvalds

    Mahesh Rajashekhara
     
  • Pull networking fixes from David Miller:
    "Mostly these are fixes for fallout due to merge window changes, as
    well as cures for problems that have been with us for a much longer
    period of time"

    1) Johannes Berg noticed two major deficiencies in our genetlink
    registration. Some genetlink protocols we passing in constant
    counts for their ops array rather than something like
    ARRAY_SIZE(ops) or similar. Also, some genetlink protocols were
    using fixed IDs for their multicast groups.

    We have to retain these fixed IDs to keep existing userland tools
    working, but reserve them so that other multicast groups used by
    other protocols can not possibly conflict.

    In dealing with these two problems, we actually now use less state
    management for genetlink operations and multicast groups.

    2) When configuring interface hardware timestamping, fix several
    drivers that simply do not validate that the hwtstamp_config value
    is one the driver actually supports. From Ben Hutchings.

    3) Invalid memory references in mwifiex driver, from Amitkumar Karwar.

    4) In dev_forward_skb(), set the skb->protocol in the right order
    relative to skb_scrub_packet(). From Alexei Starovoitov.

    5) Bridge erroneously fails to use the proper wrapper functions to make
    calls to netdev_ops->ndo_vlan_rx_{add,kill}_vid. Fix from Toshiaki
    Makita.

    6) When detaching a bridge port, make sure to flush all VLAN IDs to
    prevent them from leaking, also from Toshiaki Makita.

    7) Put in a compromise for TCP Small Queues so that deep queued devices
    that delay TX reclaim non-trivially don't have such a performance
    decrease. One particularly problematic area is 802.11 AMPDU in
    wireless. From Eric Dumazet.

    8) Fix crashes in tcp_fastopen_cache_get(), we can see NULL socket dsts
    here. Fix from Eric Dumzaet, reported by Dave Jones.

    9) Fix use after free in ipv6 SIT driver, from Willem de Bruijn.

    10) When computing mergeable buffer sizes, virtio-net fails to take the
    virtio-net header into account. From Michael Dalton.

    11) Fix seqlock deadlock in ip4_datagram_connect() wrt. statistic
    bumping, this one has been with us for a while. From Eric Dumazet.

    12) Fix NULL deref in the new TIPC fragmentation handling, from Erik
    Hugne.

    13) 6lowpan bit used for traffic classification was wrong, from Jukka
    Rissanen.

    14) macvlan has the same issue as normal vlans did wrt. propagating LRO
    disabling down to the real device, fix it the same way. From Michal
    Kubecek.

    15) CPSW driver needs to soft reset all slaves during suspend, from
    Daniel Mack.

    16) Fix small frame pacing in FQ packet scheduler, from Eric Dumazet.

    17) The xen-netfront RX buffer refill timer isn't properly scheduled on
    partial RX allocation success, from Ma JieYue.

    18) When ipv6 ping protocol support was added, the AF_INET6 protocol
    initialization cleanup path on failure was borked a little. Fix
    from Vlad Yasevich.

    19) If a socket disconnects during a read/recvmsg/recvfrom/etc that
    blocks we can do the wrong thing with the msg_name we write back to
    userspace. From Hannes Frederic Sowa. There is another fix in the
    works from Hannes which will prevent future problems of this nature.

    20) Fix route leak in VTI tunnel transmit, from Fan Du.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (106 commits)
    genetlink: make multicast groups const, prevent abuse
    genetlink: pass family to functions using groups
    genetlink: add and use genl_set_err()
    genetlink: remove family pointer from genl_multicast_group
    genetlink: remove genl_unregister_mc_group()
    hsr: don't call genl_unregister_mc_group()
    quota/genetlink: use proper genetlink multicast APIs
    drop_monitor/genetlink: use proper genetlink multicast APIs
    genetlink: only pass array to genl_register_family_with_ops()
    tcp: don't update snd_nxt, when a socket is switched from repair mode
    atm: idt77252: fix dev refcnt leak
    xfrm: Release dst if this dst is improper for vti tunnel
    netlink: fix documentation typo in netlink_set_err()
    be2net: Delete secondary unicast MAC addresses during be_close
    be2net: Fix unconditional enabling of Rx interface options
    net, virtio_net: replace the magic value
    ping: prevent NULL pointer dereference on write to msg_name
    bnx2x: Prevent "timeout waiting for state X"
    bnx2x: prevent CFC attention
    bnx2x: Prevent panic during DMAE timeout
    ...

    Linus Torvalds
     
  • This doesn't really change anything, but prepares for the
    next patch that will change the APIs to pass the group ID
    within the family, rather than the global group ID.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

19 Nov, 2013

1 commit

  • Pull infiniband/rdma updates from Roland Dreier:
    - Re-enable flow steering verbs with new improved userspace ABI
    - Fixes for slow connection due to GID lookup scalability
    - IPoIB fixes
    - Many fixes to HW drivers including mlx4, mlx5, ocrdma and qib
    - Further improvements to SRP error handling
    - Add new transport type for Cisco usNIC

    * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (66 commits)
    IB/core: Re-enable create_flow/destroy_flow uverbs
    IB/core: extended command: an improved infrastructure for uverbs commands
    IB/core: Remove ib_uverbs_flow_spec structure from userspace
    IB/core: Use a common header for uverbs flow_specs
    IB/core: Make uverbs flow structure use names like verbs ones
    IB/core: Rename 'flow' structs to match other uverbs structs
    IB/core: clarify overflow/underflow checks on ib_create/destroy_flow
    IB/ucma: Convert use of typedef ctl_table to struct ctl_table
    IB/cm: Convert to using idr_alloc_cyclic()
    IB/mlx5: Fix page shift in create CQ for userspace
    IB/mlx4: Fix device max capabilities check
    IB/mlx5: Fix list_del of empty list
    IB/mlx5: Remove dead code
    IB/core: Encorce MR access rights rules on kernel consumers
    IB/mlx4: Fix endless loop in resize CQ
    RDMA/cma: Remove unused argument and minor dead code
    RDMA/ucma: Discard events for IDs not yet claimed by user space
    IB/core: Add Cisco usNIC rdma node and transport types
    RDMA/nes: Remove self-assignment from nes_query_qp()
    IB/srp: Report receive errors correctly
    ...

    Linus Torvalds
     

16 Nov, 2013

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual earth-shaking, news-breaking, rocket science pile from
    trivial.git"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
    doc: usb: Fix typo in Documentation/usb/gadget_configs.txt
    doc: add missing files to timers/00-INDEX
    timekeeping: Fix some trivial typos in comments
    mm: Fix some trivial typos in comments
    irq: Fix some trivial typos in comments
    NUMA: fix typos in Kconfig help text
    mm: update 00-INDEX
    doc: Documentation/DMA-attributes.txt fix typo
    DRM: comment: `halve' -> `half'
    Docs: Kconfig: `devlopers' -> `developers'
    doc: typo on word accounting in kprobes.c in mutliple architectures
    treewide: fix "usefull" typo
    treewide: fix "distingush" typo
    mm/Kconfig: Grammar s/an/a/
    kexec: Typo s/the/then/
    Documentation/kvm: Update cpuid documentation for steal time and pv eoi
    treewide: Fix common typo in "identify"
    __page_to_pfn: Fix typo in comment
    Correct some typos for word frequency
    clk: fixed-factor: Fix a trivial typo
    ...

    Linus Torvalds
     

15 Nov, 2013

1 commit

  • Pull virtio updates from Rusty Russell:
    "Nothing really exciting: some groundwork for changing virtio endian,
    and some robustness fixes for broken virtio devices, plus minor
    tweaks"

    * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    virtio_scsi: verify if queue is broken after virtqueue_get_buf()
    x86, asmlinkage, lguest: Pass in globals into assembler statement
    virtio: mmio: fix signature checking for BE guests
    virtio_ring: adapt to notify() returning bool
    virtio_net: verify if queue is broken after virtqueue_get_buf()
    virtio_console: verify if queue is broken after virtqueue_get_buf()
    virtio_blk: verify if queue is broken after virtqueue_get_buf()
    virtio_ring: add new function virtqueue_is_broken()
    virtio_test: verify if virtqueue_kick() succeeded
    virtio_net: verify if virtqueue_kick() succeeded
    virtio_ring: let virtqueue_{kick()/notify()} return a bool
    virtio_ring: change host notification API
    virtio_config: remove virtio_config_val
    virtio: use size-based config accessors.
    virtio_config: introduce size-based accessors.
    virtio_ring: plug kmemleak false positive.
    virtio: pm: use CONFIG_PM_SLEEP instead of CONFIG_PM

    Linus Torvalds
     

14 Nov, 2013

4 commits

  • Pull PCI changes from Bjorn Helgaas:
    "Resource management
    - Fix host bridge window coalescing (Alexey Neyman)
    - Pass type, width, and prefetchability for window alignment (Wei Yang)

    PCI device hotplug
    - Convert acpiphp, acpiphp_ibm to dynamic debug (Lan Tianyu)

    Power management
    - Remove pci_pm_complete() (Liu Chuansheng)

    MSI
    - Fail initialization if device is not in PCI_D0 (Yijing Wang)

    MPS (Max Payload Size)
    - Use pcie_get_mps() and pcie_set_mps() to simplify code (Yijing Wang)
    - Use pcie_set_readrq() to simplify code (Yijing Wang)
    - Use cached pci_dev->pcie_mpss to simplify code (Yijing Wang)

    SR-IOV
    - Enable upstream bridges even for VFs on virtual buses (Bjorn Helgaas)
    - Use pci_is_root_bus() to avoid catching virtual buses (Wei Yang)

    Virtualization
    - Add x86 MSI masking ops (Konrad Rzeszutek Wilk)

    Freescale i.MX6
    - Support i.MX6 PCIe controller (Sean Cross)
    - Increase link startup timeout (Marek Vasut)
    - Probe PCIe in fs_initcall() (Marek Vasut)
    - Fix imprecise abort handler (Tim Harvey)
    - Remove redundant of_match_ptr (Sachin Kamat)

    Renesas R-Car
    - Support Gen2 internal PCIe controller (Valentine Barshak)

    Samsung Exynos
    - Add MSI support (Jingoo Han)
    - Turn off power when link fails (Jingoo Han)
    - Add Jingoo Han as maintainer (Jingoo Han)
    - Add clk_disable_unprepare() on error path (Wei Yongjun)
    - Remove redundant of_match_ptr (Sachin Kamat)

    Synopsys DesignWare
    - Add irq_create_mapping() (Pratyush Anand)
    - Add header guards (Seungwon Jeon)

    Miscellaneous
    - Enable native PCIe services by default on non-ACPI (Andrew Murray)
    - Cleanup _OSC usage and messages (Bjorn Helgaas)
    - Remove pcibios_last_bus boot option on non-x86 (Bjorn Helgaas)
    - Convert bus code to use bus_, drv_, and dev_groups (Greg Kroah-Hartman)
    - Remove unused pci_mem_start (Myron Stowe)
    - Make sysfs functions static (Sachin Kamat)
    - Warn on invalid return from driver probe (Stephen M. Cameron)
    - Remove Intel Haswell D3 delays (Todd E Brandt)
    - Call pci_set_master() in core if driver doesn't do it (Yinghai Lu)
    - Use pci_is_pcie() to simplify code (Yijing Wang)
    - Use PCIe capability accessors to simplify code (Yijing Wang)
    - Use cached pci_dev->pcie_cap to simplify code (Yijing Wang)
    - Removed unused "is_pcie" from struct pci_dev (Yijing Wang)
    - Simplify sysfs CPU affinity implementation (Yijing Wang)"

    * tag 'pci-v3.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (79 commits)
    PCI: Enable upstream bridges even for VFs on virtual buses
    PCI: Add pci_upstream_bridge()
    PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()
    PCI: Warn on driver probe return value greater than zero
    PCI: Drop warning about drivers that don't use pci_set_master()
    PCI: Workaround missing pci_set_master in pci drivers
    powerpc/pci: Use pci_is_pcie() to simplify code [fix]
    PCI: Update pcie_ports 'auto' behavior for non-ACPI platforms
    PCI: imx6: Probe the PCIe in fs_initcall()
    PCI: Add R-Car Gen2 internal PCI support
    PCI: imx6: Remove redundant of_match_ptr
    PCI: Report pci_pme_active() kmalloc failure
    mn10300/PCI: Remove useless pcibios_last_bus
    frv/PCI: Remove pcibios_last_bus
    PCI: imx6: Increase link startup timeout
    PCI: exynos: Remove redundant of_match_ptr
    PCI: imx6: Fix imprecise abort handler
    PCI: Fail MSI/MSI-X initialization if device is not in PCI_D0
    PCI: imx6: Remove redundant dev_err() in imx6_pcie_probe()
    x86/PCI: Coalesce multiple overlapping host bridge windows
    ...

    Linus Torvalds
     
  • Pull first round of SCSI updates from James Bottomley:
    "This patch set is driver updates for qla4xxx, scsi_debug, pm80xx,
    fcoe/libfc, eas2r, lpfc, be2iscsi and megaraid_sas plus some assorted
    bug fixes and cleanups"

    * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (106 commits)
    [SCSI] scsi_error: Escalate to LUN reset if abort fails
    [SCSI] Add 'eh_deadline' to limit SCSI EH runtime
    [SCSI] remove check for 'resetting'
    [SCSI] dc395: Move 'last_reset' into internal host structure
    [SCSI] tmscsim: Move 'last_reset' into host structure
    [SCSI] advansys: Remove 'last_reset' references
    [SCSI] dpt_i2o: return SCSI_MLQUEUE_HOST_BUSY when in reset
    [SCSI] dpt_i2o: Remove DPTI_STATE_IOCTL
    [SCSI] megaraid_sas: Fix synchronization problem between sysPD IO path and AEN path
    [SCSI] lpfc: Fix typo on NULL assignment
    [SCSI] scsi_dh_alua: ALUA handler attach should succeed while TPG is transitioning
    [SCSI] scsi_dh_alua: ALUA check sense should retry device internal reset unit attention
    [SCSI] esas2r: Cleanup snprinf formatting of firmware version
    [SCSI] esas2r: Remove superfluous mask of pcie_cap_reg
    [SCSI] esas2r: Fixes for big-endian platforms
    [SCSI] esas2r: Directly call kernel functions for atomic bit operations
    [SCSI] lpfc 8.3.43: Update lpfc version to driver version 8.3.43
    [SCSI] lpfc 8.3.43: Fixed not processing task management IOCB response status
    [SCSI] lpfc 8.3.43: Fixed spinlock hang.
    [SCSI] lpfc 8.3.43: Fixed invalid Total_Data_Placed value received for els and ct command responses
    ...

    Linus Torvalds
     
  • Pull block IO core updates from Jens Axboe:
    "This is the pull request for the core changes in the block layer for
    3.13. It contains:

    - The new blk-mq request interface.

    This is a new and more scalable queueing model that marries the
    best part of the request based interface we currently have (which
    is fully featured, but scales poorly) and the bio based "interface"
    which the new drivers for high IOPS devices end up using because
    it's much faster than the request based one.

    The bio interface has no block layer support, since it taps into
    the stack much earlier. This means that drivers end up having to
    implement a lot of functionality on their own, like tagging,
    timeout handling, requeue, etc. The blk-mq interface provides all
    these. Some drivers even provide a switch to select bio or rq and
    has code to handle both, since things like merging only works in
    the rq model and hence is faster for some workloads. This is a
    huge mess. Conversion of these drivers nets us a substantial code
    reduction. Initial results on converting SCSI to this model even
    shows an 8x improvement on single queue devices. So while the
    model was intended to work on the newer multiqueue devices, it has
    substantial improvements for "classic" hardware as well. This code
    has gone through extensive testing and development, it's now ready
    to go. A pull request is coming to convert virtio-blk to this
    model will be will be coming as well, with more drivers scheduled
    for 3.14 conversion.

    - Two blktrace fixes from Jan and Chen Gang.

    - A plug merge fix from Alireza Haghdoost.

    - Conversion of __get_cpu_var() from Christoph Lameter.

    - Fix for sector_div() with 64-bit divider from Geert Uytterhoeven.

    - A fix for a race between request completion and the timeout
    handling from Jeff Moyer. This is what caused the merge conflict
    with blk-mq/core, in case you are looking at that.

    - A dm stacking fix from Mike Snitzer.

    - A code consolidation fix and duplicated code removal from Kent
    Overstreet.

    - A handful of block bug fixes from Mikulas Patocka, fixing a loop
    crash and memory corruption on blk cg.

    - Elevator switch bug fix from Tomoki Sekiyama.

    A heads-up that I had to rebase this branch. Initially the immutable
    bio_vecs had been queued up for inclusion, but a week later, it became
    clear that it wasn't fully cooked yet. So the decision was made to
    pull this out and postpone it until 3.14. It was a straight forward
    rebase, just pruning out the immutable series and the later fixes of
    problems with it. The rest of the patches applied directly and no
    further changes were made"

    * 'for-3.13/core' of git://git.kernel.dk/linux-block: (31 commits)
    block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
    block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
    block: Do not call sector_div() with a 64-bit divisor
    kernel: trace: blktrace: remove redundent memcpy() in compat_blk_trace_setup()
    block: Consolidate duplicated bio_trim() implementations
    block: Use rw_copy_check_uvector()
    block: Enable sysfs nomerge control for I/O requests in the plug list
    block: properly stack underlying max_segment_size to DM device
    elevator: acquire q->sysfs_lock in elevator_change()
    elevator: Fix a race in elevator switching and md device initialization
    block: Replace __get_cpu_var uses
    bdi: test bdi_init failure
    block: fix a probe argument to blk_register_region
    loop: fix crash if blk_alloc_queue fails
    blk-core: Fix memory corruption if blkcg_init_queue fails
    block: fix race between request completion and timeout handling
    blktrace: Send BLK_TN_PROCESS events to all running traces
    blk-mq: don't disallow request merges for req->special being set
    blk-mq: mq plug list breakage
    blk-mq: fix for flush deadlock
    ...

    Linus Torvalds
     
  • Pull DMA mask updates from Russell King:
    "This series cleans up the handling of DMA masks in a lot of drivers,
    fixing some bugs as we go.

    Some of the more serious errors include:
    - drivers which only set their coherent DMA mask if the attempt to
    set the streaming mask fails.
    - drivers which test for a NULL dma mask pointer, and then set the
    dma mask pointer to a location in their module .data section -
    which will cause problems if the module is reloaded.

    To counter these, I have introduced two helper functions:
    - dma_set_mask_and_coherent() takes care of setting both the
    streaming and coherent masks at the same time, with the correct
    error handling as specified by the API.
    - dma_coerce_mask_and_coherent() which resolves the problem of
    drivers forcefully setting DMA masks. This is more a marker for
    future work to further clean these locations up - the code which
    creates the devices really should be initialising these, but to fix
    that in one go along with this change could potentially be very
    disruptive.

    The last thing this series does is prise away some of Linux's addition
    to "DMA addresses are physical addresses and RAM always starts at
    zero". We have ARM LPAE systems where all system memory is above 4GB
    physical, hence having DMA masks interpreted by (eg) the block layers
    as describing physical addresses in the range 0..DMAMASK fails on
    these platforms. Santosh Shilimkar addresses this in this series; the
    patches were copied to the appropriate people multiple times but were
    ignored.

    Fixing this also gets rid of some ARM weirdness in the setup of the
    max*pfn variables, and brings ARM into line with every other Linux
    architecture as far as those go"

    * 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
    ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
    ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
    ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
    ARM: DMA-API: better handing of DMA masks for coherent allocations
    ARM: 7857/1: dma: imx-sdma: setup dma mask
    DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
    DMA-API: dcdbas: update DMA mask handing
    DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
    DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
    DMA-API: crypto: remove last references to 'static struct device *dev'
    DMA-API: crypto: fix ixp4xx crypto platform device support
    DMA-API: others: use dma_set_coherent_mask()
    DMA-API: staging: use dma_set_coherent_mask()
    DMA-API: usb: use new dma_coerce_mask_and_coherent()
    DMA-API: usb: use dma_set_coherent_mask()
    DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
    DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
    DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
    ...

    Linus Torvalds
     

11 Nov, 2013

1 commit


10 Nov, 2013

1 commit


09 Nov, 2013

4 commits

  • Add support for periodically reconnecting to an SRP target until
    the dev_loss timer expires. After the tenth reconnection attempt,
    gradually slow down subsequent reconnect attempts.

    Signed-off-by: Bart Van Assche
    Acked-by: David Dillow
    Signed-off-by: Roland Dreier

    Bart Van Assche
     
  • Add the necessary functions in the SRP transport module to allow an
    SRP initiator driver to implement transport layer error handling
    similar to the functionality already provided by the FC transport
    layer. This includes:

    - Support for implementing fast_io_fail_tmo, the time that should
    elapse after having detected a transport layer problem and
    before failing I/O.
    - Support for implementing dev_loss_tmo, the time that should
    elapse after having detected a transport layer problem and
    before removing a remote port.

    Signed-off-by: Bart Van Assche
    Acked-by: David Dillow
    Signed-off-by: Roland Dreier

    Bart Van Assche
     
  • Keep the rport data structure around after srp_remove_host() has
    finished until cleanup of the IB transport layer has finished
    completely. This is necessary because later patches use the rport
    pointer inside the queuecommand callback. Without this patch
    accessing the rport from inside a queuecommand callback is racy
    because srp_remove_host() must be invoked before scsi_remove_host()
    and because the queuecommand callback could get invoked after
    srp_remove_host() has finished. In other words, without this patch
    the queuecommand callback can get invoked after the rport data
    structure has been freed.

    Signed-off-by: Bart Van Assche
    Acked-by: David Dillow
    Signed-off-by: Roland Dreier

    Bart Van Assche
     
  • Signed-off-by: Jens Axboe

    Conflicts:
    block/blk-timeout.c

    Jens Axboe
     

07 Nov, 2013

1 commit

  • Pull driver core / sysfs patches from Greg KH:
    "Here's the big driver core / sysfs update for 3.13-rc1.

    There's lots of dev_groups updates for different subsystems, as they
    all get slowly migrated over to the safe versions of the attribute
    groups (removing userspace races with the creation of the sysfs
    files.) Also in here are some kobject updates, devres expansions, and
    the first round of Tejun's sysfs reworking to enable it to be used by
    other subsystems as a backend for an in-kernel filesystem.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'driver-core-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (83 commits)
    sysfs: rename sysfs_assoc_lock and explain what it's about
    sysfs: use generic_file_llseek() for sysfs_file_operations
    sysfs: return correct error code on unimplemented mmap()
    mdio_bus: convert bus code to use dev_groups
    device: Make dev_WARN/dev_WARN_ONCE print device as well as driver name
    sysfs: separate out dup filename warning into a separate function
    sysfs: move sysfs_hash_and_remove() to fs/sysfs/dir.c
    sysfs: remove unused sysfs_get_dentry() prototype
    sysfs: honor bin_attr.attr.ignore_lockdep
    sysfs: merge sysfs_elem_bin_attr into sysfs_elem_attr
    devres: restore zeroing behavior of devres_alloc()
    sysfs: fix sysfs_write_file for bin file
    input: gameport: convert bus code to use dev_groups
    input: serio: remove bus usage of dev_attrs
    input: serio: use DEVICE_ATTR_RO()
    i2o: convert bus code to use dev_groups
    memstick: convert bus code to use dev_groups
    tifm: convert bus code to use dev_groups
    virtio: convert bus code to use dev_groups
    ipack: convert bus code to use dev_groups
    ...

    Linus Torvalds
     

31 Oct, 2013

2 commits

  • DMA bounce limit is the maximum direct DMA'able memory beyond which
    bounce buffers has to be used to perform dma operations. SCSI driver
    relies on dma_mask but its calculation is based on max_*pfn which
    don't have uniform meaning across architectures. So make use of
    dma_max_pfn() which is expected to return the DMAable maximum pfn
    value across architectures.

    Cc: linux-scsi@vger.kernel.org
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Russell King

    Santosh Shilimkar
     
  • In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we
    added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the
    check as well.

    Signed-off-by: Dan Carpenter
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

25 Oct, 2013

18 commits

  • If a command abort fails there is a fair chance that all other
    aborts will be failing, too.
    So we should be calling LUN reset directly after the first failed
    abort and skip aborting the remaining commands.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • This patchs adds an 'eh_deadline' sysfs attribute to the scsi
    host which limits the overall runtime of the SCSI EH.
    The 'eh_deadline' value is stored in the now obsolete field
    'resetting'.
    When a command is failed the start time of the EH is stored
    in 'last_reset'. If the overall runtime of the SCSI EH is longer
    than last_reset + eh_deadline, the EH is short-circuited and
    falls through to issue a host reset only.

    [jejb: add comments in Scsi_Host about new fields]
    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • Field is now unused, so this is dead code.

    [jejb: remove resetting and last_reset from Scsi_Host]
    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • We have officially run out of flags in a 32-bit space. Extend it
    to 64-bit even on 32-bit archs.

    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • 'last_reset' is only used internally, so move it into the
    internal host structure.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • The 'last_reset' value is only used internally, so move it into
    the internal host structure.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • Serves no purpose whatsoever.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • When the HBA is in reset we should be returning 'busy' and not
    rely on the obscure 'last_reset' feature.

    [jejb: checkpatch fixes]
    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • scsi_block_host/scsi_unlock_host provides the required
    functionality.

    [jejb: checkpatch fixes]
    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • There is syncronization problem between sysPD IO path and AEN path. Driver
    maintains instance->pd_list[] array, which will get updated(by calling
    function megasas_get_pd_list[]), whenever any of below events occurs-

    MR_EVT_PD_INSERTED
    MR_EVT_PD_REMOVED
    MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED
    MR_EVT_FOREIGN_CFG_IMPORTED

    At same time running sysPD IO will be accessing the same array
    instance->pd_list[], which is getting updated in AEN path, because of this IO
    may not get correct PD info from instance->pd_list[] array.

    Signed-off-by: Adam Radford
    Signed-off-by: Sumit Saxena
    Signed-off-by: James Bottomley

    Sumit.Saxena@lsi.com
     
  • In the lpfc_ct_free_iocb function after freeing associated memory to the
    ctiocb->context3, the ctiocb->context1 is set to NULL instead of context3.

    Signed-off-by: Felipe Pena
    Acked-by: James Smart
    Signed-off-by: James Bottomley

    Felipe Pena
     
  • During testing, it was discovered that when a device tries to attach to the
    alua handler while in TPG state of transitioning, the alua_rtpg function will
    wait for it to exit the state before allowing it to continue. As a result, if
    the 60 second timeout expires, the alua handler will not attach to the device.

    To fix this, I have introduced an input argument to alua_rtpg called
    wait_for_transition. The idea is that it will wait for the transition to
    complete before an activation (because the current TPG state has some bearing
    in that case), but during a discovery if it is transitioning, it will not
    wait, and will store the state as standby for the time being.

    I believe the precedent exists for this from commit
    c0d289b3e59577532c45ee9110ef81bd7b341272 Since if the device reports a state
    of transitioning, it can transition to other more valid states, and it has
    been established TPGS is supported on the device, if it is attaching.

    Signed-off-by: Sean Stewart
    Acked-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Stewart, Sean
     
  • When the scsi_dh_alua handler issues an RTPG during initialization, if it gets
    0x06/0x29/0x04 as the sense, it will fail to attach the handler. NetApp
    E-Series returns 0x29/0x00 for power on, and 0x29/0x04 for conditions that
    cause the controller to reboot again. These conditions should be treated
    identically within the handler.

    Signed-off-by: Sean Stewart
    Acked-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Stewart, Sean
     
  • This reverts commit 15b06f9a02406e5460001db6d5af5c738cd3d4e7.

    This is one of four patches that was causing this bug

    [ 205.372823] ================================================
    [ 205.372901] [ BUG: lock held when returning to user space! ]
    [ 205.372979] 3.12.0-rc6-hw-debug-pagealloc+ #67 Not tainted
    [ 205.373055] ------------------------------------------------
    [ 205.373132] megarc.bin/5283 is leaving the kernel with locks still held!
    [ 205.373212] 1 lock held by megarc.bin/5283:
    [ 205.373285] #0: (&sdp->o_sem){.+.+..}, at: [] sg_open+0x3a0/0x4d0

    Cc: Vaughan Cao
    Acked-by: Douglas Gilbert
    Signed-off-by: James Bottomley

    James Bottomley
     
  • This reverts commit 00b2d9d6d05b56fc1d77071ff8ccbd2c65b48dec.

    This is one of four patches that was causing this bug

    [ 205.372823] ================================================
    [ 205.372901] [ BUG: lock held when returning to user space! ]
    [ 205.372979] 3.12.0-rc6-hw-debug-pagealloc+ #67 Not tainted
    [ 205.373055] ------------------------------------------------
    [ 205.373132] megarc.bin/5283 is leaving the kernel with locks still held!
    [ 205.373212] 1 lock held by megarc.bin/5283:
    [ 205.373285] #0: (&sdp->o_sem){.+.+..}, at: [] sg_open+0x3a0/0x4d0

    Cc: Vaughan Cao
    Acked-by: Douglas Gilbert
    Signed-off-by: James Bottomley

    James Bottomley
     
  • This reverts commit e32c9e6300e3af659cbfe45e90a1e7dcd3572ada.

    This is one of four patches that was causing this bug

    [ 205.372823] ================================================
    [ 205.372901] [ BUG: lock held when returning to user space! ]
    [ 205.372979] 3.12.0-rc6-hw-debug-pagealloc+ #67 Not tainted
    [ 205.373055] ------------------------------------------------
    [ 205.373132] megarc.bin/5283 is leaving the kernel with locks still held!
    [ 205.373212] 1 lock held by megarc.bin/5283:
    [ 205.373285] #0: (&sdp->o_sem){.+.+..}, at: [] sg_open+0x3a0/0x4d0

    Cc: Vaughan Cao
    Acked-by: Douglas Gilbert
    Signed-off-by: James Bottomley

    James Bottomley
     
  • This reverts commit 1f962ebcdfa15cede59e9edb299d1330949eec92.

    This is one of four patches that was causing this bug

    [ 205.372823] ================================================
    [ 205.372901] [ BUG: lock held when returning to user space! ]
    [ 205.372979] 3.12.0-rc6-hw-debug-pagealloc+ #67 Not tainted
    [ 205.373055] ------------------------------------------------
    [ 205.373132] megarc.bin/5283 is leaving the kernel with locks still held!
    [ 205.373212] 1 lock held by megarc.bin/5283:
    [ 205.373285] #0: (&sdp->o_sem){.+.+..}, at: [] sg_open+0x3a0/0x4d0

    Cc: Vaughan Cao
    Acked-by: Douglas Gilbert
    Signed-off-by: James Bottomley

    James Bottomley
     
  • Signed-off-by: Bradley Grove
    Signed-off-by: James Bottomley

    Bradley Grove