21 Feb, 2013

1 commit

  • This patch adds support for emulation of WRITE_SAME w/ UNMAP=0 within
    fd_execute_write_same() backend code.

    The emulation uses vfs_writev() to submit a locally populated buffer
    from the received WRITE_SAME scatterlist block for duplication, and by
    default enforces a limit of max_write_same_len=0x1000 (8192) sectors up
    to the limit of 1024 iovec entries for the single call to vfs_writev().

    It also sets max_write_same_len to the operational default at setup ->
    fd_configure_device() time.

    Tested with 512, 1k, 2k, and 4k block_sizes.

    (asias: convert to vzalloc)

    Cc: Martin K. Petersen
    Cc: Christoph Hellwig
    Cc: Asias He
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

20 Feb, 2013

2 commits


19 Feb, 2013

2 commits

  • This patch adds missing bounds checking for the configfs provided
    mapped_lun value during target_fabric_make_mappedlun() setup ahead
    of se_lun_acl initialization.

    This addresses a potential OOPs when using a mapped_lun value that
    exceeds the hardcoded TRANSPORT_MAX_LUNS_PER_TPG-1 value within
    se_node_acl->device_list[].

    Reported-by: Jan Engelhardt
    Cc: Jan Engelhardt
    Cc:
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch fixes a bug in core_tpg_check_initiator_node_acl() ->
    core_tpg_get_initiator_node_acl() where a dynamically created
    se_node_acl generated during session login would be skipped during
    subsequent lookup due to the '!acl->dynamic_node_acl' check, causing
    a new se_node_acl to be created with a duplicate ->initiatorname.

    This would occur when a fabric endpoint was configured with
    TFO->tpg_check_demo_mode()=1 + TPF->tpg_check_demo_mode_cache()=1
    preventing the release of an existing se_node_acl during se_session
    shutdown.

    Also, drop the unnecessary usage of core_tpg_get_initiator_node_acl()
    within core_dev_init_initiator_node_lun_acl() that originally
    required the extra '!acl->dynamic_node_acl' check, and just pass
    the configfs provided se_node_acl pointer instead.

    Cc:
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

14 Feb, 2013

