29 May, 2012

4 commits

  • The number of pages is a dimm property. Move it to the dimm struct.

    After this change, it is possible to add sysfs nodes for the DIMM's that
    will properly represent the DIMM stick properties, including its size.

    A TODO fix here is to properly represent dual-rank/quad-rank DIMMs when
    the memory controller represents the memory via chip select rows.

    Reviewed-by: Aristeu Rozanski
    Acked-by: Borislav Petkov
    Acked-by: Chris Metcalf
    Cc: Doug Thompson
    Cc: Mark Gross
    Cc: Jason Uhlenkott
    Cc: Tim Small
    Cc: Ranganathan Desikan
    Cc: "Arvind R."
    Cc: Olof Johansson
    Cc: Egor Martovetsky
    Cc: Michal Marek
    Cc: Jiri Kosina
    Cc: Joe Perches
    Cc: Dmitry Eremin-Solenikov
    Cc: Benjamin Herrenschmidt
    Cc: Hitoshi Mitake
    Cc: Andrew Morton
    Cc: "Niklas Söderlund"
    Cc: Shaohui Xie
    Cc: Josh Boyer
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Almost all edac drivers initialize csrow_info->first_page,
    csrow_info->last_page and csrow_info->page_mask. Those vars are
    used inside the EDAC core, in order to calculate the csrow affected
    by an error, by using the routine edac_mc_find_csrow_by_page().

    However, very few drivers actually use it:
    e752x_edac.c
    e7xxx_edac.c
    i3000_edac.c
    i82443bxgx_edac.c
    i82860_edac.c
    i82875p_edac.c
    i82975x_edac.c
    r82600_edac.c

    There also a few other drivers that have their own calculus
    formula internally using those vars.

    All the others are just wasting time by initializing those
    data.

    While initializing data without using them won't cause any troubles, as
    those information is stored at the wrong place (at csrows structure), it
    is better to remove what is unused, in order to simplify the next patch.

    Reviewed-by: Aristeu Rozanski
    Acked-by: Borislav Petkov
    Acked-by: Chris Metcalf
    Cc: Doug Thompson
    Cc: Hitoshi Mitake
    Cc: Andrew Morton
    Cc: "Niklas Söderlund"
    Cc: Josh Boyer
    Cc: Jiri Kosina
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • On systems based on chip select rows, all channels need to use memories
    with the same properties, otherwise the memories on channels A and B
    won't be recognized.

    However, such assumption is not true for all types of memory
    controllers.

    Controllers for FB-DIMM's don't have such requirements.

    Also, modern Intel controllers seem to be capable of handling such
    differences.

    So, we need to get rid of storing the DIMM information into a per-csrow
    data, storing it, instead at the right place.

    The first step is to move grain, mtype, dtype and edac_mode to the
    per-dimm struct.

    Reviewed-by: Aristeu Rozanski
    Reviewed-by: Borislav Petkov
    Acked-by: Chris Metcalf
    Cc: Doug Thompson
    Cc: Borislav Petkov
    Cc: Mark Gross
    Cc: Jason Uhlenkott
    Cc: Tim Small
    Cc: Ranganathan Desikan
    Cc: "Arvind R."
    Cc: Olof Johansson
    Cc: Egor Martovetsky
    Cc: Michal Marek
    Cc: Jiri Kosina
    Cc: Joe Perches
    Cc: Dmitry Eremin-Solenikov
    Cc: Benjamin Herrenschmidt
    Cc: Hitoshi Mitake
    Cc: Andrew Morton
    Cc: James Bottomley
    Cc: "Niklas Söderlund"
    Cc: Shaohui Xie
    Cc: Josh Boyer
    Cc: Mike Williams
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The way a DIMM is currently represented implies that they're
    linked into a per-csrow struct. However, some drivers don't see
    csrows, as they're ridden behind some chip like the AMB's
    on FBDIMM's, for example.

    This forced drivers to fake^Wvirtualize a csrow struct, and to create
    a mess under csrow/channel original's concept.

    Move the DIMM labels into a per-DIMM struct, and add there
    the real location of the socket, in terms of csrow/channel.
    Latter patches will modify the location to properly represent the
    memory architecture.

    All other drivers will use a per-csrow type of location.
    Some of those drivers will require a latter conversion, as
    they also fake the csrows internally.

    TODO: While this patch doesn't change the existing behavior, on
    csrows-based memory controllers, a csrow/channel pair points to a memory
    rank. There's a known bug at the EDAC core that allows having different
    labels for the same DIMM, if it has more than one rank. A latter patch
    is need to merge the several ranks for a DIMM into the same dimm_info
    struct, in order to avoid having different labels for the same DIMM.

    The edac_mc_alloc() will now contain a per-dimm initialization loop that
    will be changed by latter patches in order to match other types of
    memory architectures.

    Reviewed-by: Aristeu Rozanski
    Reviewed-by: Borislav Petkov
    Cc: Doug Thompson
    Cc: Ranganathan Desikan
    Cc: "Arvind R."
    Cc: "Niklas Söderlund"
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

