13 Sep, 2007

1 commit

  • Commit f629307c857c030d5a3dd777fee37c8bb395e171 introduced uses of
    kernel_termios_to_user_termios_1 and user_termios_to_kernel_termios_1
    on all architectures. However, powerpc, s390, avr32 and frv don't
    currently define those functions since their termios struct didn't
    need to be changed when the arbitrary baud rate stuff was added, and
    thus the kernel won't currently build on those architectures.

    This adds definitions of kernel_termios_to_user_termios_1 and
    user_termios_to_kernel_termios_1 to include/asm-generic/termios.h
    which are identical to kernel_termios_to_user_termios and
    user_termios_to_kernel_termios respectively. The definitions are the
    same because the "old" termios and "new" termios are in fact the same
    on these architectures (which are the same ones that use
    asm-generic/termios.h).

    Signed-off-by: Paul Mackerras
    Cc: Andrew Morton
    Cc: Alan Cox
    Cc: David Miller
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     

12 Sep, 2007

39 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [BLUETOOTH]: Fix non-COMPAT build of hci_sock.c

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Fix booting on V100 systems.

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: usbtouchscreen - correctly set 'phys'
    Input: i8042 - add HP Pavilion DV4270ca to the MUX blacklist
    Input: i8042 - fix modpost warning
    Input: add more Braille keycodes

    Linus Torvalds
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • On the root PCI bus, the OBP device tree lists device 3 twice.
    Once as 'pm' and once as 'lomp'.

    Everything goes downhill from there.

    Ignore the second instance to workaround this.

    Thanks to Kövedi_Krisztián for the bug report and
    testing the fix.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
    ocfs2: Fix calculation of i_blocks during truncate
    [PATCH] ocfs2: Fix a wrong cluster calculation.
    [PATCH] ocfs2: fix mount option parsing
    ocfs2: update docs for new features

    Linus Torvalds
     
  • SERIAL_BFIN=m or SERIAL_MUX=m shouldn't allow SERIAL_CORE_CONSOLE=y.

    Additionally, this patch fixes whitespace instead of tabs at the
    SERIAL_MUX_CONSOLE option.

    Signed-off-by: Adrian Bunk
    Cc: Bryan Wu
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Intel framebuffer mis-calculated pixel clocks.

    The pixel clock (and thus both H and V sync) will be slower than requested, so
    if you set the minimum allowed the display may not sync. In case of really
    old CRT display it could theoretically damage it.

    I'm using it with PAL TV (using RGB input - SCART connector) and the bug
    prevented it from working at all (TV requirements are more strict and made the
    bug visible).

    Signed-off-by: Krzysztof Halasa
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Halasa
     
  • This was posted on Aug 28 and fixes an issue that could cause troubles
    when slab caches >=128k are created.

    http://marc.info/?l=linux-mm&m=118798149918424&w=2

    Currently we simply add the debug flags unconditional when checking for a
    matching slab. This creates issues for sysfs processing when slabs exist
    that are exempt from debugging due to their huge size or because only a
    subset of slabs was selected for debugging.

    We need to only add the flags if kmem_cache_open() would also add them.

    Create a function to calculate the flags that would be set
    if the cache would be opened and use that function to determine
    the flags before looking for a compatible slab.

    [akpm@linux-foundation.org: fixlets]
    Signed-off-by: Christoph Lameter
    Cc: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Revert

    commit 656dad312fb41ed95ef08325e9df9bece3aacbbb
    Author: Ingo Molnar
    Date: Sat Feb 10 01:46:36 2007 -0800

    [PATCH] highmem: catch illegal nesting

    Catch illegally nested kmap_atomic()s even if the page that is mapped by
    the 'inner' instance is from lowmem.

    This avoids spuriously zapped kmap-atomic ptes and turns hard to find
    crashes into clear asserts at the bug site.

    Problem is, a get_zeroed_page(GFP_KERNEL) from interrupt context will trigger
    this check if non-irq code on this CPU holds a KM_USER0 mapping. But that
    get_zeroed_page() will never be altering the kmap slot anyway due to the
    GFP_KERNEL.

    Cc: Christoph Lameter
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Seems to me that this timer will only get started on platforms that say
    they don't want it?

    Signed-off-by: Tony Breeds
    Cc: Paul Mackerras
    Cc: Gabriel Paubert
    Cc: Zachary Amsden
    Acked-by: Thomas Gleixner
    Cc: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tony Breeds
     
  • The inode->i_flock list contains the leases, flocks and posix
    locks in the specified order. However, the flocks are added in
    the head of this list thus hiding the leases from F_GETLEASE
    command, from time_out_leases() and other code that expects
    the leases to come first.

    The following example will demonstrate this:

    #define _GNU_SOURCE

    #include
    #include
    #include
    #include

    static void show_lease(int fd)
    {
    int res;

    res = fcntl(fd, F_GETLEASE);
    switch (res) {
    case F_RDLCK:
    printf("Read lease\n");
    break;
    case F_WRLCK:
    printf("Write lease\n");
    break;
    case F_UNLCK:
    printf("No leases\n");
    break;
    default:
    printf("Some shit\n");
    break;
    }
    }

    int main(int argc, char **argv)
    {
    int fd, res;

    fd = open(argv[1], O_RDONLY);
    if (fd == -1) {
    perror("Can't open file");
    return 1;
    }

    res = fcntl(fd, F_SETLEASE, F_WRLCK);
    if (res == -1) {
    perror("Can't set lease");
    return 1;
    }

    show_lease(fd);

    if (flock(fd, LOCK_SH) == -1) {
    perror("Can't flock shared");
    return 1;
    }

    show_lease(fd);

    return 0;
    }

    The first call to show_lease() will show the write lease set, but
    the second will show no leases.

    Fix the flock adding so that the leases always stay in the head
    of this list.

    Found during making the flocks pid-namespaces aware.

    Signed-off-by: Pavel Emelyanov
    Acked-by: "J. Bruce Fields"
    Cc: Trond Myklebust
    Cc: Andrew Morton
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • G33 has 1MB GTT table range. Fix GTT mapping in case like 512MB aperture
    size.

    Signed-off-by: Zhenyu Wang
    Acked-by: Dave Airlie
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhenyu Wang
     
  • G33 GTT stolen memory is below graphics data stolen memory and be seperate,
    so don't subtract it in stolen mem counting.

    Signed-off-by: Zhenyu Wang
    Acked-by: Dave Airlie
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhenyu Wang
     
  • Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • Taneli Vähäkangas reported that commit
    786d7e1612f0b0adb6046f19b906609e4fe8b1ba aka "Fix rmmod/read/write races
    in /proc entries" broke SBCL + SLIME combo.

    The old code in do_select() used DEFAULT_POLLMASK, if couldn't find
    ->poll handler. The new code makes ->poll always there and returns 0 by
    default, which is not correct. Return DEFAULT_POLLMASK instead.

    Steps to reproduce:

    install emacs, SBCL, SLIME
    emacs
    M-x slime in *inferior-lisp* buffer
    [watch it doing "Connecting to Swank on port X.."]

    Please, apply before 2.6.23.

    P.S.: why SBCL can't just read(2) /proc/cpuinfo is a mystery.

    Signed-off-by: Alexey Dobriyan
    Cc: T Taneli Vahakangas
    Cc: Oleg Nesterov
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • The semantics of call_usermodehelper_pipe() used to be that it would fork
    the helper, and wait for the kernel thread to be started. This was
    implemented by setting sub_info.wait to 0 (implicitly), and doing a
    wait_for_completion().

    As part of the cleanup done in 0ab4dc92278a0f3816e486d6350c6652a72e06c8,
    call_usermodehelper_pipe() was changed to pass 1 as the value for wait to
    call_usermodehelper_exec().

    This is equivalent to setting sub_info.wait to 1, which is a change from
    the previous behaviour. Using 1 instead of 0 causes
    __call_usermodehelper() to start the kernel thread running
    wait_for_helper(), rather than directly calling ____call_usermodehelper().

    The end result is that the calling kernel code blocks until the user mode
    helper finishes. As the helper is expecting input on stdin, and now no one
    is writing anything, everything locks up (observed in do_coredump).

    The fix is to change the 1 to UMH_WAIT_EXEC (aka 0), indicating that we
    want to wait for the kernel thread to be started, but not for the helper to
    finish.

    Signed-off-by: Michael Ellerman
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Ellerman
     
  • I ran into a few problems.

    n_tty_ioctl() for instance:

    drivers/char/tty_ioctl.c:799: error: $,1rxstruct termios$,1ry has no
    member named $,1rxc_ispeed$,1ry

    This is calling the copy interface that is supposed to be using
    a termios2 when the new interfaces are defined, however:

    case TIOCGLCKTRMIOS:
    if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked))
    return -EFAULT;
    return 0;

    This is going to write over the end of the userspace
    structure by a few bytes, and wasn't caught by you yet
    because the i386 implementation is simply copy_to_user()
    which does zero type checking.

    Signed-off-by: Alan Cox
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Miller
     
  • The futex list traversal on the compat side appears to have
    a bug.

    It's loop termination condition compares:

    while (compat_ptr(uentry) != &head->list)

    But that can't be right because "uentry" has the special
    "pi" indicator bit still potentially set at bit 0. This
    is cleared by fetch_robust_entry() into the "entry"
    return value.

    What this seems to mean is that the list won't terminate
    when list iteration gets back to the the head. And we'll
    also process the list head like a normal entry, which could
    cause all kinds of problems.

    So we should check for equality with "entry". That pointer
    is of the non-compat type so we have to do a little casting
    to keep the compiler and sparse happy.

    The same problem can in theory occur with the 'pending'
    variable, although that has not been reported from users
    so far.

    Based on the original patch from David Miller.

    Acked-by: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: David Miller
    Signed-off-by: Arnd Bergmann
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Signed-off-by: Andre Haupt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andre Haupt
     
  • The AdvanSys driver wants to align some pointers, and the ALIGN macro
    doesn't work for pointers. Rather than try to make it work, add a new
    PTR_ALIGN macro which is typesafe.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     
  • Fix off-by-one in month calculations
    Add delay for bus accesses to satisfy Tw > 500ns

    Signed-off-by: Mike Rapoport
    Acked-by: Raphael Assenat
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • Signed-off-by: Robert P. J. Day
    Acked-by: Satyam Sharma
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • ecryptfs.txt moved into filesystems, make 00-INDEX follow.

    Signed-off-by: Rob Landley
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rob Landley
     
  • Addresses http://bugzilla.kernel.org/show_bug.cgi?id=8942

    Use PCI_DMA_* constants instead of own private definitions Fall back to
    32-bit DMA mask if a 64-bit one fails

    Signed-off-by: Matthew Wilcox
    Acked-by: Jeff Garzik
    Tested-by: Lars
    Cc: Alessandro Polverini
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     
  • dput must be called before mntput here.

    Signed-off-by: Andreas Gruenbacher
    Acked-By: David Howells
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Gruenbacher
     
  • The recent changed to raid5 to allow offload of parity calculation etc
    introduced some bugs in the code for growing (i.e. adding a disk to) raid5
    and raid6. This fixes them

    Acked-by: Dan Williams
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • If the quirk enables the SIR part of the SMCf010 device, the 8250 driver
    may claim it as a legacy ttyS device, which makes the legacy probe in the
    smsc-ircc2 driver fail.

    Signed-off-by: Bjorn Helgaas
    Cc: Andrey Borzenkov
    Cc: Michal Piotrowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • Restores serial functionality for the BCM1480.

    Signed-off-by: Thiemo Seufer
    Signed-off-by: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thiemo Seufer
     
  • This patch changes the error code when dev0:fun1 was hidden by BIOS to one
    more appropriate.

    Signed-off-by: Aristeu Rozanski
    Signed-off-by: Mark Gross
    Signed-off-by: Doug Thompson
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aristeu Rozanski
     
  • When EDAC is configured for EDAC DEBUGGING, the debug printk output level
    was set TOO high (EMERG). This patch brings it down to a DEBUG level

    Signed-off-by: Doug Thompson
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Doug Thompson
     
  • When the spi_mpc83xx driver receives a tx_buf pointer which is NULL, it
    only writes one zero filled word to the transmit register. If the driver
    expects to receive more than one word it will wait forever for a second
    receive interrupt. With this patch the controller will shift out zeroes
    until all words have been received.

    Signed-off-by: Jan Andersson
    Tested-by: Anton Vorontsov
    Signed-off-by: David Brownell
    Acked-by: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Andersson
     
  • If we fail to start a transaction when releasing dquot, we have to call
    dquot_release() anyway to mark dquot structure as inactive. Otherwise we
    end in an infinite loop inside dqput().

    Signed-off-by: Jan Kara
    Cc: xb
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
    [MIPS] Fix aliasing bug in copy_user_highpage.
    [MIPS] IP22: fix wrong argument order
    [MIPS] IP22: Fix wrong check for second HPC
    [MIPS] Ocelot: remove remaining bits
    [MIPS] TLB: Fix instruction bitmasks
    [MIPS] R10000: Fix wrong test in dma-default.c
    [MIPS] Provide empty irq_enable_hazard definition for legacy and R1 cores.
    [MIPS] Sibyte: Remove broken dependency on EXPERIMENTAL from SIBYTE_SB1xxx_SOC.
    [MIPS] Kconfig: whitespace cleanup.
    [MIPS] PCI: Set need_domain_info if controller domain index is non-zero.
    [MIPS] BCM1480: Fix computation of interrupt mask address register.
    [MIPS] i8259: Add disable method.
    [MIPS] tty: add the new ioctls and definitions.

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
    pdc202xx_new: PLL detection fix
    via82cxxx: add Arima W730-K8 and other rebadgings to short cables list
    pmac: build fix
    pata_ali/alim15x3: override 80-wire cable detection for Toshiba S1800-814
    hpt366: UltraDMA filter for SATA cards (take 2)
    ide: add ide_dev_is_sata() helper (take 2)
    hpt366: fix PCI clock detection for HPT374 (take 4)
    pdc202xx_new: fix PCI refcounting
    ide: fix PCI refcounting
    mpc8xx: Only build mpc8xx on arch/ppc

    Linus Torvalds
     
  • Fix a bitmask typo in the pdc202xx_new PLL frequency detection code
    which causes it to truncate an intermediate difference to 26 bits
    instead of the correct 30 bits (the PLL's bitwidth).

    Signed-off-by: Mikael Pettersson
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Mikael Pettersson
     
  • Port of Alan's patch for pata_via.c.

    Cc: Alan Cox
    Cc: Mikael Pettersson
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Ensure that BLK_DEV_IDE is built-in before allowing BLK_DEV_IDE_PMAC to
    be selected.

    Signed-off-by: Tony Breeds
    Cc: Bret Towe
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Tony Breeds
     
  • Add Toshiba S1800-814 to whitelist for both pata_ali and alim15x3,
    as it is correctly detected as 40-wire connected but this cable is
    short enough to still use transfer modes higher than UDMA33.

    Signed-off-by: Daniel Exner
    Cc: Alan Cox
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Daniel Exner