20 commits

  • An empty parameter list (length == 0) is not an error, so succeed MODE
    SELECT in this case. If the parameter list length is too small,
    return the correct sense code of PARAMETER LIST LENGTH ERROR.

    Signed-off-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger

    Roland Dreier
     
  • SBC-3 (revision 35) says:

    The PARAMETER LIST LENGTH field specifies the length in bytes of the
    UNMAP parameter list that is available to be transferred from the
    Data-Out Buffer. If the parameter list length is greater than zero
    and less than 0008h (i.e., eight), then the device server shall
    terminate the command with CHECK CONDITION status with the sense key
    set to ILLEGAL REQUEST and the additional sense code set to
    PARAMETER LIST LENGTH ERROR. A PARAMETER LIST LENGTH set to zero
    specifies that no data shall be sent.

    so our sense code for too-short descriptors was wrong, and we were
    incorrectly failing commands that didn't transfer any descriptors.

    While we're at it, also handle the UNMAP check:

    If the ANCHOR bit is set to one, and the ANC_SUP bit in the Logical
    Block Provisioning VPD page (see 6.6.4) is set to zero, then the
    device server shall terminate the command with CHECK CONDITION
    status with the sense key set to ILLEGAL REQUEST and the additional
    sense code set to INVALID FIELD IN CDB.

    (chris boot: Fix wrong cut+paste comment in transport_send_check_condition_and_sense)

    Signed-off-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger

    Roland Dreier
     
  • We're supposed to return LOGICAL BLOCK ADDRESS OUT OF RANGE, not
    INVALID FIELD IN CDB.

    Signed-off-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger

    Roland Dreier
     
  • The loop in rd_execute_rw() will never terminate if the
    sg element has a zero size. Or it'll spill over into
    outer space if the sg element is larger than the available
    space.
    So we need to add some safety catches here.

    Cc: Nic Bellinger
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Nicholas Bellinger

    Hannes Reinecke
     
  • This adds virtio-scsi multi-queue support to tcm_vhost. In order to use
    multi-queue, guest side multi-queue support is need. It can
    be found here:

    https://lkml.org/lkml/2012/12/18/166

    Currently, only one thread is created by vhost core code for each
    vhost_scsi instance. Even if there are multi-queues, all the handling of
    guest kick (vhost_scsi_handle_kick) are processed in one thread. This is
    not optimal. Luckily, most of the work is offloaded to the tcm_vhost
    workqueue.

    Some initial perf numbers:
    1 queue, 4 targets, 1 lun per target
    4K request size, 50% randread + 50% randwrite: 127K/127k IOPS

    4 queues, 4 targets, 1 lun per target
    4K request size, 50% randread + 50% randwrite: 181K/181k IOPS

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • In order to take advantages of Paolo's multi-queue virito-scsi, we need
    multi-target support in tcm_vhost first. Otherwise all the requests go
    to one queue and other queues are idle.

    This patch makes:

    1. All the targets under the wwpn is seen and can be used by guest.
    2. No need to pass the tpgt number in struct vhost_scsi_target to
    tcm_vhost.ko. Only wwpn is needed.
    3. We can always pass max_target = 255 to guest now, since we abort the
    request who's target id does not exist.

    Changes in v2:
    - Handle non-contiguous tpgt

    Changes in v3:
    - Simplfy lock in vhost_scsi_set_endpoint
    - Return -EEXIST when does not match

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • This patch changes LIO to use the configfs backend device name as the
    model if you echo '1' to an individual device's emulate_model_alias attribute.
    This is a valid operation only on devices with an export count of 0.

    Signed-off-by: Tregaron Bayly
    Signed-off-by: Nicholas Bellinger

    Tregaron Bayly
     
  • The temporary buffer was only 32 characters but ->last_intr_fail_ip_addr
    is a 48 character buffer. We don't need to use a temporary buffer at
    all, we can just print directly to "page".

    Signed-off-by: Dan Carpenter
    Signed-off-by: Nicholas Bellinger

    Dan Carpenter
     
  • "lstat->last_intr_fail_ip_addr" is an array inside the "lstat" struct.
    It's never NULL so we always print "ipv6\n" here. The test should be
    "if (lstat->last_intr_fail_ip_family == AF_INET6)".

    We don't need the temporary buffer either. We could print directly into
    "page".

    Signed-off-by: Dan Carpenter
    Signed-off-by: Nicholas Bellinger

    Dan Carpenter
     
  • This patch allows IBLOCK to check block hints in request_queue->flush_flags
    when reporting current backend device WriteCacheEnabled status to a remote
    SCSI initiator port.

    This is done via a se_subsystem_api->get_write_cache() call instead of a
    backend se_device creation time flag, as we expect REQ_FLUSH bits to possibly
    change from an underlying blk_queue_flush() by the SCSI disk driver, or
    internal raw struct block_device driver usage.

    Also go ahead and update iblock_execute_rw() bio I/O path code to use
    REQ_FLUSH + REQ_FUA hints when determining WRITE_FUA usage, and make SPC
    emulation code use a spc_check_dev_wce() helper to handle both types of
    cases for virtual backend subsystem drivers.

    (asias: Drop unnecessary comparsion operators)

    Reported-by: majianpeng
    Cc: majianpeng
    Cc: Christoph Hellwig
    Cc: Jens Axboe
    Cc: James Bottomley
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • My static checker complains because we use sprintf() to print some
    unsigned ints into 10 byte buffers. In theory unsigned ints can take 10
    characters and we need another for the terminator.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Nicholas Bellinger

    Dan Carpenter
     
  • We can get all the pages in one time instead of calling
    gup N times.

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • Add a helper to calculate the number of pages needed for a iov entry.

    (nab: Drop unnecessary inline)

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • This drops the cmd completion list spin lock and makes the cmd
    completion queue lock-less.

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • "buf" is 128 characters and "vpd->device_identifier" is 256. It makes
    the static checkers complain.

    Also bump VPD_TMP_BUF_SIZE to match INQUIRY_VPD_DEVICE_IDENTIFIER_LEN.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Nicholas Bellinger

    Dan Carpenter
     
  • Sequential scan of rd_dev->sg_table_array in rd_get_sg_table is
    a serious I/O performance bottleneck for large rd LUNs. Fix this
    by computing the sg_table index directly from page offset because
    all sg_tables (except the last one) have the same number of pages.

    Tested with 90 GiB rd_mcp LUN, where the patch improved maximal
    random R/W IOPS by more than 100-150%, depending on actual
    hardware and SAN setup.

    Signed-off-by: Martin Svec
    Signed-off-by: Nicholas Bellinger

    Martin Svec
     
  • Signed-off-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger

    Roland Dreier
     
  • We do the same thing no matter which way the test goes, so just remove
    the test and do what we're going to do.

    The debug messages printed the wrong value of CMD_T_ACTIVE and don't
    seem particularly useful, remove them too.

    Signed-off-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger

    Roland Dreier
     
  • Some target drivers might need to access the inquiry data
    directly, without sending out the actual command.
    So export these functions.

    Signed-off-by: Hannes Reinecke
    Cc: Nicholas Bellinger
    Signed-off-by: Nicholas Bellinger

    Hannes Reinecke
     