20 May, 2012

1 commit

  • Pull block layer fixes from Jens Axboe:
    "A few small, but important fixes. Most of them are marked for stable
    as well

    - Fix failure to release a semaphore on error path in mtip32xx.
    - Fix crashable condition in bio_get_nr_vecs().
    - Don't mark end-of-disk buffers as mapped, limit it to i_size.
    - Fix for build problem with CONFIG_BLOCK=n on arm at least.
    - Fix for a buffer overlow on UUID partition printing.
    - Trivial removal of unused variables in dac960."

    * 'for-linus' of git://git.kernel.dk/linux-block:
    block: fix buffer overflow when printing partition UUIDs
    Fix blkdev.h build errors when BLOCK=n
    bio allocation failure due to bio_get_nr_vecs()
    block: don't mark buffers beyond end of disk as mapped
    mtip32xx: release the semaphore on an error path
    dac960: Remove unused variables from DAC960_CreateProcEntries()

    Linus Torvalds
     

19 May, 2012

5 commits

  • Pull a dm fix from Alasdair G Kergon:
    "A fix to the thin provisioning userspace interface."

    * tag 'dm-3.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
    dm thin: fix table output when pool target disables discard passdown internally

    Linus Torvalds
     
  • When the thin pool target clears the discard_passdown parameter
    internally, it incorrectly changes the table line reported to userspace.
    This breaks dumb string comparisons on these table lines in generic
    userspace device-mapper library code and leads to tables being reloaded
    repeatedly when nothing is actually meant to be changing.

    This patch corrects this by no longer changing the table line when
    discard passdown was disabled.

    We can still tell when discard passdown is overridden by looking for the
    message "Discard unsupported by data device (sdX): Disabling discard passdown."

    This automatic detection is also moved from the 'load' to the 'resume'
    so that it is re-evaluated should the properties of underlying devices
    change.

    Signed-off-by: Mike Snitzer
    Acked-by: Joe Thornber
    Signed-off-by: Alasdair G Kergon

    Mike Snitzer
     
  • Pull one more md bugfix from NeilBrown:
    "Fix bug in recent fix to RAID10.

    Without this patch, recovery will crash"

    * tag 'md-3.4-fixes' of git://neil.brown.name/md:
    md/raid10: fix transcription error in calc_sectors conversion.

    Linus Torvalds
     
  • The old code was
    sector_div(stride, fc);
    the new code was
    sector_dir(size, conf->near_copies);

    'size' is right (the stride various wasn't really needed), but
    'fc' means 'far_copies', and that is an important difference.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • Merge misc fixes from Andrew Morton.

    * emailed from Andrew Morton : (4 patches)
    frv: delete incorrect task prototypes causing compile fail
    slub: missing test for partial pages flush work in flush_all()
    fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entries
    drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01

    Linus Torvalds
     

18 May, 2012

10 commits

  • The reset date of the ST Micro version of PL031 is 2000-01-01. The
    correct weekday for 2000-01-01 is saturday, but pl031 is initialized to
    sunday. This may lead to alarm malfunction, so configure the correct
    wday if RTC_DR indicates reset.

    Signed-off-by: Rajkumar Kasirajan
    Signed-off-by: Linus Walleij
    Cc: Mattias Wallin
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rajkumar Kasirajan
     
  • Pull two networking fixes from David S. Miller:

    1) Thanks to Willy Tarreau and Eric Dumazet, we've unlocked a bug that's
    been present in do_tcp_sendpages() since that function was written in
    2002.

    When we block to wait for memory we have to unconditionally try and
    push out pending TCP data, otherwise we can block for an unreasonably
    long amount of time.

    2) Fix deadlock in e1000, fixes kernel bugzilla 43132

    From Tushar Dave.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    e1000: Prevent reset task killing itself.
    tcp: do_tcp_sendpages() must try to push data out on oom conditions

    Linus Torvalds
     
  • Commit 1cc0c998fdf2 ("ACPI: Fix D3hot v D3cold confusion") introduced a
    bug in __acpi_bus_set_power() and changed the behavior of
    acpi_pci_set_power_state() in such a way that it generally doesn't work
    as expected if PCI_D3hot is passed to it as the second argument.

    First off, if ACPI_STATE_D3 (equal to ACPI_STATE_D3_COLD) is passed to
    __acpi_bus_set_power() and the explicit_set flag is set for the D3cold
    state, the function will try to execute AML method called "_PS4", which
    doesn't exist.

    Fix this by adding a check to ensure that the name of the AML method
    to execute for transitions to ACPI_STATE_D3_COLD is correct in
    __acpi_bus_set_power(). Also make sure that the explicit_set flag
    for ACPI_STATE_D3_COLD will be set if _PS3 is present and modify
    acpi_power_transition() to avoid accessing power resources for
    ACPI_STATE_D3_COLD, because they don't exist.

    Second, if PCI_D3hot is passed to acpi_pci_set_power_state() as the
    target state, the function will request a transition to
    ACPI_STATE_D3_HOT instead of ACPI_STATE_D3. However,
    ACPI_STATE_D3_HOT is now only marked as supported if the _PR3 AML
    method is defined for the given device, which is rare. This causes
    problems to happen on systems where devices were successfully put
    into ACPI D3 by pci_set_power_state(PCI_D3hot) which doesn't work
    now. In particular, some unused graphics adapters are not turned
    off as a result.

    To fix this issue restore the old behavior of
    acpi_pci_set_power_state(), which is to request a transition to
    ACPI_STATE_D3 (equal to ACPI_STATE_D3_COLD) if either PCI_D3hot or
    PCI_D3cold is passed to it as the argument.

    This approach is not ideal, because generally power should not
    be removed from devices if PCI_D3hot is the target power state,
    but since this behavior is relied on, we have no choice but to
    restore it at the moment and spend more time on designing a
    better solution in the future.

    References: https://bugzilla.kernel.org/show_bug.cgi?id=43228
    Reported-by: rocko
    Reported-by: Cristian Rodríguez
    Reported-and-tested-by: Peter
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Killing reset task while adapter is resetting causes deadlock.
    Only kill reset task if adapter is not resetting.
    Ref bug #43132 on bugzilla.kernel.org

    CC: stable@vger.kernel.org
    Signed-off-by: Tushar Dave
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Tushar Dave
     
  • Pull two more target-core updates from Nicholas Bellinger:
    "The first patch addresses a SPC-2 reservations RELEASE bug in a
    special (iscsi specific) multi-ISID setup case that was allowing the
    same initiator to be able to incorrect release it's own reservation on
    a different SCSI path with enforce_pr_isid=1 operation. This bug was
    caught by Bernhard Kohl.

    The second patch is to address a bug with FILEIO backends where the
    incorrect number of blocks for READ_CAPACITY was being reported after
    an underlying device-mapper block_device size change. This patch uses
    now i_size_read() in fd_get_blocks() for FILEIO backends with an
    underlying block_device, instead of trying to determine this value at
    setup time during fd_create_virtdevice(). (hch CC'ed)

    Both are CC'ed to stable."

    * '3.4-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    target: Fix bug in handling of FILEIO + block_device resize ops
    target: Fix SPC-2 RELEASE bug for multi-session iSCSI client setups

    Linus Torvalds
     
  • This patch fixes a bug in the handling of FILEIO w/ underlying block_device
    resize operations where the original fd_dev->fd_dev_size was incorrectly being
    used in fd_get_blocks() for READ_CAPACITY response payloads.

    This patch avoids using fd_dev->fd_dev_size for FILEIO devices with
    an underlying block_device, and instead changes fd_get_blocks() to
    get the sector count directly from i_size_read() as recommended by hch.

    Reported-by: Christoph Hellwig
    Cc:
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • Pull slave-dmaengine fixes fromVinod Koul:
    "fixes of cylic dma usages in slave dma drivers"

    * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
    dmaengine: fix cyclic dma usage
    dmaengine: pl330: dont complete descriptor for cyclic dma

    Linus Torvalds
     
  • Pull last minute virtio fixes from Michael S. Tsirkin:
    "Here are a couple of last minute virtio fixes for 3.4. Hope it's not
    too late yes - I might have tried too hard to make sure the fix is
    well tested.

    Fixes are by Amit and myself. One fixes module removal and one
    suspend of a VM, the last one the handling of out of memory condition.

    They are thus very low risk as most people never hit these paths, but
    do fix very annoying problems for people that do use the feature.

    Signed-off-by: Michael S. Tsirkin "

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    virtio_net: invoke softirqs after __napi_schedule
    virtio: balloon: let host know of updated balloon size before module removal
    virtio: console: tell host of open ports after resume from s3/s4

    Linus Torvalds
     
  • Pull ARM: SoC fixes from Olof Johansson:
    "I will stop trying to predict when we're done with fixes for a
    release.

    Here's another small batch of three patches for arm-soc:

    - A fix for a boot time WARN_ON() due to irq domain conversion on
    PRIMA2
    - Fix for a regression in Tegra SMP spinup code due to swapped
    register offsets
    - Fixed config dependency for mv_cesa crypto driver to avoid build
    breakage"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: PRIMA2: fix irq domain size and IRQ mask of internal interrupt controller
    crypto: mv_cesa requires on CRYPTO_HASH to build
    ARM: tegra: Fix flow controller accesses

    Linus Torvalds
     
  • Pull two md fixes from NeilBrown:
    "One fixes a bug in the new raid10 resize code so is relevant to 3.4
    only.

    The other fixes a bug in the use of md by dm-raid, so is relevant to
    any kernel with dm-raid support"

    * tag 'md-3.4-fixes' of git://neil.brown.name/md:
    MD: Add del_timer_sync to mddev_suspend (fix nasty panic)
    md/raid10: set dev_sectors properly when resizing devices in array.

    Linus Torvalds
     

17 May, 2012

8 commits

  • __napi_schedule might raise softirq but nothing
    causes do_softirq to trigger, so it does not in fact
    run. As a result,
    the error message "NOHZ: local_softirq_pending 08"
    sometimes occurs during boot of a KVM guest when the network service is
    started and we are oom:

    ...
    Bringing up loopback interface: [ OK ]
    Bringing up interface eth0:
    Determining IP information for eth0...NOHZ: local_softirq_pending 08
    done.
    [ OK ]
    ...

    Further, receive queue processing might get delayed
    indefinitely until some interrupt triggers:
    virtio_net expected napi to be run immediately.

    One way to cause do_softirq to be executed is by
    invoking local_bh_enable(). As __napi_schedule is
    normally called from bh or irq context, this
    seems to make sense: disable bh before __napi_schedule
    and enable afterwards.

    In fact it's a very complicated way of calling do_softirq(),
    and works since this function is only used when we are not
    in interrupt context. It's not hot at all, in any ideal scenario.

    Reported-by: Ulrich Obergfell
    Tested-by: Ulrich Obergfell
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Rusty Russell

    Michael S. Tsirkin
     
  • When the balloon module is removed, we deflate the balloon, reclaiming
    all the pages that were given to the host. However, we don't update the
    config values for the new balloon size, resulting in the host showing
    outdated balloon values.

    The size update is done after each leak and fill operation, only the
    module removal case was left out.

    Signed-off-by: Amit Shah
    Signed-off-by: Michael S. Tsirkin

    Amit Shah
     
  • If a port was open before going into one of the sleep states, the port
    can continue normal operation after restore. However, the host has to
    be told that the guest side of the connection is open to restore
    pre-suspend state.

    This wasn't noticed so far due to a bug in qemu that was fixed recently
    (which marked the guest-side connection as always open).

    CC: stable@vger.kernel.org # Only for 3.3

    Signed-off-by: Amit Shah
    Signed-off-by: Michael S. Tsirkin

    Amit Shah
     
  • Use del_timer_sync to remove timer before mddev_suspend finishes.

    We don't want a timer going off after an mddev_suspend is called. This is
    especially true with device-mapper, since it can call the destructor function
    immediately following a suspend. This results in the removal (kfree) of the
    structures upon which the timer depends - resulting in a very ugly panic.
    Therefore, we add a del_timer_sync to mddev_suspend to prevent this.

    Cc: stable@vger.kernel.org
    Signed-off-by: NeilBrown

    Jonathan Brassow
     
  • raid10 stores dev_sectors in 'conf' separately from the one in
    'mddev' because it can have a very significant effect on block
    addressing and so need to be updated carefully.

    However raid10_resize isn't updating it at all!

    To update it correctly, we need to make sure it is a proper
    multiple of the chunksize taking various details of the layout
    in to account.
    This calculation is currently done in setup_conf. So split it
    out from there and call it from raid10_resize as well.
    Then set conf->dev_sectors properly.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • Pull remoteproc fix from Ohad Ben-Cohen:
    "Fix a nasty off-by-one remoteproc bug which leaks memory when a remote
    processor is shut down and, on certain circumstances, can indirectly
    prevent it from being reloaded."

    * tag 'rproc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
    remoteproc: fix off-by-one bug in __rproc_free_vrings

    Linus Torvalds
     
  • Pull networking tree from David Miller:

    1) ptp_pch driver build broke during this merge window due to missing
    slab.h header, fix from Geery Uytterhoeven.

    2) If ipset passes in a bogus hash table size we crash because the size
    is not validated properly. Compounding this, gcc-4.7 can miscompile
    ipset such that even when the user specifies legitimate parameters
    the tool passes in an out-of-range size to the kernel.

    Fix from Jozsef Kadlecsik.

    3) Users have reported that the netdev watchdog can trigger with pch_gbe
    devices, and it turns out this is happening because of races in the
    TX path of the driver leading to the transmitter hanging. Fix from
    Eric Dumazet, reported and tested by Andy Cress.

    4) Novatel USB551L devices match the generic class entries for the cdc
    ethernet USB driver, but they don't work because they have generic
    descriptors and thus need FLAG_WWAN to function properly.

    Add the necessary ID table entry to fix this, from Dan Williams.

    5) A recursive locking fix in the USBNET driver added a new problem, in
    that packet list traversal is now racy and we can thus access
    unlinked SKBs and crash.

    Avoid this situation by adding some extra state tracking, from Ming
    Lei.

    6) The rtlwifi conversion to asynchronous firmware loading is racy, fix
    by reordering the probe procedure. From Larry Finger.

    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=43187

    7) Fix regressions with bluetooth keyboards by notifying userland
    properly when the security level changes, from Gustavo Padovan.

    8) Bluetooth needs to make sure device connected events are emitted
    before other kinds of events, otherwise userspace will think there is
    no baseband link yet and therefore abort the sockets associated with
    that connection.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    netfilter: ipset: fix hash size checking in kernel
    ptp_pch: Add missing #include
    pch_gbe: fix transmit races
    cdc_ether: add Novatel USB551L device IDs for FLAG_WWAN
    usbnet: fix skb traversing races during unlink(v2)
    Bluetooth: mgmt: Fix device_connected sending order
    Bluetooth: notify userspace of security level change
    rtlwifi: fix for race condition when firmware is cached

    Linus Torvalds
     
  • drivers/ptp/ptp_pch.c: In function 'pch_remove':
    drivers/ptp/ptp_pch.c:576:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
    drivers/ptp/ptp_pch.c: In function 'pch_probe':
    drivers/ptp/ptp_pch.c:587:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Richard Cochran
    Signed-off-by: David S. Miller

    Geert Uytterhoeven
     

