1. 25 2月, 2009 1 次提交
  2. 23 2月, 2009 1 次提交
  3. 22 2月, 2009 1 次提交
  4. 21 2月, 2009 3 次提交
    • M
      8250: fix boot hang with serial console when using with Serial Over Lan port · b6adea33
      Mauro Carvalho Chehab 提交于
      Intel 8257x Ethernet boards have a feature called Serial Over Lan.
      
      This feature works by emulating a serial port, and it is detected by
      kernel as a normal 8250 port.  However, this emulation is not perfect, as
      also noticed on changeset 7500b1f6.
      
      Before this patch, the kernel were trying to check if the serial TX is
      capable of work using IRQ's.
      
      This were done with a code similar this:
      
              serial_outp(up, UART_IER, UART_IER_THRI);
              lsr = serial_in(up, UART_LSR);
              iir = serial_in(up, UART_IIR);
              serial_outp(up, UART_IER, 0);
      
              if (lsr & UART_LSR_TEMT && iir & UART_IIR_NO_INT)
      		up->bugs |= UART_BUG_TXEN;
      
      This works fine for other 8250 ports, but, on 8250-emulated SoL port, the
      chip is a little lazy to down UART_IIR_NO_INT at UART_IIR register.
      
      Due to that, UART_BUG_TXEN is sometimes enabled.  However, as TX IRQ keeps
      working, and the TX polling is now enabled, the driver miss-interprets the
      IRQ received later, hanging up the machine until a key is pressed at the
      serial console.
      
      This is the 6 version of this patch.  Previous versions were trying to
      introduce a large enough delay between serial_outp and serial_in(up,
      UART_IIR), but not taking forever.  However, the needed delay couldn't be
      safely determined.
      
      At the experimental tests, a delay of 1us solves most of the cases, but
      still hangs sometimes.  Increasing the delay to 5us was better, but still
      doesn't solve.  A very high delay of 50 ms seemed to work every time.
      
      However, poking around with delays and pray for it to be enough doesn't
      seem to be a good approach, even for a quirk.
      
      So, instead of playing with random large arbitrary delays, let's just
      disable UART_BUG_TXEN for all SoL ports.
      
      [akpm@linux-foundation.org: fix warnings]
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b6adea33
    • M
      spi_bitbang: add more lowlevel function documentation · 01b24fee
      Michael Buesch 提交于
      This adds more documentation of the lowlevel API to avoid future bugs.
      Signed-off-by: NMichael Buesch <mb@bu3sch.de>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      01b24fee
    • J
      slab: introduce kzfree() · 3ef0e5ba
      Johannes Weiner 提交于
      kzfree() is a wrapper for kfree() that additionally zeroes the underlying
      memory before releasing it to the slab allocator.
      
      Currently there is code which memset()s the memory region of an object
      before releasing it back to the slab allocator to make sure
      security-sensitive data are really zeroed out after use.
      
      These callsites can then just use kzfree() which saves some code, makes
      users greppable and allows for a stupid destructor that isn't necessarily
      aware of the actual object size.
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Reviewed-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Cc: Matt Mackall <mpm@selenic.com>
      Acked-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Nick Piggin <npiggin@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3ef0e5ba
  5. 19 2月, 2009 11 次提交
  6. 18 2月, 2009 3 次提交
  7. 15 2月, 2009 2 次提交
  8. 12 2月, 2009 2 次提交
    • H
      syscall define: fix uml compile bug · 6c597963
      Heiko Carstens 提交于
      With the new system call defines we get this on uml:
      
      arch/um/sys-i386/built-in.o: In function `sys_call_table':
      (.rodata+0x308): undefined reference to `sys_sigprocmask'
      
      Reason for this is that uml passes the preprocessor option
      -Dsigprocmask=kernel_sigprocmask to gcc when compiling the kernel.
      This causes SYSCALL_DEFINE3(sigprocmask, ...) to be expanded to
      SYSCALL_DEFINEx(3, kernel_sigprocmask, ...) and finally to a system
      call named sys_kernel_sigprocmask.  However sys_sigprocmask is missing
      because of this.
      
      To avoid macro expansion for the system call name just concatenate the
      name at first define instead of carrying it through severel levels.
      This was pointed out by Al Viro.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Reviewed-by: NWANG Cong <wangcong@zeuux.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6c597963
    • L
      cgroups: fix lockdep subclasses overflow · cfebe563
      Li Zefan 提交于
      I enabled all cgroup subsystems when compiling kernel, and then:
       # mount -t cgroup -o net_cls xxx /mnt
       # mkdir /mnt/0
      
      This showed up immediately:
       BUG: MAX_LOCKDEP_SUBCLASSES too low!
       turning off the locking correctness validator.
      
      It's caused by the cgroup hierarchy lock:
      	for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
      		struct cgroup_subsys *ss = subsys[i];
      		if (ss->root == root)
      			mutex_lock_nested(&ss->hierarchy_mutex, i);
      	}
      
      Now we have 9 cgroup subsystems, and the above 'i' for net_cls is 8, but
      MAX_LOCKDEP_SUBCLASSES is 8.
      
      This patch uses different lockdep keys for different subsystems.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NPaul Menage <menage@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cfebe563
  9. 11 2月, 2009 7 次提交
  10. 10 2月, 2009 2 次提交
  11. 09 2月, 2009 1 次提交
  12. 08 2月, 2009 1 次提交
  13. 07 2月, 2009 1 次提交
  14. 06 2月, 2009 4 次提交
    • I
      timers: split process wide cpu clocks/timers, remove spurious warning · 7d8e23df
      Ingo Molnar 提交于
      Mike Galbraith reported that the new warning in thread_group_cputimer()
      triggers en masse with Amarok running.
      
      Oleg Nesterov observed:
      
        Can't fastpath_timer_check()->thread_group_cputimer() have the
        false warning too? Suppose we had the timer, then posix_cpu_timer_del()
        removes this timer, but task_cputime_zero(&sig->cputime_expires) still
        not true.
      
      Remove the spurious debug warning.
      Reported-by: NMike Galbraith <efault@gmx.de>
      Explained-by: NOleg Nesterov <oleg@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7d8e23df
    • J
      wait: prevent exclusive waiter starvation · 777c6c5f
      Johannes Weiner 提交于
      With exclusive waiters, every process woken up through the wait queue must
      ensure that the next waiter down the line is woken when it has finished.
      
      Interruptible waiters don't do that when aborting due to a signal.  And if
      an aborting waiter is concurrently woken up through the waitqueue, noone
      will ever wake up the next waiter.
      
      This has been observed with __wait_on_bit_lock() used by
      lock_page_killable(): the first contender on the queue was aborting when
      the actual lock holder woke it up concurrently.  The aborted contender
      didn't acquire the lock and therefor never did an unlock followed by
      waking up the next waiter.
      
      Add abort_exclusive_wait() which removes the process' wait descriptor from
      the waitqueue, iff still queued, or wakes up the next waiter otherwise.
      It does so under the waitqueue lock.  Racing with a wake up means the
      aborting process is either already woken (removed from the queue) and will
      wake up the next waiter, or it will remove itself from the queue and the
      concurrent wake up will apply to the next waiter after it.
      
      Use abort_exclusive_wait() in __wait_event_interruptible_exclusive() and
      __wait_on_bit_lock() when they were interrupted by other means than a wake
      up through the queue.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Reported-by: NChris Mason <chris.mason@oracle.com>
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Mentored-by: NOleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Chuck Lever <cel@citi.umich.edu>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: <stable@kernel.org>		["after some testing"]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      777c6c5f
    • A
      fbmem: don't call copy_from/to_user() with mutex held · 1f5e31d7
      Andrea Righi 提交于
      Avoid calling copy_from/to_user() with fb_info->lock mutex held in fbmem
      ioctl().
      
      fb_mmap() is called under mm->mmap_sem (A) held, that also acquires
      fb_info->lock (B); fb_ioctl() takes fb_info->lock (B) and does
      copy_from/to_user() that might acquire mm->mmap_sem (A), causing a
      deadlock.
      
      NOTE: it doesn't push down the fb_info->lock in each own driver's
      fb_ioctl(), so there are still potential deadlocks elsewhere.
      Signed-off-by: NAndrea Righi <righi.andrea@gmail.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Johannes Weiner <hannes@saeurebad.de>
      Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
      Cc: Harvey Harrison <harvey.harrison@gmail.com>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1f5e31d7
    • P
      generic swap(): don't return a value from swap() · ac7b9004
      Peter Zijlstra 提交于
      The swap() macro is accidentally retuning the value of its first argument.
      Change it into a doesn't-return-anything macro before someone goes and
      relies upon this behaviour.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Wu Fengguang <wfg@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac7b9004