09 Feb, 2013

7 commits

  • Linus Torvalds
     
  • Pull ARM fixes from Russell King:
    "I was going to hold these off until v3.8 was out, and send them with a
    stable tag, but as everyone else is pushing much bigger fixes which
    Linus is accepting, let's save people from the hastle of having to
    patch v3.8 back into working or use a stable kernel.

    Looking at the diffstat, this really is high value for its size; this
    is miniscule compared to how the -rc6 to tip diffstat currently looks.

    So, four patches in this set:
    - Punit Agrawal reports that the kernel no longer boots on MPCore due
    to a new assumption made in the GIC code which isn't true of
    earlier GIC designs. This is the biggest change in this set.
    - Punit's boot log also revealed a bunch of WARN_ON() dumps caused by
    the DT-ification of the GIC support without fixing up non-DT
    Realview - which now sees a greater number of interrupts than it
    did before.
    - A fix for the DMA coherent code from Marek which uses the wrong
    check for atomic allocations; this can result in spinlock lockups
    or other nasty effects.
    - A fix from Will, which will affect all Android based platforms if
    not applied (which use the 2G:2G VM split) - this causes
    particularly 'make' to misbehave unless this bug is fixed."

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7641/1: memory: fix broken mmap by ensuring TASK_UNMAPPED_BASE is aligned
    ARM: DMA mapping: fix bad atomic test
    ARM: realview: ensure that we have sufficient IRQs available
    ARM: GIC: fix GIC cpumask initialization

    Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) Revert iwlwifi reclaimed packet tracking, it causes problems for a
    bunch of folks. From Emmanuel Grumbach.

    2) Work limiting code in brcmsmac wifi driver can clear tx status
    without processing the event. From Arend van Spriel.

    3) rtlwifi USB driver processes wrong SKB, fix from Larry Finger.

    4) l2tp tunnel delete can race with close, fix from Tom Parkin.

    5) pktgen_add_device() failures are not checked at all, fix from Cong
    Wang.

    6) Fix unintentional removal of carrier off from tun_detach(),
    otherwise we confuse userspace, from Michael S. Tsirkin.

    7) Don't leak socket reference counts and ubufs in vhost-net driver,
    from Jason Wang.

    8) vmxnet3 driver gets it's initial carrier state wrong, fix from Neil
    Horman.

    9) Protect against USB networking devices which spam the host with 0
    length frames, from Bjørn Mork.

    10) Prevent neighbour overflows in ipv6 for locally destined routes,
    from Marcelo Ricardo. This is the best short-term fix for this, a
    longer term fix has been implemented in net-next.

    11) L2TP uses ipv4 datagram routines in it's ipv6 code, whoops. This
    mistake is largely because the ipv6 functions don't even have some
    kind of prefix in their names to suggest they are ipv6 specific.
    From Tom Parkin.

    12) Check SYN packet drops properly in tcp_rcv_fastopen_synack(), from
    Yuchung Cheng.

    13) Fix races and TX skb freeing bugs in via-rhine's NAPI support, from
    Francois Romieu and your's truly.

    14) Fix infinite loops and divides by zero in TCP congestion window
    handling, from Eric Dumazet, Neal Cardwell, and Ilpo Järvinen.

    15) AF_PACKET tx ring handling can leak kernel memory to userspace, fix
    from Phil Sutter.

    16) Fix error handling in ipv6 GRE tunnel transmit, from Tommi Rantala.

    17) Protect XEN netback driver against hostile frontend putting garbage
    into the rings, don't leak pages in TX GOP checking, and add proper
    resource releasing in error path of xen_netbk_get_requests(). From
    Ian Campbell.

    18) SCTP authentication keys should be cleared out and released with
    kzfree(), from Daniel Borkmann.

    19) L2TP is a bit too clever trying to maintain skb->truesize, and ends
    up corrupting socket memory accounting to the point where packet
    sending is halted indefinitely. Just remove the adjustments
    entirely, they aren't really needed. From Eric Dumazet.

    20) ATM Iphase driver uses a data type with the same name as the S390
    headers, rename to fix the build. From Heiko Carstens.

    21) Fix a typo in copying the inner network header offset from one SKB
    to another, from Pravin B Shelar.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (56 commits)
    net: sctp: sctp_endpoint_free: zero out secret key data
    net: sctp: sctp_setsockopt_auth_key: use kzfree instead of kfree
    atm/iphase: rename fregt_t -> ffreg_t
    net: usb: fix regression from FLAG_NOARP code
    l2tp: dont play with skb->truesize
    net: sctp: sctp_auth_key_put: use kzfree instead of kfree
    netback: correct netbk_tx_err to handle wrap around.
    xen/netback: free already allocated memory on failure in xen_netbk_get_requests
    xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop.
    xen/netback: shutdown the ring if it contains garbage.
    net: qmi_wwan: add more Huawei devices, including E320
    net: cdc_ncm: add another Huawei vendor specific device
    ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit()
    tcp: fix for zero packets_in_flight was too broad
    brcmsmac: rework of mac80211 .flush() callback operation
    ssb: unregister gpios before unloading ssb
    bcma: unregister gpios before unloading bcma
    rtlwifi: Fix scheduling while atomic bug
    net: usbnet: fix tx_dropped statistics
    tcp: ipv6: Update MIB counters for drops
    ...

    Linus Torvalds
     
  • Daniel Borkmann says:

    ====================
    Cryptographically used keys should be zeroed out when our session
    ends resp. memory is freed, thus do not leave them somewhere in the
    memory.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • On sctp_endpoint_destroy, previously used sensitive keying material
    should be zeroed out before the memory is returned, as we already do
    with e.g. auth keys when released.

    Signed-off-by: Daniel Borkmann
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • In sctp_setsockopt_auth_key, we create a temporary copy of the user
    passed shared auth key for the endpoint or association and after
    internal setup, we free it right away. Since it's sensitive data, we
    should zero out the key before returning the memory back to the
    allocator. Thus, use kzfree instead of kfree, just as we do in
    sctp_auth_key_put().

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • We have conflicting type qualifiers for "freg_t" in s390's ptrace.h and the
    iphase atm device driver, which causes the compile error below.
    Unfortunately the s390 typedef can't be renamed, since it's a user visible api,
    nor can I change the include order in s390 code to avoid the conflict.

    So simply rename the iphase typedef to a new name. Fixes this compile error:

    In file included from drivers/atm/iphase.c:66:0:
    drivers/atm/iphase.h:639:25: error: conflicting type qualifiers for 'freg_t'
    In file included from next/arch/s390/include/asm/ptrace.h:9:0,
    from next/arch/s390/include/asm/lowcore.h:12,
    from next/arch/s390/include/asm/thread_info.h:30,
    from include/linux/thread_info.h:54,
    from include/linux/preempt.h:9,
    from include/linux/spinlock.h:50,
    from include/linux/seqlock.h:29,
    from include/linux/time.h:5,
    from include/linux/stat.h:18,
    from include/linux/module.h:10,
    from drivers/atm/iphase.c:43:
    next/arch/s390/include/uapi/asm/ptrace.h:197:3: note: previous declaration of 'freg_t' was here

    Signed-off-by: Heiko Carstens
    Acked-by: chas williams - CONTRACTOR
    Signed-off-by: David S. Miller

    Heiko Carstens
     