16 May, 2012

5 commits

  • John Linville says:

    Here are three more fixes that some of my developers are desperate to
    see included in 3.4...

    Johan Hedberg went to some length justifyng the inclusion of these two
    Bluetooth fixes:

    "The device_connected fix should be quite self-explanatory, but it's
    actually a wider issue than just for keyboards. All profiles that do
    incoming connection authorization (e.g. headsets) will break without it
    with specific hardware. The reason it wasn't caught earlier is that it
    only occurs with specific Bluetooth adapters.

    As for the security level patch, this fixes L2CAP socket based security
    level elevation during a connection. The HID profile needs this (for
    keyboards) and it is the only way to achieve the security level
    elevation when using the management interface to talk to the kernel
    (hence the management enabling patch being the one that exposes this"

    The rtlwifi fix addresses a regression related to firmware loading,
    as described in kernel.org bug 43187. It basically just moves a hunk
    of code to a more appropriate place.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • …wireless into for-davem

    John W. Linville
     
  • Andy reported pch_gbe triggered "NETDEV WATCHDOG" errors.

    May 11 11:06:09 kontron kernel: WARNING: at net/sched/sch_generic.c:261
    dev_watchdog+0x1ec/0x200() (Not tainted)
    May 11 11:06:09 kontron kernel: Hardware name: N/A
    May 11 11:06:09 kontron kernel: NETDEV WATCHDOG: eth0 (pch_gbe):
    transmit queue 0 timed out

    It seems pch_gbe has a racy tx path (races with TX completion path)

    Remove tx_queue_lock lock since it has no purpose, we must use tx_lock
    instead.

    Signed-off-by: Eric Dumazet
    Reported-by: Andy Cress
    Tested-by: Andy Cress
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Needs to be tagged with FLAG_WWAN, which since it has generic
    descriptors, won't happen if we don't override the generic
    driver info.

    Cc: Oliver Neukum
    Cc: stable@vger.kernel.org
    Signed-off-by: Dan Williams
    Acked-by: Oliver Neukum
    Signed-off-by: David S. Miller

    Dan Williams
     
  • Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid
    recursive locking in usbnet_stop()) fixes the recursive locking
    problem by releasing the skb queue lock before unlink, but may
    cause skb traversing races:
    - after URB is unlinked and the queue lock is released,
    the refered skb and skb->next may be moved to done queue,
    even be released
    - in skb_queue_walk_safe, the next skb is still obtained
    by next pointer of the last skb
    - so maybe trigger oops or other problems

    This patch extends the usage of entry->state to describe 'start_unlink'
    state, so always holding the queue(rx/tx) lock to change the state if
    the referd skb is in rx or tx queue because we need to know if the
    refered urb has been started unlinking in unlink_urbs.

    The other part of this patch is based on Huajun's patch:
    always traverse from head of the tx/rx queue to get skb which is
    to be unlinked but not been started unlinking.

    Signed-off-by: Huajun Li
    Signed-off-by: Ming Lei
    Cc: Oliver Neukum
    Cc: stable@kernel.org
    Signed-off-by: David S. Miller

    Ming Lei
     

