1. 18 7月, 2009 5 次提交
  2. 17 7月, 2009 3 次提交
  3. 15 7月, 2009 3 次提交
  4. 13 7月, 2009 6 次提交
    • L
      tracing/events: Move TRACE_SYSTEM outside of include guard · d0b6e04a
      Li Zefan 提交于
      If TRACE_INCLDUE_FILE is defined, <trace/events/TRACE_INCLUDE_FILE.h>
      will be included and compiled, otherwise it will be
      <trace/events/TRACE_SYSTEM.h>
      
      So TRACE_SYSTEM should be defined outside of #if proctection,
      just like TRACE_INCLUDE_FILE.
      
      Imaging this scenario:
      
       #include <trace/events/foo.h>
          -> TRACE_SYSTEM == foo
       ...
       #include <trace/events/bar.h>
          -> TRACE_SYSTEM == bar
       ...
       #define CREATE_TRACE_POINTS
       #include <trace/events/foo.h>
          -> TRACE_SYSTEM == bar !!!
      
      and then bar.h will be included and compiled.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4A5A9CF1.2010007@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d0b6e04a
    • R
      USB: usb.h: fix kernel-doc notation · e376bbbb
      Randy Dunlap 提交于
      Fix usb.h kernel-doc warnings:
      
      Warning(include/linux/usb.h:918): Excess struct/union/enum/typedef member 'nodename' description in 'usb_device_driver'
      Warning(include/linux/usb.h:939): No description found for parameter 'nodename'
      Warning(include/linux/usb.h:1219): No description found for parameter 'sg'
      Warning(include/linux/usb.h:1219): No description found for parameter 'num_sgs'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e376bbbb
    • G
      Revert "USB: Add Intel Langwell USB OTG Transceiver Drive" · 1a74826f
      Greg Kroah-Hartman 提交于
      This reverts commit 453f7755.
      
      The driver should not have been accepted as the MSRT code is not
      in the main kernel yet, which this depends on.
      
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Hao Wu <hao.wu@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1a74826f
    • K
      Driver Core: remove BUS_ID_SIZE · 4ead0a2b
      Kay Sievers 提交于
      The name size limit is gone from the driver-core, this is
      the removal of the last left-over.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4ead0a2b
    • A
      headers: smp_lock.h redux · 405f5571
      Alexey Dobriyan 提交于
      * Remove smp_lock.h from files which don't need it (including some headers!)
      * Add smp_lock.h to files which do need it
      * Make smp_lock.h include conditional in hardirq.h
        It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT
      
        This will make hardirq.h inclusion cheaper for every PREEMPT=n config
        (which includes allmodconfig/allyesconfig, BTW)
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      405f5571
    • J
      personality: fix PER_CLEAR_ON_SETID · f9fabcb5
      Julien Tinnes 提交于
      We have found that the current PER_CLEAR_ON_SETID mask on Linux doesn't
      include neither ADDR_COMPAT_LAYOUT, nor MMAP_PAGE_ZERO.
      
      The current mask is READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE.
      
      We believe it is important to add MMAP_PAGE_ZERO, because by using this
      personality it is possible to have the first page mapped inside a
      process running as setuid root.  This could be used in those scenarios:
      
       - Exploiting a NULL pointer dereference issue in a setuid root binary
       - Bypassing the mmap_min_addr restrictions of the Linux kernel: by
         running a setuid binary that would drop privileges before giving us
         control back (for instance by loading a user-supplied library), we
         could get the first page mapped in a process we control.  By further
         using mremap and mprotect on this mapping, we can then completely
         bypass the mmap_min_addr restrictions.
      
      Less importantly, we believe ADDR_COMPAT_LAYOUT should also be added
      since on x86 32bits it will in practice disable most of the address
      space layout randomization (only the stack will remain randomized).
      Signed-off-by: NJulien Tinnes <jt@cr0.org>
      Signed-off-by: NTavis Ormandy <taviso@sdf.lonestar.org>
      Cc: stable@kernel.org
      Acked-by: NChristoph Hellwig <hch@infradead.org>
      Acked-by: NKees Cook <kees@ubuntu.com>
      Acked-by: NEugene Teo <eugene@redhat.com>
      [ Shortened lines and fixed whitespace as per Christophs' suggestion ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f9fabcb5
  5. 12 7月, 2009 1 次提交
  6. 11 7月, 2009 6 次提交
  7. 10 7月, 2009 3 次提交
    • T
      hrtimer: Fix migration expiry check · 6ff7041d
      Thomas Gleixner 提交于
      The timer migration expiry check should prevent the migration of a
      timer to another CPU when the timer expires before the next event is
      scheduled on the other CPU. Migrating the timer might delay it because
      we can not reprogram the clock event device on the other CPU. But the
      code implementing that check has two flaws:
      
      - for !HIGHRES the check compares the expiry value with the clock
        events device expiry value which is wrong for CLOCK_REALTIME based
        timers.
      
      - the check is racy. It holds the hrtimer base lock of the target CPU,
        but the clock event device expiry value can be modified
        nevertheless, e.g. by an timer interrupt firing.
      
      The !HIGHRES case is easy to fix as we can enqueue the timer on the
      cpu which was selected by the load balancer. It runs the idle
      balancing code once per jiffy anyway. So the maximum delay for the
      timer is the same as when we keep the tick on the current cpu going.
      
      In the HIGHRES case we can get the next expiry value from the hrtimer
      cpu_base of the target CPU and serialize the update with the cpu_base
      lock. This moves the lock section in hrtimer_interrupt() so we can set
      next_event to KTIME_MAX while we are handling the expired timers and
      set it to the next expiry value after we handled the timers under the
      base lock. While the expired timers are processed timer migration is
      blocked because the expiry time of the timer is always <= KTIME_MAX.
      
      Also remove the now useless clockevents_get_next_event() function.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      6ff7041d
    • J
      memory barrier: adding smp_mb__after_lock · ad462769
      Jiri Olsa 提交于
      Adding smp_mb__after_lock define to be used as a smp_mb call after
      a lock.
      
      Making it nop for x86, since {read|write|spin}_lock() on x86 are
      full memory barriers.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad462769
    • J
      net: adding memory barrier to the poll and receive callbacks · a57de0b4
      Jiri Olsa 提交于
      Adding memory barrier after the poll_wait function, paired with
      receive callbacks. Adding fuctions sock_poll_wait and sk_has_sleeper
      to wrap the memory barrier.
      
      Without the memory barrier, following race can happen.
      The race fires, when following code paths meet, and the tp->rcv_nxt
      and __add_wait_queue updates stay in CPU caches.
      
      CPU1                         CPU2
      
      sys_select                   receive packet
        ...                        ...
        __add_wait_queue           update tp->rcv_nxt
        ...                        ...
        tp->rcv_nxt check          sock_def_readable
        ...                        {
        schedule                      ...
                                      if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
                                              wake_up_interruptible(sk->sk_sleep)
                                      ...
                                   }
      
      If there was no cache the code would work ok, since the wait_queue and
      rcv_nxt are opposit to each other.
      
      Meaning that once tp->rcv_nxt is updated by CPU2, the CPU1 either already
      passed the tp->rcv_nxt check and sleeps, or will get the new value for
      tp->rcv_nxt and will return with new data mask.
      In both cases the process (CPU1) is being added to the wait queue, so the
      waitqueue_active (CPU2) call cannot miss and will wake up CPU1.
      
      The bad case is when the __add_wait_queue changes done by CPU1 stay in its
      cache, and so does the tp->rcv_nxt update on CPU2 side.  The CPU1 will then
      endup calling schedule and sleep forever if there are no more data on the
      socket.
      
      Calls to poll_wait in following modules were ommited:
      	net/bluetooth/af_bluetooth.c
      	net/irda/af_irda.c
      	net/irda/irnet/irnet_ppp.c
      	net/mac80211/rc80211_pid_debugfs.c
      	net/phonet/socket.c
      	net/rds/af_rds.c
      	net/rfkill/core.c
      	net/sunrpc/cache.c
      	net/sunrpc/rpc_pipe.c
      	net/tipc/socket.c
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a57de0b4
  8. 09 7月, 2009 3 次提交
  9. 08 7月, 2009 2 次提交
  10. 07 7月, 2009 3 次提交
    • A
      signals: declare sys_rt_tgsigqueueinfo in syscalls.h · 7afdbf23
      Arnd Bergmann 提交于
      sys_rt_tgsigqueueinfo needs to be declared in linux/syscalls.h so that
      architectures defining the system call table in C can reference it.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      LKML-Reference: <200907071023.44008.arnd@arndb.de>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      7afdbf23
    • 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
  11. 06 7月, 2009 2 次提交
  12. 03 7月, 2009 1 次提交
  13. 01 7月, 2009 2 次提交