Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 19, 2007
  1. Linux 2.6.23-rc7

    Linus Torvalds authored
  2. Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-s…

    Linus Torvalds authored
    …ched
    
    * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
      sched: fix invalid sched_class use
      sched: add /proc/sys/kernel/sched_compat_yield
  3. @eparis

    SELinux: fix array out of bounds when mounting with selinux options

    eparis authored James Morris committed
    Given an illegal selinux option it was possible for match_token to work in
    random memory at the end of the match_table_t array.
    
    Note that privilege is required to perform a context mount, so this issue is
    effectively limited to root only.
    
    Signed-off-by: Eric Paris <eparis@redhat.com>
    Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
    Signed-off-by: James Morris <jmorris@namei.org>
  4. @h-shimamoto

    sched: fix invalid sched_class use

    h-shimamoto authored Ingo Molnar committed
    When using rt_mutex, a NULL pointer dereference is occurred at
    enqueue_task_rt. Here is a scenario;
    1) there are two threads, the thread A is fair_sched_class and
       thread B is rt_sched_class.
    2) Thread A is boosted up to rt_sched_class, because the thread A
       has a rt_mutex lock and the thread B is waiting the lock.
    3) At this time, when thread A create a new thread C, the thread
       C has a rt_sched_class.
    4) When doing wake_up_new_task() for the thread C, the priority
       of the thread C is out of the RT priority range, because the
       normal priority of thread A is not the RT priority. It makes
       data corruption by overflowing the rt_prio_array.
    The new thread C should be fair_sched_class.
    
    The new thread should be valid scheduler class before queuing.
    This patch fixes to set the suitable scheduler class.
    
    Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
  5. sched: add /proc/sys/kernel/sched_compat_yield

    Ingo Molnar authored
    add /proc/sys/kernel/sched_compat_yield to make sys_sched_yield()
    more agressive, by moving the yielding task to the last position
    in the rbtree.
    
    with sched_compat_yield=0:
    
       PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
      2539 mingo     20   0  1576  252  204 R   50  0.0   0:02.03 loop_yield
      2541 mingo     20   0  1576  244  196 R   50  0.0   0:02.05 loop
    
    with sched_compat_yield=1:
    
       PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
      2584 mingo     20   0  1576  248  196 R   99  0.0   0:52.45 loop
      2582 mingo     20   0  1576  256  204 R    0  0.0   0:00.00 loop_yield
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
  6. Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-…

    Linus Torvalds authored
    …linus
    
    * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
      [MIPS] cpu-bugs64.c: GCC 3.3 constraint workaround
      [MIPS] DEC: Initialise ioasic_ssr_lock
  7. Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb

    Linus Torvalds authored
    * master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
      V4L/DVB (6173a): Documentation: Remove reference to dead "cpia_pp=" boot-time option
      Revert "V4L/DVB (6173a): Documentation: Remove reference to dead "cpia_pp=" boot-time option"
  8. Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

    Linus Torvalds authored
    * 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
      [XFS] Avoid replaying inode buffer initialisation log items if on-disk version is newer.
      [XFS] Ensure file size updates have been completed before writing inode to disk.
      [XFS] On-demand reaping of the MRU cache
  9. Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

    Linus Torvalds authored
    * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
      [SUNSAB]: Fix several bugs.
  10. Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6

    Linus Torvalds authored
    * master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
      ide: remove unused variables from drivers/ide/ppc/pmac.c
      ide: ST320413A has the same problem as ST340823A
  11. Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git…

    Linus Torvalds authored
    …/paulus/powerpc
    
    * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
      [POWERPC] Fix timekeeping on PowerPC 601
      [POWERPC] Don't expose clock vDSO functions when CPU has no timebase
      [POWERPC] spusched: Fix null pointer dereference in find_victim
  12. x86-64: page faults from user mode are always user faults

    Linus Torvalds authored
    Randy Dunlap noticed an interesting "crashme" behaviour on his dual
    Prescott Xeon setup, where he gets page faults with the error code
    having a zero "user" bit, but the register state points back to user
    mode.
    
    This may be a CPU microcode buglet triggered by some strange instruction
    pattern that crashme generates, and loading a microcode update seems to
    possibly have fixed it.
    
    Regardless, we really should trust the register state more than the
    error code, since it's really the register state that determines whether
    we can actually send a signal, or whether we're in kernel mode and need
    to oops/kill the process in the case of a page fault.
    
    Cc: Randy Dunlap <rdunlap@xenotime.net>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  13. @ralfbaechle

    [MIPS] cpu-bugs64.c: GCC 3.3 constraint workaround

    Maciej W. Rozycki authored ralfbaechle committed
    Add a workaround to address warnings generated on the "n" constraint by
    GCC 3.3 and below.
    
    Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  14. @ralfbaechle

    [MIPS] DEC: Initialise ioasic_ssr_lock

    Maciej W. Rozycki authored ralfbaechle committed
    Fix the definition of the ioasic_ssr_lock spinlock to include a proper 
    initialisation.
    
    Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  15. Driver core: fix deprectated sysfs structure for nested class devices

    Dmitry Torokhov authored Linus Torvalds committed
    Nested class devices used to have 'device' symlink point to a real
    (physical) device instead of a parent class device.  When converting
    subsystems to struct device we need to keep doing what class devices did if
    CONFIG_SYSFS_DEPRECATED is Y, otherwise parts of udev break.
    
    Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
    Cc: Kay Sievers <kay.sievers@vrfy.org>
    Acked-by: Greg KH <greg@kroah.com>
    Tested-by: Anssi Hannula <anssi.hannula@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  16. uml: fix irqstack crash

    Jeff Dike authored Linus Torvalds committed
    This patch fixes a crash caused by an interrupt coming in when an IRQ stack
    is being torn down.  When this happens, handle_signal will loop, setting up
    the IRQ stack again because the tearing down had finished, and handling
    whatever signals had come in.
    
    However, to_irq_stack returns a mask of pending signals to be handled, plus
    bit zero is set if the IRQ stack was already active, and thus shouldn't be
    torn down.  This causes a problem because when handle_signal goes around
    the loop, sig will be zero, and to_irq_stack will duly set bit zero in the
    returned mask, faking handle_signal into believing that it shouldn't tear
    down the IRQ stack and return thread_info pointers back to their original
    values.
    
    This will eventually cause a crash, as the IRQ stack thread_info will
    continue pointing to the original task_struct and an interrupt will look
    into it after it has been freed.
    
    The fix is to stop passing a signal number into to_irq_stack.  Rather, the
    pending signals mask is initialized beforehand with the bit for sig already
    set.  References to sig in to_irq_stack can be replaced with references to
    the mask.
    
    [akpm@linux-foundation.org: use UL]
    Signed-off-by: Jeff Dike <jdike@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  17. Fix NUMA Memory Policy Reference Counting

    Lee Schermerhorn authored Linus Torvalds committed
    This patch proposes fixes to the reference counting of memory policy in the
    page allocation paths and in show_numa_map().  Extracted from my "Memory
    Policy Cleanups and Enhancements" series as stand-alone.
    
    Shared policy lookup [shmem] has always added a reference to the policy,
    but this was never unrefed after page allocation or after formatting the
    numa map data.
    
    Default system policy should not require additional ref counting, nor
    should the current task's task policy.  However, show_numa_map() calls
    get_vma_policy() to examine what may be [likely is] another task's policy.
    The latter case needs protection against freeing of the policy.
    
    This patch adds a reference count to a mempolicy returned by
    get_vma_policy() when the policy is a vma policy or another task's
    mempolicy.  Again, shared policy is already reference counted on lookup.  A
    matching "unref" [__mpol_free()] is performed in alloc_page_vma() for
    shared and vma policies, and in show_numa_map() for shared and another
    task's mempolicy.  We can call __mpol_free() directly, saving an admittedly
    inexpensive inline NULL test, because we know we have a non-NULL policy.
    
    Handling policy ref counts for hugepages is a bit trickier.
    huge_zonelist() returns a zone list that might come from a shared or vma
    'BIND policy.  In this case, we should hold the reference until after the
    huge page allocation in dequeue_hugepage().  The patch modifies
    huge_zonelist() to return a pointer to the mempolicy if it needs to be
    unref'd after allocation.
    
    Kernel Build [16cpu, 32GB, ia64] - average of 10 runs:
    
    		w/o patch	w/ refcount patch
    	    Avg	  Std Devn	   Avg	  Std Devn
    Real:	 100.59	    0.38	 100.63	    0.43
    User:	1209.60	    0.37	1209.91	    0.31
    System:   81.52	    0.42	  81.64	    0.34
    
    Signed-off-by:  Lee Schermerhorn <lee.schermerhorn@hp.com>
    Acked-by: Andi Kleen <ak@suse.de>
    Cc: Christoph Lameter <clameter@sgi.com>
    Acked-by: Mel Gorman <mel@csn.ul.ie>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  18. @xemul

    Fix user namespace exiting OOPs

    xemul authored Linus Torvalds committed
    It turned out, that the user namespace is released during the do_exit() in
    exit_task_namespaces(), but the struct user_struct is released only during the
    put_task_struct(), i.e.  MUCH later.
    
    On debug kernels with poisoned slabs this will cause the oops in
    uid_hash_remove() because the head of the chain, which resides inside the
    struct user_namespace, will be already freed and poisoned.
    
    Since the uid hash itself is required only when someone can search it, i.e.
    when the namespace is alive, we can safely unhash all the user_struct-s from
    it during the namespace exiting.  The subsequent free_uid() will complete the
    user_struct destruction.
    
    For example simple program
    
       #include <sched.h>
    
       char stack[2 * 1024 * 1024];
    
       int f(void *foo)
       {
       	return 0;
       }
    
       int main(void)
       {
       	clone(f, stack + 1 * 1024 * 1024, 0x10000000, 0);
       	return 0;
       }
    
    run on kernel with CONFIG_USER_NS turned on will oops the
    kernel immediately.
    
    This was spotted during OpenVZ kernel testing.
    
    Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
    Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
    Acked-by: "Serge E. Hallyn" <serue@us.ibm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  19. @xemul

    Convert uid hash to hlist

    xemul authored Linus Torvalds committed
    Surprisingly, but (spotted by Alexey Dobriyan) the uid hash still uses
    list_heads, thus occupying twice as much place as it could.  Convert it to
    hlist_heads.
    
    Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
    Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
    Acked-by: Serge Hallyn <serue@us.ibm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  20. kernel/user.c: Use list_for_each_entry instead of list_for_each

    Matthias Kaehlcke authored Linus Torvalds committed
    kernel/user.c: Convert list_for_each to list_for_each_entry in
    uid_hash_find()
    
    Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  21. ext34: ensure do_split leaves enough free space in both blocks

    Eric Sandeen authored Linus Torvalds committed
    The do_split() function for htree dir blocks is intended to split a leaf
    block to make room for a new entry.  It sorts the entries in the original
    block by hash value, then moves the last half of the entries to the new
    block - without accounting for how much space this actually moves.  (IOW,
    it moves half of the entry *count* not half of the entry *space*).  If by
    chance we have both large & small entries, and we move only the smallest
    entries, and we have a large new entry to insert, we may not have created
    enough space for it.
    
    The patch below stores each record size when calculating the dx_map, and
    then walks the hash-sorted dx_map, calculating how many entries must be
    moved to more evenly split the existing entries between the old block and
    the new block, guaranteeing enough space for the new entry.
    
    The dx_map "offs" member is reduced to u16 so that the overall map size
    does not change - it is temporarily stored at the end of the new block, and
    if it grows too large it may be overwritten.  By making offs and size both
    u16, we won't grow the map size.
    
    Also add a few comments to the functions involved.
    
    This fixes the testcase reported by hooanon05@yahoo.co.jp on the
    linux-ext4 list, "ext3 dir_index causes an error"
    
    Thanks to Andreas Dilger for discussing the problem & solution with me.
    
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
    Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
    Tested-by: Junjiro Okajima <hooanon05@yahoo.co.jp>
    Cc: Theodore Ts'o <tytso@mit.edu>
    Cc: <linux-ext4@vger.kernel.org>
    Cc: <stable@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  22. disable sys_timerfd() for 2.6.23

    Andrew Morton authored Linus Torvalds committed
    There is still some confusion and disagreement over what this interface should
    actually do.  So it is best that we disable it in 2.6.23 until we get that
    fully sorted out.
    
    (sys_timerfd() was present in 2.6.22 but it was apparently broken, so here we
    assume that nobody is using it yet).
    
    Cc: Michael Kerrisk <mtk-manpages@gmx.net>
    Cc: Davide Libenzi <davidel@xmailserver.org>
    Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  23. nfs: fix oops re sysctls and V4 support

    Alexey Dobriyan authored Linus Torvalds committed
    NFS unregisters sysctls only if V4 support is compiled in.  However, sysctl
    table is not V4 specific, so unregister it always.
    
    Steps to reproduce:
    
    	[build nfs.ko with CONFIG_NFS_V4=n]
    	modrobe nfs
    	rmmod nfs
    	ls /proc/sys
    
    Unable to handle kernel paging request at ffffffff880661c0 RIP:
     [<ffffffff802af8e3>] proc_sys_readdir+0xd3/0x350
    PGD 203067 PUD 207063 PMD 7e216067 PTE 0
    Oops: 0000 [1] SMP
    CPU 1
    Modules linked in: lockd nfs_acl sunrpc
    Pid: 3335, comm: ls Not tainted 2.6.23-rc3-bloat #2
    RIP: 0010:[<ffffffff802af8e3>]  [<ffffffff802af8e3>] proc_sys_readdir+0xd3/0x350
    RSP: 0018:ffff81007fd93e78  EFLAGS: 00010286
    RAX: ffffffff880661c0 RBX: ffffffff80466370 RCX: ffffffff880661c0
    RDX: 00000000000014c0 RSI: ffff81007f3ad020 RDI: ffff81007efd8b40
    RBP: 0000000000000018 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000001 R11: ffffffff802a8570 R12: ffffffff880661c0
    R13: ffff81007e219640 R14: ffff81007efd8b40 R15: ffff81007ded7280
    FS:  00002ba25ef03060(0000) GS:ffff81007ff81258(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: ffffffff880661c0 CR3: 000000007dfaf000 CR4: 00000000000006e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process ls (pid: 3335, threadinfo ffff81007fd92000, task ffff81007d8a0000)
    Stack:  ffff81007f3ad150 ffffffff80283f30 ffff81007fd93f48 ffff81007efd8b40
     ffff81007ee00440 0000000422222222 0000000200035593 ffffffff88037e9a
     2222222222222222 ffffffff80466500 ffff81007e416400 ffff81007e219640
    Call Trace:
     [<ffffffff80283f30>] filldir+0x0/0xf0
     [<ffffffff80283f30>] filldir+0x0/0xf0
     [<ffffffff802840c7>] vfs_readdir+0xa7/0xc0
     [<ffffffff80284376>] sys_getdents+0x96/0xe0
     [<ffffffff8020bb3e>] system_call+0x7e/0x83
    
    Code: 41 8b 14 24 85 d2 74 dc 49 8b 44 24 08 48 85 c0 74 e7 49 3b
    RIP  [<ffffffff802af8e3>] proc_sys_readdir+0xd3/0x350
     RSP <ffff81007fd93e78>
    CR2: ffffffff880661c0
    Kernel panic - not syncing: Fatal exception
    
    Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
    Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: <stable@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  24. dir_index: error out instead of BUG on corrupt dx dirs

    Eric Sandeen authored Linus Torvalds committed
    Convert asserts (BUGs) in dx_probe from bad on-disk data to recoverable
    errors with helpful warnings.  With help catching other asserts from Duane
    Griffin <duaneg@dghda.com>
    
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
    Acked-by: Duane Griffin <duaneg@dghda.com>
    Acked-by: Theodore Ts'o <tytso@mit.edu>
    Cc: <stable@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  25. intel-agp: Fix i830 mask variable that changed with G33 support

    Dave Airlie authored Linus Torvalds committed
    The mask on i830 should be 0x70 always, later chips 0xF0 should be okay.
    
    Signed-off-by: Dave Airlie <airlied@linux.ie>
    Acked-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
    Cc: Michael Haas <laga@laga.ath.cx>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  26. intelfb: Fix bug in DPLL disable

    Antonino A. Daplas authored Linus Torvalds committed
    Reported in Kernel Bugzilla 9006
    
    Fix an obvious bug in DPLL disable.
    
    Signed-off-by: Antonino Daplas <adaplas@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  27. @jsgf

    xen: don't bother trying to set cr4

    jsgf authored Linus Torvalds committed
    Xen ignores all updates to cr4, and some versions will kill the domain if
    you try to change its value.  Just ignore all changes.
    
    Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
    Cc: Andi Kleen <ak@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  28. @kees

    pci: fix unterminated pci_device_id lists

    kees authored Linus Torvalds committed
    Fix a couple drivers that do not correctly terminate their pci_device_id
    lists.  This results in garbage being spewed into modules.pcimap when the
    module happens to not have 28 NULL bytes following the table, and/or the
    last PCI ID is actually truncated from the table when calculating the
    modules.alias PCI aliases, cause those unfortunate device IDs to not
    auto-load.
    
    Signed-off-by: Kees Cook <kees@ubuntu.com>
    Acked-by: Corey Minyard <minyard@acm.org>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Acked-by: Jeff Garzik <jeff@garzik.org>
    Cc: Greg KH <greg@kroah.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  29. @cpwickman

    mspec: handle shrinking virtual memory areas

    cpwickman authored Linus Torvalds committed
    The shrinking of a virtual memory area that is mmap(2)'d to a memory
    special file (device drivers/char/mspec.c) can cause a panic.
    
    If the mapped size of the vma (vm_area_struct) is very large, mspec allocates
    a large vma_data structure with vmalloc(). But such a vma can be shrunk by
    an munmap(2).  The current driver uses the current size of each vma to
    deduce whether its vma_data structure was allocated by kmalloc() or vmalloc().
    So if the vma was shrunk it appears to have been allocated by kmalloc(),
    and mspec attempts to free it with kfree().  This results in a panic.
    
    This patch avoids the panic (by preserving the type of the allocation) and
    also makes mspec work correctly as the vma is split into pieces by the
    munmap(2)'s.
    
    All vma's derived from such a split vma share the same vma_data structure that
    represents all the pages mapped into this set of vma's.  The mpec driver
    must be made capable of using the right portion of the structure for each
    member vma.  In other words, it must index into the array of page addresses
    using the portion of the array that represents the current vma. This is
    enabled by storing the vma group's vm_start in the vma_data structure.
    
    The shared vma_data's are not protected by mm->mmap_sem in the fork() case
    so the reference count is left as atomic_t.
    
    Signed-off-by: Cliff Wickman <cpw@sgi.com>
    Acked-by: Jes Sorensen <jes@sgi.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  30. rtc: rtc-ds1553.c should use resource_size_t for base address

    Atsushi Nemoto authored Linus Torvalds committed
    Currently the rtc driver, rtc-ds1552.c uses an unsigned long to store the
    base mmio address of the NVRAM/RTC.  This breaks on 32-bit systems with
    larger physical addresses.
    
    Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
    Cc: David Brownell <david-b@pacbell.net>
    Cc: Alessandro Zummo <a.zummo@towertech.it>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  31. @dgibson

    rtc-ds1742.c should use resource_size_t for base address

    dgibson authored Linus Torvalds committed
    Currently the rtc driver, rtc-ds1742.c uses an unsigned long to store the
    base mmio address of the NVRAM/RTC.  This breaks on systems like PowerPC
    440, which is a 32-bit core with 36-bit physical addresses: IO on the
    system, including the RTC, is typically above the 4GB point, and cannot fit
    into an unsigned long.
    
    This patch fixes the problem by replacing the unsigned long with a
    resource_size_t.  Tested on Ebony (PPC440) (with additional patches to
    instantiate the ds1742 platform device appropriately).
    
    Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
    Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
    Cc: Alessandro Zummo <a.zummo@towertech.it>
    Cc: David Brownell <david-b@pacbell.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  32. Fix UTS corruption during clone(CLONE_NEWUTS)

    Alexey Dobriyan authored Linus Torvalds committed
    struct utsname is copied from master one without any exclusion.
    
    Here is sample output from one proggie doing
    
    	sethostname("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
    	sethostname("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
    
    and another
    
    	clone(,, CLONE_NEWUTS, ...)
    	uname()
    
    	hostname = 'aaaaaaaaaaaaaaaaaaaaaaaaabbbbb'
    	hostname = 'bbbaaaaaaaaaaaaaaaaaaaaaaaaaaa'
    	hostname = 'aaaaaaaabbbbbbbbbbbbbbbbbbbbbb'
    	hostname = 'aaaaaaaaaaaaaaaaaaaaaaaaaabbbb'
    	hostname = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaabb'
    	hostname = 'aaabbbbbbbbbbbbbbbbbbbbbbbbbbb'
    	hostname = 'bbbbbbbbbbbbbbbbaaaaaaaaaaaaaa'
    
    Hostname is sometimes corrupted.
    
    Yes, even _the_ simplest namespace activity had bug in it. :-(
    
    Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
    Acked-by: Serge Hallyn <serue@us.ibm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  33. Fix failure to resume from initrds

    Nigel Cunningham authored Linus Torvalds committed
    Commit 8314418 (Freezer: make kernel
    threads nonfreezable by default) breaks freezing when attempting to resume
    from an initrd, because the init (which is freezeable) spins while waiting
    for another thread to run /linuxrc, but doesn't check whether it has been
    told to enter the refrigerator.  The original patch replaced a call to
    try_to_freeze() with a call to yield().  I believe a simple reversion is
    wrong because if !CONFIG_PM_SLEEP, try_to_freeze() is a noop.  It should
    still yield.
    
    Signed-off-by: Nigel Cunningham <nigel@nigel.suspend2.net>
    Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
    Acked-by: Pavel Machek <pavel@ucw.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  34. uml: use correct type in BLKGETSIZE ioctl

    Nicolas George authored Linus Torvalds committed
    I found a type mismatch in UML that makes host block devices unusable as ubd
    devices on x86_64 and other 64 bits systems (segfault of the mm subsystem):
    
    In block/ioctl.c, the following lines show that the BLKGETSIZE ioctl expects
    a pointer to a long:
    
    	case BLKGETSIZE:
    		if ((bdev->bd_inode->i_size >> 9) > ~0UL)
    			return -EFBIG;
    		return put_ulong(arg, bdev->bd_inode->i_size >> 9);
    
    In arch/um/os-Linux/file.c, os_file_size calls it with an int.
    
    The ioctl_list man page should be fixed as well.
    
    Cc: Jeff Dike <jdike@addtoit.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  35. Fix "Fix DAC960 driver on machines which don't support 64-bit DMA"

    Andrew Morton authored Linus Torvalds committed
    sparc32:
    
    drivers/block/DAC960.c: In function 'DAC960_V1_EnableMemoryMailboxInterface':
    drivers/block/DAC960.c:1168: error: 'DMA_32BIT_MASK' undeclared (first use in this function)
    drivers/block/DAC960.c:1168: error: (Each undeclared identifier is reported only
    
    Cc: <dac@conglom-o.org>
    Cc: <stable@kernel.org>
    Cc: Alessandro Polverini <alex@nibbles.it>
    Cc: Jeff Garzik <jeff@garzik.org>
    Cc: Matthew Wilcox <matthew@wil.cx>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Something went wrong with that request. Please try again.