1. 13 Mar, 2013 11 commits
    • Linus Torvalds's avatar
      Merge tag 'usb-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · ad8395e1
      Linus Torvalds authored
      Pull USB fixes from Greg Kroah-Hartman:
       "Here are a number of tiny USB fixes and new USB device ids for your
        3.9 tree.
      
        The "largest" one here is a revert of a usb-storage patch that turned
        out to be incorrect, breaking existing users, which is never a good
        thing.  Everything else is pretty simple and small"
      
      * tag 'usb-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (43 commits)
        USB: quatech2: only write to the tty if the port is open.
        qcserial: bind to DM/DIAG port on Gobi 1K devices
        USB: cdc-wdm: fix buffer overflow
        usb: serial: Add Rigblaster Advantage to device table
        qcaux: add Franklin U600
        usb: musb: core: fix possible build error with randconfig
        usb: cp210x new Vendor/Device IDs
        usb: gadget: pxa25x: fix disconnect reporting
        usb: dwc3: ep0: fix sparc64 build
        usb: c67x00 RetryCnt value in c67x00 TD should be 3
        usb: Correction to c67x00 TD data length mask
        usb: Makefile: fix drivers/usb/phy/ Makefile entry
        USB: added support for Cinterion's products AH6 and PLS8
        usb: gadget: fix omap_udc build errors
        USB: storage: fix Huawei mode switching regression
        USB: storage: in-kernel modeswitching is deprecated
        tools: usb: ffs-test: Fix build failure
        USB: option: add Huawei E5331
        usb: musb: omap2430: fix sparse warning
        usb: musb: omap2430: fix omap_musb_mailbox glue check again
        ...
      ad8395e1
    • Linus Torvalds's avatar
      Merge tag 'tty-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · cad9d566
      Linus Torvalds authored
      Pull tty/serial fixes from Greg Kroah-Hartman:
       "Here are some tty/serial driver fixes for 3.9
      
        We finally mute the annoying WARN_ON that lots of people are hitting
        and it turns out isn't needed anymore.  Also add a few new device ids
        and a some other minor fixes."
      
      * tag 'tty-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: serial: fix typo "SERIAL_S3C2412"
        serial: 8250: Keep 8250.<xxxx> module options functional after driver rename
        tty: serial: fix typo "ARCH_S5P6450"
        tty/8250_pnp: serial port detection regression since v3.7
        serial: bcm63xx_uart: fix compilation after "TTY: switch tty_insert_flip_char"
        serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller
        Fix 4 port and add support for 8 port 'Unknown' PCI serial port cards
        tty/serial: Add support for Altera serial port
        tty: serial: vt8500: Unneccessary duplicated clock code removed
        tty: serial: mpc5xxx: fix PSC clock name bug
        TTY: disable debugging warning
      cad9d566
    • Linus Torvalds's avatar
      Merge tag 'staging-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 886e03be
      Linus Torvalds authored
      Pull staging tree fixes from Greg Kroah-Hartman:
       "Here are some drivers/staging and drivers/iio fixes for 3.9 (the two
        are still pretty intertwined, hence them coming both from my tree
        still.) Nothing major, just a few things that have been reported by
        users, all of these have been in linux-next for a while."
      
      * tag 'staging-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: dt9812: use CR_CHAN() for channel number
        staging/vt6656: Fix too large integer constant warning on 32-bit
        staging: comedi: drivers: usbduxsigma.c: fix DMA buffers on stack
        staging: imx/drm: request irq only after adding the crtc
        staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack
        staging: comedi: drivers: usbdux.c: fix DMA buffers on stack
        staging: vt6656: Fix oops on resume from suspend.
        iio:common:st_sensors fixed all warning messages about uninitialized variables
        iio: Fix build error seen if IIO_TRIGGER is defined but IIO_BUFFER is not
        iio/imu: inv_mpu6050 depends on IIO_BUFFER
        iio:ad5064: Initialize register cache correctly
        iio:ad5064: Fix off by one in DAC value range check
        iio:ad5064: Fix address of the second channel for ad5065/ad5045/ad5025
      886e03be
    • Eric W. Biederman's avatar
      userns: Don't allow CLONE_NEWUSER | CLONE_FS · e66eded8
      Eric W. Biederman authored
      Don't allowing sharing the root directory with processes in a
      different user namespace.  There doesn't seem to be any point, and to
      allow it would require the overhead of putting a user namespace
      reference in fs_struct (for permission checks) and incrementing that
      reference count on practically every call to fork.
      
      So just perform the inexpensive test of forbidding sharing fs_struct
      acrosss processes in different user namespaces.  We already disallow
      other forms of threading when unsharing a user namespace so this
      should be no real burden in practice.
      
      This updates setns, clone, and unshare to disallow multiple user
      namespaces sharing an fs_struct.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e66eded8
    • Bill Pemberton's avatar
      USB: quatech2: only write to the tty if the port is open. · 27b351c5
      Bill Pemberton authored
      The commit 2e124b4a removed the checks
      that prevented qt2_process_read_urb() from trying to put chars into
      ttys that weren't actually opened.  This resulted in 'tty is NULL'
      warnings from flush_to_ldisc() when the device was used.
      
      The devices use just one read urb for all ports.  As a result
      qt2_process_read_urb() may be called with the current port set to a
      port number that has not been opened.  Add a check if the port is open
      before calling tty_flip_buffer_push().
      Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      27b351c5
    • Dan Williams's avatar
      qcserial: bind to DM/DIAG port on Gobi 1K devices · 3f8bc5e4
      Dan Williams authored
      Turns out we just need altsetting 1 and then we can talk to it.
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3f8bc5e4
    • Randy Dunlap's avatar
      futex: fix kernel-doc notation and spello · 6c23cbbd
      Randy Dunlap authored
      Fix kernel-doc warning in futex.c and convert 'Returns' to the new Return:
      kernel-doc notation format.
      
        Warning(kernel/futex.c:2286): Excess function parameter 'clockrt' description in 'futex_wait_requeue_pi'
      
      Fix one spello.
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c23cbbd
    • Randy Dunlap's avatar
      signals: fix new kernel-doc warnings · 20f22ab4
      Randy Dunlap authored
      Fix new kernel-doc warnings in kernel/signal.c:
      
        Warning(kernel/signal.c:2689): No description found for parameter 'uset'
        Warning(kernel/signal.c:2689): Excess function parameter 'set' description in 'sys_rt_sigpending'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      20f22ab4
    • Randy Dunlap's avatar
      idr: fix new kernel-doc warnings · 5857f70c
      Randy Dunlap authored
      Fix new kernel-doc warnings in idr:
      
        Warning(include/linux/idr.h:113): No description found for parameter 'idr'
        Warning(include/linux/idr.h:113): Excess function parameter 'idp' description in 'idr_find'
        Warning(lib/idr.c:232): Excess function parameter 'id' description in 'sub_alloc'
        Warning(lib/idr.c:232): Excess function parameter 'id' description in 'sub_alloc'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5857f70c
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · a3633f67
      Linus Torvalds authored
      Pull virtio rng buffix from Rusty Russell:
       "Simple virtio-rng fix."
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        virtio: rng: disallow multiple device registrations, fixes crashes
      a3633f67
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.9-rc2-tag' of... · 7946844a
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull Xen fixes from Konrad Rzeszutek Wilk:
       - Compile warnings and errors (one on x86, two on ARM)
       - WARNING in xen-pciback
       - Use the acpi_processor_get_performance_info instead of the 'register'
         version
      
      * tag 'stable/for-linus-3.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/acpi: remove redundant acpi/acpi_drivers.h include
        xen: arm: mandate EABI and use generic atomic operations.
        acpi: Export the acpi_processor_get_performance_info
        xen/pciback: Don't disable a PCI device that is already disabled.
      7946844a
  2. 12 Mar, 2013 23 commits
    • Oliver Neukum's avatar
      USB: cdc-wdm: fix buffer overflow · c0f5ecee
      Oliver Neukum authored
      The buffer for responses must not overflow.
      If this would happen, set a flag, drop the data and return
      an error after user space has read all remaining data.
      Signed-off-by: default avatarOliver Neukum <oliver@neukum.org>
      CC: stable@kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c0f5ecee
    • Stephen Rothwell's avatar
      Select VIRT_TO_BUS directly where needed · 4febd95a
      Stephen Rothwell authored
      In commit 887cbce0 ("arch Kconfig: centralise ARCH_NO_VIRT_TO_BUS")
      I introduced the config sybmol HAVE_VIRT_TO_BUS and selected that where
      needed.  I am not sure what I was thinking.  Instead, just directly
      select VIRT_TO_BUS where it is needed.
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4febd95a
    • Mathieu Desnoyers's avatar
      Fix: compat_rw_copy_check_uvector() misuse in aio, readv, writev, and security keys · 8aec0f5d
      Mathieu Desnoyers authored
      Looking at mm/process_vm_access.c:process_vm_rw() and comparing it to
      compat_process_vm_rw() shows that the compatibility code requires an
      explicit "access_ok()" check before calling
      compat_rw_copy_check_uvector(). The same difference seems to appear when
      we compare fs/read_write.c:do_readv_writev() to
      fs/compat.c:compat_do_readv_writev().
      
      This subtle difference between the compat and non-compat requirements
      should probably be debated, as it seems to be error-prone. In fact,
      there are two others sites that use this function in the Linux kernel,
      and they both seem to get it wrong:
      
      Now shifting our attention to fs/aio.c, we see that aio_setup_iocb()
      also ends up calling compat_rw_copy_check_uvector() through
      aio_setup_vectored_rw(). Unfortunately, the access_ok() check appears to
      be missing. Same situation for
      security/keys/compat.c:compat_keyctl_instantiate_key_iov().
      
      I propose that we add the access_ok() check directly into
      compat_rw_copy_check_uvector(), so callers don't have to worry about it,
      and it therefore makes the compat call code similar to its non-compat
      counterpart. Place the access_ok() check in the same location where
      copy_from_user() can trigger a -EFAULT error in the non-compat code, so
      the ABI behaviors are alike on both compat and non-compat.
      
      While we are here, fix compat_do_readv_writev() so it checks for
      compat_rw_copy_check_uvector() negative return values.
      
      And also, fix a memory leak in compat_keyctl_instantiate_key_iov() error
      handling.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8aec0f5d
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · c39ac49f
      Linus Torvalds authored
      Pull drm nouveau fixes from Dave Airlie:
       "This is just nouveau fixes from Ben, one fixes a nasty oops that some
        Fedora people have been seeing, so I'd like to get it out of the way."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nv50: use correct tiling methods for m2mf buffer moves
        drm/nouveau: idle channel before releasing notify object
        drm/nouveau: fix regression in vblanking
        drm/nv50: encoder creation failure doesn't mean full init failure
      c39ac49f
    • Linus Torvalds's avatar
      Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 6d9431a7
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "These bug fixes are for the largest part for mvebu/kirkwood, which saw
        a few regressions after the clock infrastructure was enabled, and for
        OMAP, which showed a few more preexisting bugs with the new
        multiplatform support.
      
        Other small fixes are for imx, mxs, tegra, spear and socfpga"
      
      * tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits)
        ARM: spear3xx: Use correct pl080 header file
        Arm: socfpga: pl330: Add #dma-cells for generic dma binding support
        ARM: multiplatform: Sort the max gpio numbers.
        ARM: imx: fix typo "DEBUG_IMX50_IMX53_UART"
        ARM: imx: pll1_sys should be an initial on clk
        arm: mach-orion5x: fix typo in compatible string of a .dts file
        arm: mvebu: fix address-cells in mpic DT node
        arm: plat-orion: fix address decoding when > 4GB is used
        arm: mvebu: Reduce reg-io-width with UARTs
        ARM: Dove: add RTC device node
        arm: mvebu: enable the USB ports on Armada 370 Reference Design board
        ARM: dove: drop "select COMMON_CLK_DOVE"
        rtc: rtc-mv: Add support for clk to avoid lockups
        gpio: mvebu: Add clk support to prevent lockup
        ARM: kirkwood: fix to retain gbe MAC addresses for DT kernels
        ARM: kirkwood: of_serial: fix clock gating by removing clock-frequency
        ARM: mxs: cfa10049: Fix fb initialisation function
        ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ"
        ARM: OMAP: RX-51: add missing USB phy binding
        clk: Tegra: Remove duplicate smp_twd clock
        ...
      6d9431a7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 4388817f
      Linus Torvalds authored
      Pull m68knommu fixes from Greg Ungerer:
       "It contains a few small fixes for the non-MMU m68k platforms.  Fixes
        some compilation problems, some broken header definitions, removes an
        unused config option and adds a name for the old 68000 CPU support."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k: drop "select EMAC_INC"
        m68knommu: fix misnamed GPIO pin definition for ColdFire 528x CPU
        m68knommu: fix MC68328.h defines
        m68knommu: fix build when CPU is not coldfire
        m68knommu: add CPU_NAME for 68000
      4388817f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · fa4a6732
      Linus Torvalds authored
      Pull key management race fix from James Morris.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        keys: fix race with concurrent install_user_keyrings()
      fa4a6732
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 368edaad
      Linus Torvalds authored
      Pull Ceph fix from Sage Weil:
       "This fixes a bug in the new message decoding that just went in during
        the last window."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
        libceph: fix decoding of pgids
      368edaad
    • Linus Torvalds's avatar
      Merge branch 'for-3.9' of git://linux-nfs.org/~bfields/linux · 5b22b184
      Linus Torvalds authored
      Pull nfsd bugfixes from Bruce Fields:
       "Some minor fallout from the user-namespace work broke most krb5 mounts
        to nfsd, and I screwed up a change to the AF_LOCAL rpc code."
      
      * 'for-3.9' of git://linux-nfs.org/~bfields/linux:
        sunrpc: don't attempt to cancel unitialized work
        nfsd: fix krb5 handling of anonymous principals
      5b22b184
    • Steve Conklin's avatar
      usb: serial: Add Rigblaster Advantage to device table · a57e82a1
      Steve Conklin authored
      The Rigblaster Advantage is an amateur radio interface sold by West Mountain
      Radio. It contains a cp210x serial interface but the device ID is not in
      the driver.
      Signed-off-by: default avatarSteve Conklin <sconklin@canonical.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a57e82a1
    • Paul Bolle's avatar
      tty: serial: fix typo "SERIAL_S3C2412" · c51d41a1
      Paul Bolle authored
      The Kconfig symbol SERIAL_S3C2412 got removed in commit
      da121506 ("serial: samsung: merge
      probe() function from all SoC specific extensions"). But it also added a
      last reference to that symbol. The commit and the tree make clear that
      CPU_S3C2412 should have been used instead.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c51d41a1
    • Josh Boyer's avatar
      serial: 8250: Keep 8250.<xxxx> module options functional after driver rename · f2b8dfd9
      Josh Boyer authored
      With commit 835d844d (8250_pnp: do pnp probe before legacy probe), the
      8250 driver was renamed to 8250_core.  This means any existing usage of
      the 8259.<xxxx> module parameters or as a kernel command line switch is
      now broken, as the 8250_core driver doesn't parse options belonging to
      something called "8250".
      
      To solve this, we redefine the module options in a dummy function using
      a redefined MODULE_PARAM_PREFX when built into the kernel.  In the case
      where we're building as a module, we provide an alias to the old 8250
      name.  The dummy function prevents compiler errors due to global variable
      redefinitions that happen as part of the module_param_ macro expansions.
      Signed-off-by: default avatarJosh Boyer <jwboyer@redhat.com>
      Acked-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f2b8dfd9
    • Paul Bolle's avatar
      tty: serial: fix typo "ARCH_S5P6450" · 827aa0d3
      Paul Bolle authored
      This could have been either ARCH_S5P64X0 or CPU_S5P6450. Looking at
      commit 2555e663 ("ARM: S5P64X0: Add UART
      serial support for S5P6450") - which added this typo - makes clear this
      should be CPU_S5P6450.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      827aa0d3
    • Sean Young's avatar
      tty/8250_pnp: serial port detection regression since v3.7 · 77e372a3
      Sean Young authored
      The InsydeH2O BIOS (version dated 09/12/2011) has the following in
      its pnp resouces for its serial ports:
      
      $ cat /sys/bus/pnp/devices/00:0b/resources
      state = active
      io disabled
      irq disabled
      
      We do not check if the resources are disabled, and create a bogus
      ttyS* device. Since commit 835d844d (8250_pnp: do pnp probe
      before legacy probe) we get a bogus ttyS0, which prevents the legacy
      probe from detecting it.
      
      Note, the BIOS can also be upgraded, fixing this problem, but for people
      who can't do that, this fix is needed.
      Reported-by: default avatarVincent Deffontaines <vincent@gryzor.com>
      Tested-by: default avatarVincent Deffontaines <vincent@gryzor.com>
      Signed-off-by: default avatarSean Young <sean@mess.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      77e372a3
    • Jonas Gorski's avatar
      serial: bcm63xx_uart: fix compilation after "TTY: switch tty_insert_flip_char" · 064256fe
      Jonas Gorski authored
      92a19f9c introduced a local variable
      with the same name as the argument to bcm_uart_do_rx, breaking
      compilation. Fix this by renaming the new variable and its uses where
      expected.
      Signed-off-by: default avatarJonas Gorski <jogo@openwrt.org>
      Acked-by: default avatarJiri Slaby <jslaby@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      064256fe
    • Wang YanQing's avatar
      serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller · 8d2f8cd4
      Wang YanQing authored
      01:08.0 Communication controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)
      	Subsystem: Device [1000:0012]
      	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
      	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
      	Interrupt: pin A routed to IRQ 20
      	Region 0: I/O ports at e050 [size=8]
      	Region 1: I/O ports at e040 [size=8]
      	Region 2: I/O ports at e030 [size=8]
      	Region 3: I/O ports at e020 [size=8]
      	Region 4: I/O ports at e010 [size=8]
      	Region 5: I/O ports at e000 [size=16]
      Signed-off-by: default avatarWang YanQing <udknight@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8d2f8cd4
    • Scott Ashcroft's avatar
      Fix 4 port and add support for 8 port 'Unknown' PCI serial port cards · d13402a4
      Scott Ashcroft authored
      I've managed to find an 8 port version of the card 4 port card which was discussed here:
      
      http://marc.info/?l=linux-serial&m=120760744205314&w=2
      
      Looking back at that thread there were two issues in the original patch.
      
      1) The I/O ports for the UARTs are within BAR2 not BAR0. This can been seen in the original post.
      2) A serial quirk isn't needed as these cards have no memory in BAR0 which makes pci_plx9050_init just return.
      
      This patch fixes the 4 port support to use BAR2, removes the bogus quirk and adds support for the 8 port card.
      
      $ lspci -vvv -n -s 00:08.0
      00:08.0 0780: 10b5:9050 (rev 01)
      	Subsystem: 10b5:1588
      	Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
      	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
      	Interrupt: pin A routed to IRQ 17
      	Region 1: I/O ports at ff00 [size=128]
      	Region 2: I/O ports at fe00 [size=64]
      	Region 3: I/O ports at fd00 [size=8]
      	Capabilities: <access denied>
      	Kernel driver in use: serial
      
      $ dmesg | grep 0000:00:08.0:
      [    0.083320] pci 0000:00:08.0: [10b5:9050] type 0 class 0x000780
      [    0.083355] pci 0000:00:08.0: reg 14: [io  0xff00-0xff7f]
      [    0.083369] pci 0000:00:08.0: reg 18: [io  0xfe00-0xfe3f]
      [    0.083382] pci 0000:00:08.0: reg 1c: [io  0xfd00-0xfd07]
      [    0.083460] pci 0000:00:08.0: PME# supported from D0 D3hot
      [    1.212867] 0000:00:08.0: ttyS4 at I/O 0xfe00 (irq = 17) is a 16550A
      [    1.233073] 0000:00:08.0: ttyS5 at I/O 0xfe08 (irq = 17) is a 16550A
      [    1.253270] 0000:00:08.0: ttyS6 at I/O 0xfe10 (irq = 17) is a 16550A
      [    1.273468] 0000:00:08.0: ttyS7 at I/O 0xfe18 (irq = 17) is a 16550A
      [    1.293666] 0000:00:08.0: ttyS8 at I/O 0xfe20 (irq = 17) is a 16550A
      [    1.313863] 0000:00:08.0: ttyS9 at I/O 0xfe28 (irq = 17) is a 16550A
      [    1.334061] 0000:00:08.0: ttyS10 at I/O 0xfe30 (irq = 17) is a 16550A
      [    1.354258] 0000:00:08.0: ttyS11 at I/O 0xfe38 (irq = 17) is a 16550A
      Signed-off-by: default avatarScott Ashcroft <scott.ashcroft@talk21.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d13402a4
    • Ley Foon Tan's avatar
      tty/serial: Add support for Altera serial port · e06c93ca
      Ley Foon Tan authored
      Add support for Altera 8250/16550 compatible serial port.
      Signed-off-by: default avatarLey Foon Tan <lftan@altera.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e06c93ca
    • Tony Prisk's avatar
      tty: serial: vt8500: Unneccessary duplicated clock code removed · 5771a805
      Tony Prisk authored
      Remove the extra code left over when the serial driver was changed
      to require a clock. There is no fallback to 24Mhz as a clock is
      now required.
      
      Also remove a second call to of_clk_get which is unnecessary.
      Signed-off-by: default avatarTony Prisk <linux@prisktech.co.nz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5771a805
    • Anatolij Gustschin's avatar
      tty: serial: mpc5xxx: fix PSC clock name bug · 09081e5b
      Anatolij Gustschin authored
      mpc512x platform clock code names PSC clocks as "pscX_mclk" but
      the driver tries to get "pscX_clk" clock and this results in
      errors like:
      
        mpc52xx-psc-uart 80011700.psc: Failed to get PSC clock entry!
      
      The problem appears when opening ttyPSC devices other than the
      system's serial console. Since getting and enabling the PSC clock
      fails, uart port startup doesn't succeed and tty flag TTY_IO_ERROR
      remains set causing further errors in tty ioctls, i.e.
      'strace stty -F /dev/ttyPSC1' shows:
      
      open("/dev/ttyPSC1", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 3
      dup2(3, 0)                              = 0
      close(3)                                = 0
      fcntl64(0, F_GETFL)                     = 0x10800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE)
      fcntl64(0, F_SETFL, O_RDONLY|O_LARGEFILE) = 0
      ioctl(0, TCGETS, 0xbff89038)            = -1 EIO (Input/output error)
      
      Only request PSC clock names that the platform actually provides.
      Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      09081e5b
    • Al Viro's avatar
      vfs: fix pipe counter breakage · a930d879
      Al Viro authored
      If you open a pipe for neither read nor write, the pipe code will not
      add any usage counters to the pipe, causing the 'struct pipe_inode_info"
      to be potentially released early.
      
      That doesn't normally matter, since you cannot actually use the pipe,
      but the pipe release code - particularly fasync handling - still expects
      the actual pipe infrastructure to all be there.  And rather than adding
      NULL pointer checks, let's just disallow this case, the same way we
      already do for the named pipe ("fifo") case.
      
      This is ancient going back to pre-2.4 days, and until trinity, nobody
      naver noticed.
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a930d879
    • Arnd Bergmann's avatar
      ARM: spear3xx: Use correct pl080 header file · 27f423fe
      Arnd Bergmann authored
      The definitions have move around recently, causing build errors
      in spear3xx for all configurations:
      
      spear3xx.c:47:5: error: 'PL080_BSIZE_16' undeclared here (not in a function)
      spear3xx.c:47:23: error: 'PL080_CONTROL_SB_SIZE_SHIFT' undeclared here (not in a function)
      spear3xx.c:48:22: error: 'PL080_CONTROL_DB_SIZE_SHIFT' undeclared here (not in a function)
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Alessandro Rubini <rubini@gnudd.com>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      27f423fe
    • David Howells's avatar
      keys: fix race with concurrent install_user_keyrings() · 0da9dfdd
      David Howells authored
      This fixes CVE-2013-1792.
      
      There is a race in install_user_keyrings() that can cause a NULL pointer
      dereference when called concurrently for the same user if the uid and
      uid-session keyrings are not yet created.  It might be possible for an
      unprivileged user to trigger this by calling keyctl() from userspace in
      parallel immediately after logging in.
      
      Assume that we have two threads both executing lookup_user_key(), both
      looking for KEY_SPEC_USER_SESSION_KEYRING.
      
      	THREAD A			THREAD B
      	===============================	===============================
      					==>call install_user_keyrings();
      	if (!cred->user->session_keyring)
      	==>call install_user_keyrings()
      					...
      					user->uid_keyring = uid_keyring;
      	if (user->uid_keyring)
      		return 0;
      	<==
      	key = cred->user->session_keyring [== NULL]
      					user->session_keyring = session_keyring;
      	atomic_inc(&key->usage); [oops]
      
      At the point thread A dereferences cred->user->session_keyring, thread B
      hasn't updated user->session_keyring yet, but thread A assumes it is
      populated because install_user_keyrings() returned ok.
      
      The race window is really small but can be exploited if, for example,
      thread B is interrupted or preempted after initializing uid_keyring, but
      before doing setting session_keyring.
      
      This couldn't be reproduced on a stock kernel.  However, after placing
      systemtap probe on 'user->session_keyring = session_keyring;' that
      introduced some delay, the kernel could be crashed reliably.
      
      Fix this by checking both pointers before deciding whether to return.
      Alternatively, the test could be done away with entirely as it is checked
      inside the mutex - but since the mutex is global, that may not be the best
      way.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reported-by: default avatarMateusz Guzik <mguzik@redhat.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      0da9dfdd
  3. 11 Mar, 2013 6 commits