1. 17 7月, 2009 1 次提交
  2. 15 7月, 2009 2 次提交
  3. 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
  4. 12 7月, 2009 1 次提交
  5. 11 7月, 2009 6 次提交
  6. 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
  7. 09 7月, 2009 3 次提交
  8. 08 7月, 2009 2 次提交
  9. 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
  10. 06 7月, 2009 2 次提交
  11. 03 7月, 2009 1 次提交
  12. 01 7月, 2009 10 次提交
    • 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
    • H
      gcov: fix __ctors_start alignment · 2a2325e6
      Heiko Carstens 提交于
      The ctors section for each object file is eight byte aligned (on 64 bit).
      However the __ctors_start symbol starts at an arbitrary address dependent
      on the size of the previous sections.
      
      Therefore the linker may add some zeroes after __ctors_start to make sure
      the ctors contents are properly aligned.  However the extra zeroes at the
      beginning aren't expected by the code.  When walking the functions
      pointers contained in there and extra zeroes are added this may result in
      random jumps.  So make sure that the __ctors_start symbol is always
      aligned as well.
      
      Fixes this crash on an allyesconfig on s390:
      
      [    0.582482] Kernel BUG at 0000000000000012 [verbose debug info unavailable]
      [    0.582489] illegal operation: 0001 [#1] SMP DEBUG_PAGEALLOC
      [    0.582496] Modules linked in:
      [    0.582501] CPU: 0 Tainted: G        W  2.6.31-rc1-dirty #273
      [    0.582506] Process swapper (pid: 1, task: 000000003f218000, ksp: 000000003f2238e8)
      [    0.582510] Krnl PSW : 0704200180000000 0000000000000012 (0x12)
      [    0.582518]            R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
      [    0.582524] Krnl GPRS: 0000000000036727 0000000000000010 0000000000000001 0000000000000001
      [    0.582529]            00000000001dfefa 0000000000000000 0000000000000000 0000000000000040
      [    0.582534]            0000000001fff0f0 0000000001790628 0000000002296048 0000000002296048
      [    0.582540]            00000000020c438e 0000000001786000 0000000002014a66 000000003f223e60
      [    0.582553] Krnl Code:>0000000000000012: 0000                unknown
      [    0.582559]            0000000000000014: 0000                unknown
      [    0.582564]            0000000000000016: 0000                unknown
      [    0.582570]            0000000000000018: 0000                unknown
      [    0.582575]            000000000000001a: 0000                unknown
      [    0.582580]            000000000000001c: 0000                unknown
      [    0.582585]            000000000000001e: 0000                unknown
      [    0.582591]            0000000000000020: 0000                unknown
      [    0.582596] Call Trace:
      [    0.582599] ([<0000000002014a46>] kernel_init+0x622/0x7a0)
      [    0.582607]  [<0000000000113e22>] kernel_thread_starter+0x6/0xc
      [    0.582615]  [<0000000000113e1c>] kernel_thread_starter+0x0/0xc
      [    0.582621] INFO: lockdep is turned off.
      [    0.582624] Last Breaking-Event-Address:
      [    0.582627]  [<0000000002014a64>] kernel_init+0x640/0x7a0
      
      Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2a2325e6