1. 11 7月, 2009 1 次提交
  2. 10 7月, 2009 1 次提交
  3. 09 7月, 2009 3 次提交
  4. 07 7月, 2009 2 次提交
    • T
      linux/sysrq.h needs linux/errno.h · 82e3310a
      Tobias Doerffel 提交于
      In include/linux/sysrq.h the constant EINVAL is being used but is undefined
      if include/linux/errno.h is not included before.
      
      Fix this by adding #include <linux/errno.h> at the beginning.
      Signed-off-by: NTobias Doerffel <tobias.doerffel@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      82e3310a
    • H
      elf: fix multithreaded program core dumping on arm · a65e7bfc
      Hui Zhu 提交于
      Fix the multithread program core thread message error.
      
      This issue affects arches with neither has CORE_DUMP_USE_REGSET nor
      ELF_CORE_COPY_TASK_REGS, ARM is one of them.
      
      The thread message of core file is generated in elf_dump_thread_status.
      The register values is set by elf_core_copy_task_regs in this function.
      
      If an arch doesn't define ELF_CORE_COPY_TASK_REGS,
      elf_core_copy_task_regs() will do nothing.  Then the core file will not
      have the register message of thread.
      
      So add elf_core_copy_regs to set regiser values if ELF_CORE_COPY_TASK_REGS
      doesn't define.
      
      The following is how to reproduce this issue:
      
      cat 1.c
      #include <stdio.h>
      #include <pthread.h>
      #include <assert.h>
      
      void td1(void * i)
      {
             while (1)
             {
                     printf ("1\n");
                     sleep (1);
             }
      
             return;
      }
      
      void td2(void * i)
      {
             while (1)
             {
                     printf ("2\n");
                     sleep (1);
             }
      
             return;
      }
      
      int
      main(int argc,char *argv[],char *envp[])
      {
             pthread_t       t1,t2;
      
             pthread_create(&t1, NULL, (void*)td1, NULL);
             pthread_create(&t2, NULL, (void*)td2, NULL);
      
             sleep (10);
      
             assert(0);
      
             return (0);
      }
      arm-xxx-gcc -g -lpthread 1.c -o 1
      copy 1.c and 1 to a arm board.
      Goto this board.
      ulimit -c 1800000
      ./1
      # ./1
      1
      2
      1
      ...
      ...
      1
      1: 1.c:37: main: Assertion `0' failed.
      Aborted (core dumped)
      Then you can get a core file.
      gdb 1 core.xxx
      Without the patch:
      (gdb) info threads
       3 process 909  0x00000000 in ?? ()
       2 process 908  0x00000000 in ?? ()
      * 1 process 907  0x4a6e2238 in raise () from /lib/libc.so.6
      You can found that the pc of 909 and 908 is 0x00000000.
      With the patch:
      (gdb) info threads
       3 process 885  0x4a749974 in nanosleep () from /lib/libc.so.6
       2 process 884  0x4a749974 in nanosleep () from /lib/libc.so.6
      * 1 process 883  0x4a6e2238 in raise () from /lib/libc.so.6
      The pc of 885 and 884 is right.
      Signed-off-by: NHui Zhu <teawater@gmail.com>
      Cc: Amerigo Wang <xiyou.wangcong@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Jakub Jelinek <jakub@redhat.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a65e7bfc
  5. 06 7月, 2009 1 次提交
  6. 03 7月, 2009 1 次提交
  7. 01 7月, 2009 12 次提交
    • J
      block: get rid of queue-private command filter · 018e0446
      Jens Axboe 提交于
      The initial patches to support this through sysfs export were broken
      and have been if 0'ed out in any release. So lets just kill the code
      and reclaim some space in struct request_queue, if anyone would later
      like to fixup the sysfs bits, the git history can easily restore
      the removed bits.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      018e0446
    • M
      block: Create bip slabs with embedded integrity vectors · 7878cba9
      Martin K. Petersen 提交于
      This patch restores stacking ability to the block layer integrity
      infrastructure by creating a set of dedicated bip slabs.  Each bip slab
      has an embedded bio_vec array at the end.  This cuts down on memory
      allocations and also simplifies the code compared to the original bvec
      version.  Only the largest bip slab is backed by a mempool.  The pool is
      contained in the bio_set so stacking drivers can ensure forward
      progress.
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NJens Axboe <axboe@carl.(none)>
      7878cba9
    • H
      usbnet: Remove private stats structure · d9d62f3f
      Herbert Xu 提交于
      Now that nothing uses the private stats structure we can remove it.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9d62f3f
    • K
      fbdev: add mutex for fb_mmap locking · 537a1bf0
      Krzysztof Helt 提交于
      Add a mutex to avoid a circular locking problem between the mm layer
      semaphore and fbdev ioctl mutex through the fb_mmap() call.
      
      Also, add mutex to all places where smem_start and smem_len fields change
      so the mutex inside the fb_mmap() is actually used.  Changing of these
      fields before calling the framebuffer_register() are not mutexed.
      
      This is 2.6.31 material.  It removes one lockdep (fb_mmap() and
      register_framebuffer()) but there is still another one (fb_release() and
      register_framebuffer()).  It also cleans up handling of the smem_start and
      smem_len fields used by mutexed section of the fb_mmap().
      Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      537a1bf0
    • D
      spi: add spi_master flag word · 70d6027f
      David Brownell 提交于
      Add a new spi_master.flags word listing constraints relevant to that
      controller.  Define the first constraint bit: a half duplex restriction.
      Include that constraint in the OMAP1 MicroWire controller driver.
      
      Have the mmc_spi host be the first customer of this flag.  Its coding
      relies heavily on full duplex transfers, so it must fail when the
      underlying controller driver won't perform them.
      
      (The spi_write_then_read routine could use it too: use the
      temporarily-withdrawn full-duplex speedup unless this flag is set, in
      which case the existing code applies.  Similarly, any spi_master
      implementing only SPI_3WIRE should set the flag.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      70d6027f
    • D
      spi: new spi->mode bits · b55f627f
      David Brownell 提交于
      Add two new spi_device.mode bits to accomodate more protocol options, and
      pass them through to usermode drivers:
      
       * SPI_NO_CS ... a second 3-wire variant, where the chipselect
         line is removed instead of a data line; transfers are still
         full duplex.
      
         This obviously has STRONG protocol implications since the
         chipselect transitions can't be used to synchronize state
         transitions with the SPI master.
      
       * SPI_READY ... defines open drain signal that's pulled low
         to pause the clock.  This defines a 5-wire variant (normal
         4-wire SPI plus READY) and two 4-wire variants (READY plus
         each of the 3-wire flavors).
      
         Such hardware flow control can be a big win.  There are ADC
         converters and flash chips that expose READY signals, but not
         many host controllers support it today.
      
      The spi_bitbang code should be changed to use SPI_NO_CS instead of its
      current nonportable hack.  That's a mode most hardware can easily support
      (unlike SPI_READY).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: "Paulraj, Sandeep" <s-paulraj@ti.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b55f627f
    • K
      elf: limit max map count to safe value · 341c87bf
      KAMEZAWA Hiroyuki 提交于
      With ELF, at generating coredump, some more headers other than used
      vmas are added.
      
      When max_map_count == 65536, a core generated by following kinds of
      code can be unreadable because the number of ELF's program header is
      written in 16bit in Ehdr (please see elf.h) and the number overflows.
      
      ==
      	... = mmap(); (munmap, mprotect, etc...)
      	if (failed)
      		abort();
      ==
      
      This can happen in mmap/munmap/mprotect/etc...which calls split_vma().
      
      I think 65536 is not safe as _default_ and reduce it to 65530 is good
      for avoiding unexpected corrupted core.
      
      Anyway, max_map_count can be enlarged by sysctl if a user is brave..
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Jakub Jelinek <jakub@redhat.com>
      Acked-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      341c87bf
    • M
      parport/serial: add support for NetMos 9901 Multi-IO card · c4285b47
      Michael Buesch 提交于
      Add support for the PCI-Express NetMos 9901 Multi-IO card.
      
      0001:06:00.0 Serial controller [0700]: NetMos Technology Device [9710:9901] (prog-if 02 [16550])
              Subsystem: Device [a000:1000]
              Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
              Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
              Latency: 0, Cache Line Size: 64 bytes
              Interrupt: pin A routed to IRQ 65
              Region 0: I/O ports at 0030 [size=8]
              Region 1: Memory at 80105000 (32-bit, non-prefetchable) [size=4K]
              Region 4: Memory at 80104000 (32-bit, non-prefetchable) [size=4K]
              Capabilities: <access denied>
              Kernel driver in use: serial
              Kernel modules: 8250_pci
      
      0001:06:00.1 Serial controller [0700]: NetMos Technology Device [9710:9901] (prog-if 02 [16550])
              Subsystem: Device [a000:1000]
              Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
              Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
              Latency: 0, Cache Line Size: 64 bytes
              Interrupt: pin B routed to IRQ 65
              Region 0: I/O ports at 0020 [size=8]
              Region 1: Memory at 80103000 (32-bit, non-prefetchable) [size=4K]
              Region 4: Memory at 80102000 (32-bit, non-prefetchable) [size=4K]
              Capabilities: <access denied>
              Kernel driver in use: serial
              Kernel modules: 8250_pci
      
      0001:06:00.2 Parallel controller [0701]: NetMos Technology Device [9710:9901] (prog-if 03 [IEEE1284])
              Subsystem: Device [a000:2000]
              Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
              Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
              Latency: 0, Cache Line Size: 64 bytes
              Interrupt: pin C routed to IRQ 65
              Region 0: I/O ports at 0010 [size=8]
              Region 1: I/O ports at <unassigned>
              Region 2: Memory at 80101000 (32-bit, non-prefetchable) [size=4K]
              Region 4: Memory at 80100000 (32-bit, non-prefetchable) [size=4K]
              Capabilities: <access denied>
              Kernel driver in use: parport_pc
              Kernel modules: parport_pc
      
      [   16.760181] PCI parallel port detected: 416c:0100, I/O at 0x812010(0x0), IRQ 65
      [   16.760225] parport0: PC-style at 0x812010, irq 65 [PCSPP,TRISTATE,EPP]
      [   16.851842] serial 0001:06:00.0: enabling device (0004 -> 0007)
      [   16.883776] 0001:06:00.0: ttyS0 at I/O 0x812030 (irq = 65) is a ST16650V2
      [   16.893832] serial 0001:06:00.1: enabling device (0004 -> 0007)
      [   16.926537] 0001:06:00.1: ttyS1 at I/O 0x812020 (irq = 65) is a ST16650V2
      Signed-off-by: NMichael Buesch <mb@bu3sch.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c4285b47
    • T
      alpha: fix percpu build breakage · b01e8dc3
      Tejun Heo 提交于
      alpha percpu access requires custom SHIFT_PERCPU_PTR() definition for
      modules to work around addressing range limitation.  This is done via
      generating inline assembly using C preprocessing which forces the
      assembler to generate external reference.  This happens behind the
      compiler's back and makes the compiler think that static percpu variables
      in modules are unused.
      
      This used to be worked around by using __unused attribute for percpu
      variables which prevent the compiler from omitting the variable; however,
      recent declare/definition attribute unification change broke this as
      __used can't be used for declaration.  Also, in the process,
      PER_CPU_ATTRIBUTES definition in alpha percpu.h got broken.
      
      This patch adds PER_CPU_DEF_ATTRIBUTES which is only used for definitions
      and make alpha use it to add __used for percpu variables in modules.  This
      also fixes the PER_CPU_ATTRIBUTES double definition bug.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Tested-by: Nmaximilian attems <max@stro.at>
      Acked-by: NIvan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b01e8dc3
    • D
      eventfd: revised interface and cleanups · 13389010
      Davide Libenzi 提交于
      Change the eventfd interface to de-couple the eventfd memory context, from
      the file pointer instance.
      
      Without such change, there is no clean way to racely free handle the
      POLLHUP event sent when the last instance of the file* goes away.  Also,
      now the internal eventfd APIs are using the eventfd context instead of the
      file*.
      
      This patch is required by KVM's IRQfd code, which is still under
      development.
      Signed-off-by: NDavide Libenzi <davidel@xmailserver.org>
      Cc: Gregory Haskins <ghaskins@novell.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Benjamin LaHaise <bcrl@kvack.org>
      Cc: Avi Kivity <avi@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      13389010
    • J
      fuse: invalidation reverse calls · 3b463ae0
      John Muir 提交于
      Add notification messages that allow the filesystem to invalidate VFS
      caches.
      
      Two notifications are added:
      
       1) inode invalidation
      
         - invalidate cached attributes
         - invalidate a range of pages in the page cache (this is optional)
      
       2) dentry invalidation
      
         - try to invalidate a subtree in the dentry cache
      
      Care must be taken while accessing the 'struct super_block' for the
      mount, as it can go away while an invalidation is in progress.  To
      prevent this, introduce a rw-semaphore, that is taken for read during
      the invalidation and taken for write in the ->kill_sb callback.
      
      Cc: Csaba Henk <csaba@gluster.com>
      Cc: Anand Avati <avati@zresearch.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      3b463ae0
    • M
      fuse: allow umask processing in userspace · e0a43ddc
      Miklos Szeredi 提交于
      This patch lets filesystems handle masking the file mode on creation.
      This is needed if filesystem is using ACLs.
      
       - The CREATE, MKDIR and MKNOD requests are extended with a "umask"
         parameter.
      
       - A new FUSE_DONT_MASK flag is added to the INIT request/reply.  With
         this the filesystem may request that the create mode is not masked.
      
      CC: Jean-Pierre André <jean-pierre.andre@wanadoo.fr>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      e0a43ddc
  8. 30 6月, 2009 3 次提交
  9. 29 6月, 2009 5 次提交
  10. 28 6月, 2009 1 次提交
  11. 27 6月, 2009 2 次提交
  12. 26 6月, 2009 8 次提交