08 Feb, 2013

8 commits

  • We have received multiple reports of mmap failures when running with a
    2:2 vm split. These manifest as either -EINVAL with a non page-aligned
    address (ending 0xaaa) or a SEGV, depending on the application. The
    issue is commonly observed in children of make, which appears to use
    bottom-up mmap (assumedly because it changes the stack rlimit).

    Further investigation reveals that this regression was triggered by
    394ef6403abc ("mm: use vm_unmapped_area() on arm architecture"), whereby
    TASK_UNMAPPED_BASE is no longer page-aligned for bottom-up mmap, causing
    get_unmapped_area to choke on misaligned addressed.

    This patch fixes the problem by defining TASK_UNMAPPED_BASE in terms of
    TASK_SIZE and explicitly aligns the result to 16M, matching the other
    end of the heap.

    Acked-by: Nicolas Pitre
    Reported-by: Steve Capper
    Reported-by: Jean-Francois Moine
    Reported-by: Christoffer Dall
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • Realview fails to boot with this warning:
    BUG: spinlock lockup suspected on CPU#0, init/1
    lock: 0xcf8bde10, .magic: dead4ead, .owner: init/1, .owner_cpu: 0
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r6:cf8bde10 r5:cf83d1c0 r4:cf8bde10 r3:cf83d1c0
    [] (dump_stack+0x0/0x1c) from [] (spin_dump+0x84/0x98)
    [] (spin_dump+0x0/0x98) from [] (do_raw_spin_lock+0x100/0x198)
    [] (do_raw_spin_lock+0x0/0x198) from [] (_raw_spin_lock+0x3c/0x44)
    [] (_raw_spin_lock+0x0/0x44) from [] (pl011_console_write+0xe8/0x11c)
    [] (pl011_console_write+0x0/0x11c) from [] (call_console_drivers.clone.7+0xdc/0x104)
    [] (call_console_drivers.clone.7+0x0/0x104) from [] (console_unlock+0x2e8/0x454)
    [] (console_unlock+0x0/0x454) from [] (vprintk_emit+0x2d8/0x594)
    [] (vprintk_emit+0x0/0x594) from [] (printk+0x3c/0x44)
    [] (printk+0x0/0x44) from [] (warn_slowpath_common+0x28/0x6c)
    [] (warn_slowpath_common+0x0/0x6c) from [] (warn_slowpath_null+0x24/0x2c)
    [] (warn_slowpath_null+0x0/0x2c) from [] (lockdep_trace_alloc+0xd8/0xf0)
    [] (lockdep_trace_alloc+0x0/0xf0) from [] (kmem_cache_alloc+0x24/0x11c)
    [] (kmem_cache_alloc+0x0/0x11c) from [] (__get_vm_area_node.clone.24+0x7c/0x16c)
    [] (__get_vm_area_node.clone.24+0x0/0x16c) from [] (get_vm_area_caller+0x48/0x54)
    [] (get_vm_area_caller+0x0/0x54) from [] (__alloc_remap_buffer.clone.15+0x38/0xb8)
    [] (__alloc_remap_buffer.clone.15+0x0/0xb8) from [] (__dma_alloc+0x160/0x2c8)
    [] (__dma_alloc+0x0/0x2c8) from [] (arm_dma_alloc+0x88/0xa0)[] (arm_dma_alloc+0x0/0xa0) from [] (dma_pool_alloc+0xcc/0x1a8)
    [] (dma_pool_alloc+0x0/0x1a8) from [] (pl08x_fill_llis_for_desc+0x28/0x568)
    [] (pl08x_fill_llis_for_desc+0x0/0x568) from [] (pl08x_prep_slave_sg+0x258/0x3b0)
    [] (pl08x_prep_slave_sg+0x0/0x3b0) from [] (pl011_dma_tx_refill+0x140/0x288)
    [] (pl011_dma_tx_refill+0x0/0x288) from [] (pl011_start_tx+0xe4/0x120)
    [] (pl011_start_tx+0x0/0x120) from [] (__uart_start+0x48/0x4c)
    [] (__uart_start+0x0/0x4c) from [] (uart_start+0x2c/0x3c)
    [] (uart_start+0x0/0x3c) from [] (uart_write+0xcc/0xf4)
    [] (uart_write+0x0/0xf4) from [] (n_tty_write+0x1c0/0x3e4)
    [] (n_tty_write+0x0/0x3e4) from [] (tty_write+0x144/0x240)
    [] (tty_write+0x0/0x240) from [] (redirected_tty_write+0x98/0xac)
    [] (redirected_tty_write+0x0/0xac) from [] (vfs_write+0xbc/0x150)
    [] (vfs_write+0x0/0x150) from [] (sys_write+0x4c/0x78)
    [] (sys_write+0x0/0x78) from [] (ret_fast_syscall+0x0/0x3c)

    This happens because the DMA allocation code is not respecting atomic
    allocations correctly.

    GFP flags should not be tested for GFP_ATOMIC to determine if an
    atomic allocation is being requested. GFP_ATOMIC is not a flag but
    a value. The GFP bitmask flags are all prefixed with __GFP_.

    The rest of the kernel tests for __GFP_WAIT not being set to indicate
    an atomic allocation. We need to do the same.

    Signed-off-by: Russell King

    Russell King
     
  • Realview EB with a rev B MPcore tile results in lots of warnings at
    boot because it can't allocate enough IRQs. Fix this by increasing
    the number of available IRQs.

    WARNING: at /home/rmk/git/linux-rmk/arch/arm/common/gic.c:757 gic_init_bases+0x12c/0x2ec()
    Cannot allocate irq_descs @ IRQ96, assuming pre-allocated
    Modules linked in:
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r6:000002f5 r5:c042c62c r4:c044ff40 r3:c045f240
    [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x54/0x6c)
    [] (warn_slowpath_common+0x0/0x6c) from [] (warn_slowpath_fmt+0x38/0x40)
    [] (warn_slowpath_fmt+0x0/0x40) from [] (gic_init_bases+0x12c/0x2ec)
    [] (gic_init_bases+0x0/0x2ec) from [] (gic_init_irq+0x8c/0xd8)
    [] (gic_init_irq+0x0/0xd8) from [] (init_IRQ+0x1c/0x24)
    [] (init_IRQ+0x0/0x24) from [] (start_kernel+0x1a4/0x300)
    [] (start_kernel+0x0/0x300) from [] (0x70008070)
    ---[ end trace 1b75b31a2719ed1c ]---
    ------------[ cut here ]------------
    WARNING: at /home/rmk/git/linux-rmk/kernel/irq/irqdomain.c:234 irq_domain_add_legacy+0x80/0x140()
    Modules linked in:
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r6:000000ea r5:c0081a38 r4:00000000 r3:c045f240
    [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x54/0x6c)
    [] (warn_slowpath_common+0x0/0x6c) from [] (warn_slowpath_null+0x24/0x2c)
    [] (warn_slowpath_null+0x0/0x2c) from [] (irq_domain_add_legacy+0x80/0x140)
    [] (irq_domain_add_legacy+0x0/0x140) from [] (gic_init_bases+0x14c/0x2ec)
    [] (gic_init_bases+0x0/0x2ec) from [] (gic_init_irq+0x8c/0xd8)
    [] (gic_init_irq+0x0/0xd8) from [] (init_IRQ+0x1c/0x24)
    [] (init_IRQ+0x0/0x24) from [] (start_kernel+0x1a4/0x300)
    [] (start_kernel+0x0/0x300) from [] (0x70008070)
    ---[ end trace 1b75b31a2719ed1d ]---
    ------------[ cut here ]------------
    WARNING: at /home/rmk/git/linux-rmk/arch/arm/common/gic.c:762 gic_init_bases+0x170/0x2ec()
    Modules linked in:
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r6:000002fa r5:c042c670 r4:00000000 r3:c045f240
    [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x54/0x6c)
    [] (warn_slowpath_common+0x0/0x6c) from [] (warn_slowpath_null+0x24/0x2c)
    [] (warn_slowpath_null+0x0/0x2c) from [] (gic_init_bases+0x170/0x2ec)
    [] (gic_init_bases+0x0/0x2ec) from [] (gic_init_irq+0x8c/0xd8)
    [] (gic_init_irq+0x0/0xd8) from [] (init_IRQ+0x1c/0x24)
    [] (init_IRQ+0x0/0x24) from [] (start_kernel+0x1a4/0x300)
    [] (start_kernel+0x0/0x300) from [] (0x70008070)
    ---[ end trace 1b75b31a2719ed1e ]---

    Signed-off-by: Russell King

    Russell King
     
  • Punit Agrawal reports:
    > I was trying to boot 3.8-rc5 on Realview EB 11MPCore using
    > realview-smp_defconfig as a starting point but the kernel failed to
    > progress past the log below (config attached).
    >
    > Pawel suggested I try reverting 384a290283f - "ARM: gic: use a private
    > mapping for CPU target interfaces" that you've authored. With this
    > commit reverted the kernel boots.
    >
    > I am not quite sure why the commit breaks 11MPCore but Pawel (cc'd)
    > might be able to shed light on that.

    Some early GIC implementations return zero for the first distributor
    CPU routing register. This means we can't rely on that telling us
    which CPU interface we're connected to. We know that these platforms
    implement PPIs for IRQs 29-31 - but we shouldn't assume that these
    will always be populated.

    So, instead, scan for a non-zero CPU routing register in the first
    32 IRQs and use that as our CPU mask.

    Reported-by: Punit Agrawal
    Reviewed-by: Nicolas Pitre
    Signed-off-by: Russell King

    Russell King
     
  • Pull drm regression fix from Dave Airlie:
    "This one fixes a sleep while locked regression that was introduced
    earlier in 3.8."

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/ttm: fix fence locking in ttm_buffer_object_transfer, 2nd try

    Linus Torvalds
     
  • In commit 6509141f9c2ba74df6cc72ec35cd1865276ae3a4 ("usbnet: add new
    flag FLAG_NOARP for usb net devices"), the newly added flag NOARP was
    using an already defined value, which broke drivers using flag
    MULTI_PACKET.

    Signed-off-by: Lucas Stach
    Signed-off-by: David S. Miller

    Lucas Stach
     
  • Andrew Savchenko reported a DNS failure and we diagnosed that
    some UDP sockets were unable to send more packets because their
    sk_wmem_alloc was corrupted after a while (tx_queue column in
    following trace)

    $ cat /proc/net/udp
    sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops
    ...
    459: 00000000:0270 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4507 2 ffff88003d612380 0
    466: 00000000:0277 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4802 2 ffff88003d613180 0
    470: 076A070A:007B 00000000:0000 07 FFFF4600:00000000 00:00000000 00000000 123 0 5552 2 ffff880039974380 0
    470: 010213AC:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4986 2 ffff88003dbd3180 0
    470: 010013AC:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4985 2 ffff88003dbd2e00 0
    470: 00FCA8C0:007B 00000000:0000 07 FFFFFB00:00000000 00:00000000 00000000 0 0 4984 2 ffff88003dbd2a80 0
    ...

    Playing with skb->truesize is tricky, especially when
    skb is attached to a socket, as we can fool memory charging.

    Just remove this code, its not worth trying to be ultra
    precise in xmit path.

    Reported-by: Andrew Savchenko
    Tested-by: Andrew Savchenko
    Signed-off-by: Eric Dumazet
    Cc: James Chapman
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • For sensitive data like keying material, it is common practice to zero
    out keys before returning the memory back to the allocator. Thus, use
    kzfree instead of kfree.

    Signed-off-by: Daniel Borkmann
    Acked-by: Neil Horman
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann