1. 29 Nov, 2007 12 commits
    • Oleg Nesterov's avatar
      wait_task_stopped(): don't use task_pid_nr_ns() lockless · c8950783
      Oleg Nesterov authored
      wait_task_stopped(WNOWAIT) does task_pid_nr_ns() without tasklist/rcu lock,
      we can read an already freed memory.  Use the cached pid_t value.
      Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
      Looks-good-to: Roland McGrath <roland@redhat.com>
      Acked-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c8950783
    • Alexey Dobriyan's avatar
      proc: fix NULL ->i_fop oops · c2319540
      Alexey Dobriyan authored
      proc_kill_inodes() can clear ->i_fop in the middle of vfs_readdir resulting in
      NULL dereference during "file->f_op->readdir(file, buf, filler)".
      
      The solution is to remove proc_kill_inodes() completely:
      
      a) we don't have tricky modules implementing their tricky readdir hooks which
         could keeping this revoke from hell.
      
      b) In a situation when module is gone but PDE still alive, standard
         readdir will return only "." and "..", because pde->next was cleared by
         remove_proc_entry().
      
      c) the race proc_kill_inode() destined to prevent is not completely
         fixed, just race window made smaller, because vfs_readdir() is run
         without sb_lock held and without file_list_lock held.  Effectively,
         ->i_fop is cleared at random moment, which can't fix properly anything.
      
      BUG: unable to handle kernel NULL pointer dereference at virtual address 00000018
      printing eip: c1061205 *pdpt = 0000000005b22001 *pde = 0000000000000000
      Oops: 0000 [#1] PREEMPT SMP
      Modules linked in: foo af_packet ipv6 cpufreq_ondemand loop serio_raw sr_mod k8temp cdrom hwmon amd_rng
      Pid: 2033, comm: find Not tainted (2.6.24-rc1-b1d08ac0 #2)
      EIP: 0060:[<c1061205>] EFLAGS: 00010246 CPU: 0
      EIP is at vfs_readdir+0x47/0x74
      EAX: c6b6a780 EBX: 00000000 ECX: c1061040 EDX: c5decf94
      ESI: c6b6a780 EDI: fffffffe EBP: c9797c54 ESP: c5decf78
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      Process find (pid: 2033, ti=c5dec000 task=c64bba90 task.ti=c5dec000)
      Stack: c5decf94 c1061040 fffffff7 0805ffbc 00000000 c6b6a780 c1061295 0805ffbc
             00000000 00000400 00000000 00000004 0805ffbc 4588eff4 c5dec000 c10026ba
             00000004 0805ffbc 00000400 0805ffbc 4588eff4 bfdc6c70 000000dc 0000007b
      Call Trace:
       [<c1061040>] filldir64+0x0/0xc5
       [<c1061295>] sys_getdents64+0x63/0xa5
       [<c10026ba>] sysenter_past_esp+0x5f/0x85
       =======================
      Code: 49 83 78 18 00 74 43 8d 6b 74 bf fe ff ff ff 89 e8 e8 b8 c0 12 00 f6 83 2c 01 00 00 10 75 22 8b 5e 10 8b 4c 24 04 89 f0 8b 14 24 <ff> 53 18 f6 46 1a 04 89 c7 75 0b 8b 56 0c 8b 46 08 e8 c8 66 00
      EIP: [<c1061205>] vfs_readdir+0x47/0x74 SS:ESP 0068:c5decf78
      
      hch: "Nice, getting rid of this is a very good step formwards.
            Unfortunately we have another copy of this junk in
            security/selinux/selinuxfs.c:sel_remove_entries() which would need the
            same treatment."
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@sw.ru>
      Acked-by: default avatarChristoph Hellwig <hch@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: James Morris <jmorris@namei.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c2319540
    • Zhao Yakui's avatar
      PNP: increase the maximum number of resources · a7839e96
      Zhao Yakui authored
      On some systems the number of resources(IO,MEM) returnedy by PNP device is
      greater than the PNP constant, for example motherboard devices.  It brings
      that some resources can't be reserved and resource confilicts.  This will
      cause PCI resources are assigned wrongly in some systems, and cause hang.
      This is a regression since we deleted ACPI motherboard driver and use PNP
      system driver.
      
      [akpm@linux-foundation.org: fix text and coding-style a bit]
      Signed-off-by: default avatarLi Shaohua <shaohua.li@intel.com>
      Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Thomas Renninger <trenn@suse.de>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a7839e96
    • Jeremy Fitzhardinge's avatar
      xen: mask _PAGE_PCD from ptes · 2c80b01b
      Jeremy Fitzhardinge authored
      _PAGE_PCD maps a page with caching disabled, which is typically used for
      mapping harware registers.  Xen never allows it to be set on a mapping, and
      unprivileged guests never need it since they can't see the real underlying
      hardware.  However, some uncached mappings are made early when probing the
      (non-existent) APIC, and its OK to mask off the PCD flag in these cases.
      
      This became necessary because Xen started checking for this bit, rather
      than silently masking it off.
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2c80b01b
    • WANG Cong's avatar
      UML: build fix · c06869d6
      WANG Cong authored
      include/asm-um/arch points to the non-existed include/asm-i386 directory.
      Signed-off-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
      Cc: Jeff Dike <jdike@karaya.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c06869d6
    • Mel Gorman's avatar
      Fix boot problem with iSeries lacking hugepage support · ba72cb8c
      Mel Gorman authored
      Ordinarily the size of a pageblock is determined at compile-time based on the
      hugepage size. On PPC64, the hugepage size is determined at runtime based on
      what is supported by the machine. With legacy machines such as iSeries that
      do not support hugepages, HPAGE_SHIFT is 0. This results in pageblock_order
      being set to -PAGE_SHIFT and a crash results shortly afterwards.
      
      This patch adds a function to select a sensible value for pageblock order by
      default when HUGETLB_PAGE_SIZE_VARIABLE is set. It checks that HPAGE_SHIFT
      is a sensible value before using the hugepage size; if it is not MAX_ORDER-1
      is used.
      
      This is a fix for 2.6.24.
      
      Credit goes to Stephen Rothwell for identifying the bug and testing candidate
      patches.  Additional credit goes to Andy Whitcroft for spotting a problem
      with respects to IA-64 before releasing. Additional credit to David Gibson
      for testing with the libhugetlbfs test suite.
      Signed-off-by: default avatarMel Gorman <mel@csn.ul.ie>
      Tested-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ba72cb8c
    • Geert Uytterhoeven's avatar
      ps3fb: video memory size cleanups · ee592a5b
      Geert Uytterhoeven authored
      - Limit video memory size to avoid crossing a 256 MiB boundary in IOIF space.
      - Pass the actual amount of video memory used to lv1_gpu_memory_allocate().
      Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ee592a5b
    • Geert Uytterhoeven's avatar
      ps3: prefix all ps3-specific kernel modules with `ps3-' · 24828550
      Geert Uytterhoeven authored
      - vuart.ko -> ps3-vuart.ko
      - sys-manager.ko -> ps3-sys-manager.ko
      Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      24828550
    • David Brownell's avatar
      atmel_spi: label GPIOs better · 65f97a56
      David Brownell authored
      Make the atmel_spi driver label GPIOs according to the device for which
      they're acting as a chipselect.  This way the debugfs dump of gpio state is
      more informative.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      65f97a56
    • Andy Whitcroft's avatar
      update checkpatch.pl to version 0.12 · 8905a67c
      Andy Whitcroft authored
      This version brings a new terse output mode as well as many improvements to
      the unary detection and bare type regcognition.  It also brings the usual
      updates for false positives, though these seem to be slowing markedly
      now that the unary detector is no longer just putting its finger in the
      air and guessing.  Of note:
      
        - new --terse mode producing a single line per report
        - loosening of the block brace checks
        - new checks for enum/union/struch brace placements
        - hugely expanded "bare type" detection
        - checks for inline usage
        - better handling of already open comment blocks
        - handle patches which introduce or remove lines without newlines
      
      Andy Whitcroft (19):
            Version: 0.12
            style fixes as spotted by checkpatch
            add a --terse options of a single line of output per report
            block brace checks should only apply for single line blocks
            all new bare type detector
            check spacing for open braces with enum, union and struct
            check for LINUX_VERSION_CODE
            macros definition bracketing checks need to ignore -ve context
            clean up the mail-back mode, -q et al
            expand possible type matching to declarations
            allow const and sparse annotations on possible types
            handle possible types as regular types everywhere
            prefer plain inline over __inline__ and __inline
            all new open comment detection
            fix up conditional extraction for if assignment checks
            add const to the possible type matcher
            unary checks: a for loop is a conditional too
            possible types: detect function pointer definitions
            handle missind newlines at end of file, report addition
      Signed-off-by: default avatarAndy Whitcroft <apw@shadowen.org>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8905a67c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · bb0851ff
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (25 commits)
        USB: s3c2410 gadget: ensure vbus pin in input mode during read
        USB: s3c2410 gadget: allow sharing of vbus irq
        USB: s3c2410 gadget: Header move fixups
        USB: usb-storage: unusual_devs entry for JetFlash TS1GJF2A
        USB: fix up EHCI startup synchronization
        USB: make the microtek driver and HAL cooperate
        USB: uevent environment key fix
        USB: keep track of whether interface sysfs files exist
        USB: sierra: new product id
        USB HCD: avoid duplicate local_irq_disable()
        USB: mailing lists have changed
        USB: remove USB HUB entry from MAINTAINERS
        USB: fix directory references in usb/README
        USB: add support for an older firmware revision for the Nikon D200
        USB: FIx locks and urb->status in adutux (updated)
        USB: power-management documenation update
        USB: Fix signr comment in usbdevice_fs.h
        usbserial: fix inconsistent lock state
        USB: fix usbled disconnect read race #2
        USB: free memory when writing fails in usb/serial/mos7840.c
        ...
      bb0851ff
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6 · 34f2c1c3
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6:
        pci hotplug: kernel-doc fixes
        pci-aer: fix kernel-doc mistakes
        PCI: drivers/pci/pci-sysfs.c: Add missing pci_dev_put
        PCI: pcie portdriver: initialize returned value
      34f2c1c3
  2. 28 Nov, 2007 28 commits