15 May, 2012

7 commits

  • for cyclic dma, dont makr the descriptor as complte. Fix the remaining users of
    cyclic dma which do so

    Signed-off-by: Vinod Koul
    Tested-by: Nicolas Ferre
    Acked-by: Nicolas Ferre
    Tested-by: Mika Westerberg

    Vinod Koul
     
  • Without CRYPTO_HASH being selected, mv_cesa has a lot of hooks
    into undefined exports.
    ----
    MODPOST 81 modules
    Kernel: arch/arm/boot/Image is ready
    AS arch/arm/boot/compressed/head.o
    GZIP arch/arm/boot/compressed/piggy.gzip
    CC arch/arm/boot/compressed/misc.o
    CC arch/arm/boot/compressed/decompress.o
    ERROR: "crypto_ahash_type" [drivers/crypto/mv_cesa.ko] undefined!
    ERROR: "crypto_shash_final" [drivers/crypto/mv_cesa.ko] undefined!
    ERROR: "crypto_register_ahash" [drivers/crypto/mv_cesa.ko] undefined!
    ERROR: "crypto_unregister_ahash" [drivers/crypto/mv_cesa.ko] undefined!
    ERROR: "crypto_shash_update" [drivers/crypto/mv_cesa.ko] undefined!
    ERROR: "crypto_shash_digest" [drivers/crypto/mv_cesa.ko] undefined!
    ERROR: "crypto_shash_setkey" [drivers/crypto/mv_cesa.ko] undefined!
    ERROR: "crypto_alloc_shash" [drivers/crypto/mv_cesa.ko] undefined!
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2
    make: *** Waiting for unfinished jobs....
    ----

    Signed-off-by: Alexander Clouter
    Signed-off-by: Jason Cooper
    Cc: stable@vger.kernel.org

    Alexander Clouter
     
  • This patch addresses a bug in a special case for target core SPC-2 RELEASE
    logic where the same physical client (eg: iSCSI InitiatorName) with
    differing iSCSI session identifiers (ISID) is allowed to incorrectly release
    the same client's SPC-2 reservation from the non reservation holding path.

    Note this bug is specific to iscsi-target w/ SPC-2 reservations, and
    with the default enforce_pr_isids=1 device attr setting in target-core
    controls if a InitiatorName + different ISID reservations are handled
    the same as a single iSCSI client entity.

    Signed-off-by: Bernhard Kohl
    Cc:
    Signed-off-by: Nicholas Bellinger

    Bernhard Kohl
     
  • Pull media fixes from Mauro Carvalho Chehab:
    "For a some fix patches for v3.4, including a regression fix at DVB core"

    Fix up trivial conflicts in Documentation/feature-removal-schedule.txt

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] gspca - sonixj: Fix a zero divide in isoc interrupt
    [media] media: videobuf2-dma-contig: include header for exported symbols
    [media] media: videobuf2-dma-contig: quiet sparse noise about plain integer as NULL pointer
    [media] media: vb2-memops: Export vb2_get_vma symbol
    [media] s5p-fimc: Correct memory allocation for VIDIOC_CREATE_BUFS
    [media] s5p-fimc: Fix locking in subdev set_crop op
    [media] dvb_frontend: fix a regression with DVB-S zig-zag
    [media] fintek-cir: change || to &&
    [media] V4L: Schedule V4L2_CID_HCENTER, V4L2_CID_VCENTER controls for removal
    [media] rc: Postpone ISR registration
    [media] marvell-cam: fix an ARM build error
    [media] V4L: soc-camera: protect hosts during probing from overzealous user-space

    Linus Torvalds
     
  • Pull networking fixes from David Miller:
    "The main purpose of this pull request is to fix up the erroneous
    bonding patch I applied last round. I meant to apply v4 of the patch
    from Jiri but I applied v3 by accident. Mea culpa.

    Also, eagle eyed Dan Carpenter noticed that openvswitch has one of
    those "X = alloc(); if (!Y)" mistakes, test the proper pointer
    instead."

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    openvswitch: checking wrong variable in queue_userspace_packet()
    bonding: Fix LACPDU rx_dropped commit.

    Linus Torvalds
     
  • In commit b0302ab, the rtlwifi family of drivers was converted to use
    asynchronous firmware loading. Unfortumately, the implementation was
    racy, and the ieee80211 routines could be started before rtl_init_core()
    was called to setup the data.

    This patch fixes the bug noted in https://bugzilla.kernel.org/show_bug.cgi?id=43187.

    Reported-by: Joshua Roys
    Tested-by: Neptune Ning
    Signed-off-by: Larry Finger
    Cc: Stable [3.3]
    Signed-off-by: John W. Linville

    Larry Finger
     
  • 3.4-rc introduced a regression when setting the LEDS. We do the right thing
    but then return an error code.

    Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43144
    Reported-by: Christian Casteyde
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox