1. 04 6月, 2013 1 次提交
  2. 30 5月, 2013 22 次提交
  3. 25 5月, 2013 13 次提交
    • T
      drivers/rtc/rtc-max8998.c: check for pdata presence before dereferencing · 43c523bf
      Tomasz Figa 提交于
      Currently the driver can crash with a NULL pointer dereference if no
      pdata is provided, despite of successful registration of the MFD part.
      This patch fixes the problem by adding a NULL check before dereferencing
      the pdata pointer.
      Signed-off-by: NTomasz Figa <t.figa@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Cc: Sachin Kamat <sachin.kamat@linaro.org>
      Reviewed-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      43c523bf
    • J
      random: fix accounting race condition with lockless irq entropy_count update · 10b3a32d
      Jiri Kosina 提交于
      Commit 902c098a ("random: use lockless techniques in the interrupt
      path") turned IRQ path from being spinlock protected into lockless
      cmpxchg-retry update.
      
      That commit removed r->lock serialization between crediting entropy bits
      from IRQ context and accounting when extracting entropy on userspace
      read path, but didn't turn the r->entropy_count reads/updates in
      account() to use cmpxchg as well.
      
      It has been observed, that under certain circumstances this leads to
      read() on /dev/urandom to return 0 (EOF), as r->entropy_count gets
      corrupted and becomes negative, which in turn results in propagating 0
      all the way from account() to the actual read() call.
      
      Convert the accounting code to be the proper lockless counterpart of
      what has been partially done by 902c098a.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Greg KH <greg@kroah.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      10b3a32d
    • J
      drivers/char/random.c: fix priming of last_data · 1e7e2e05
      Jarod Wilson 提交于
      Commit ec8f02da ("random: prime last_data value per fips
      requirements") added priming of last_data per fips requirements.
      
      Unfortuantely, it did so in a way that can lead to multiple threads all
      incrementing nbytes, but only one actually doing anything with the extra
      data, which leads to some fun random corruption and panics.
      
      The fix is to simply do everything needed to prime last_data in a single
      shot, so there's no window for multiple cpus to increment nbytes -- in
      fact, we won't even increment or decrement nbytes anymore, we'll just
      extract the needed EXTRACT_SIZE one time per pool and then carry on with
      the normal routine.
      
      All these changes have been tested across multiple hosts and
      architectures where panics were previously encoutered.  The code changes
      are are strictly limited to areas only touched when when booted in fips
      mode.
      
      This change should also go into 3.8-stable, to make the myriads of fips
      users on 3.8.x happy.
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Tested-by: NJan Stancek <jstancek@redhat.com>
      Tested-by: NJan Stodola <jstodola@redhat.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1e7e2e05
    • B
      drivers/block/brd.c: fix brd_lookup_page() race · dfd20b2b
      Brian Behlendorf 提交于
      The index on the page must be set before it is inserted in the radix
      tree.  Otherwise there is a small race which can occur during lookup
      where the page can be found with the incorrect index.  This will trigger
      the BUG_ON() in brd_lookup_page().
      Signed-off-by: NBrian Behlendorf <behlendorf1@llnl.gov>
      Reported-by: NChris Wedgwood <cw@f00f.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dfd20b2b
    • G
      fbdev: FB_GOLDFISH should depend on HAS_DMA · e5ee7305
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
        drivers/built-in.o: In function `goldfish_fb_remove':
        drivers/video/goldfishfb.c:301: undefined reference to `dma_free_coherent'
        drivers/built-in.o: In function `goldfish_fb_probe':
        drivers/video/goldfishfb.c:247: undefined reference to `dma_alloc_coherent'
        drivers/video/goldfishfb.c:280: undefined reference to `dma_free_coherent'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e5ee7305
    • L
      drivers/rtc/rtc-pl031.c: pass correct pointer to free_irq() · cac29af6
      Lars-Peter Clausen 提交于
      free_irq() expects the same pointer that was passed to request_irq(),
      otherwise the IRQ is not freed.
      
      The issue was found using the following coccinelle script:
      
        <smpl>
        @r1@
        type T;
        T devid;
        @@
        request_irq(..., devid)
      
        @r2@
        type r1.T;
        T devid;
        position p;
        @@
        free_irq@p(..., devid)
      
        @@
        position p != r2.p;
        @@
        *free_irq@p(...)
        </smpl>
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cac29af6
    • C
      drivers/leds/leds-ot200.c: fix error caused by shifted mask · 4b949b8a
      Christian Gmeiner 提交于
      During the development of this driver an in-house register documentation
      was used.  The last week some integration tests were done and this
      problem was found.  It turned out that the released register
      documentation is wrong.
      
      The fix is very simple: shift all masks by one.
      Signed-off-by: NChristian Gmeiner <christian.gmeiner@gmail.com>
      Cc: Bryan Wu <cooloney@gmail.com>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4b949b8a
    • A
      rapidio/tsi721: fix bug in MSI interrupt handling · 1ccc819d
      Alexandre Bounine 提交于
      Fix bug in MSI interrupt handling which causes loss of event
      notifications.
      
      Typical indication of lost MSI interrupts are stalled message and
      doorbell transfers between RapidIO endpoints.  To avoid loss of MSI
      interrupts all interrupts from the device must be disabled on entering
      the interrupt handler routine and re-enabled when exiting it.
      Re-enabling device interrupts will trigger new MSI message(s) if Tsi721
      registered new events since entering interrupt handler routine.
      
      This patch is applicable to kernel versions starting from v3.2.
      Signed-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1ccc819d
    • S
      drivers/video: implement a simple framebuffer driver · 26549c8d
      Stephen Warren 提交于
      A simple frame-buffer describes a raw memory region that may be rendered
      to, with the assumption that the display hardware has already been set
      up to scan out from that buffer.
      
      This is useful in cases where a bootloader exists and has set up the
      display hardware, but a Linux driver doesn't yet exist for the display
      hardware.
      
      Examples use-cases include:
      
      * The built-in LCD panels on the Samsung ARM chromebook, and Tegra
        devices, and likely many other ARM or embedded systems.  These cannot
        yet be supported using a full graphics driver, since the panel control
        should be provided by the CDF (Common Display Framework), which has been
        stuck in design/review for quite some time.  One could support these
        panels using custom SoC-specific code, but there is a desire to use
        common infra-structure rather than having each SoC vendor invent their
        own code, hence the desire to wait for CDF.
      
      * Hardware for which a full graphics driver is not yet available, and
        the path to obtain one upstream isn't yet clear.  For example, the
        Raspberry Pi.
      
      * Any hardware in early stages of upstreaming, before a full graphics
        driver has been tackled.  This driver can provide a graphical boot
        console (even full X support) much earlier in the upstreaming process,
        thus making new SoC or board support more generally useful earlier.
      
      [akpm@linux-foundation.org: make simplefb_formats[] static]
      Signed-off-by: NStephen Warren <swarren@wwwdotorg.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Cc: Rob Clark <robclark@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Tomasz Figa <tomasz.figa@gmail.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      26549c8d
    • A
      rapidio: add enumeration/discovery start from user space · bc8fcfea
      Alexandre Bounine 提交于
      Add RapidIO enumeration/discovery start from user space.  User space
      start allows to defer RapidIO fabric scan until the moment when all
      participating endpoints are initialized avoiding mandatory synchronized
      start of all endpoints (which may be challenging in systems with large
      number of RapidIO endpoints).
      Signed-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bc8fcfea
    • A
      rapidio: make enumeration/discovery configurable · a11650e1
      Alexandre Bounine 提交于
      Systems that use RapidIO fabric may need to implement their own
      enumeration and discovery methods which are better suitable for needs of
      a target application.
      
      The following set of patches is intended to simplify process of
      introduction of new RapidIO fabric enumeration/discovery methods.
      
      The first patch offers ability to add new RapidIO enumeration/discovery
      methods using kernel configuration options.  This new configuration
      option mechanism allows to select statically linked or modular
      enumeration/discovery method(s) from the list of existing methods or use
      external module(s).
      
      This patch also updates the currently existing enumeration/discovery
      code to be used as a statically linked or modular method.
      
      The corresponding configuration option is named "Basic
      enumeration/discovery" method.  This is the only one configuration
      option available today but new methods are expected to be introduced
      after adoption of provided patches.
      
      The second patch address a long time complaint of RapidIO subsystem
      users regarding fabric enumeration/discovery start sequence.  Existing
      implementation offers only a boot-time enumeration/discovery start which
      requires synchronized boot of all endpoints in RapidIO network.  While
      it works for small closed configurations with limited number of
      endpoints, using this approach in systems with large number of endpoints
      is quite challenging.
      
      To eliminate requirement for synchronized start the second patch
      introduces RapidIO enumeration/discovery start from user space.
      
      For compatibility with the existing RapidIO subsystem implementation,
      automatic boot time enumeration/discovery start can be configured in by
      specifying "rio-scan.scan=1" command line parameter if statically linked
      basic enumeration method is selected.
      
      This patch:
      
      Rework to implement RapidIO enumeration/discovery method selection
      combined with ability to use enumeration/discovery as a kernel module.
      
      This patch adds ability to introduce new RapidIO enumeration/discovery
      methods using kernel configuration options.  Configuration option
      mechanism allows to select statically linked or modular
      enumeration/discovery method from the list of existing methods or use
      external modules.  If a modular enumeration/discovery is selected each
      RapidIO mport device can have its own method attached to it.
      
      The existing enumeration/discovery code was updated to be used as
      statically linked or modular method.  This configuration option is named
      "Basic enumeration/discovery" method.
      
      Several common routines have been moved from rio-scan.c to make them
      available to other enumeration methods and reduce number of exported
      symbols.
      Signed-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a11650e1
    • G
      drivers/block/xsysace.c: fix id with missing port-number · 585dc0c2
      Gernot Vormayr 提交于
      If the port number is missing from the device-tree the device gets named
      xs` instead of xsa.  This fixes the check for missing ids.
      
      Tested on ml507 board.
      Signed-off-by: NGernot Vormayr <gvormayr@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      585dc0c2
    • P
      parisc/superio: Use module_pci_driver to register driver · 2c2d32be
      Peter Huewe 提交于
      Removing some boilerplate by using module_pci_driver instead of calling
      register and unregister in the otherwise empty init/exit functions.
      Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      2c2d32be
  4. 24 5月, 2013 4 次提交