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. 20 2月, 2009 3 次提交
  6. 19 2月, 2009 11 次提交
  7. 18 2月, 2009 4 次提交
  8. 15 2月, 2009 2 次提交
  9. 13 2月, 2009 1 次提交
    • A
      net: don't use in_atomic() in gfp_any() · 99709372
      Andrew Morton 提交于
      The problem is that in_atomic() will return false inside spinlocks if
      CONFIG_PREEMPT=n.  This will lead to deadlockable GFP_KERNEL allocations
      from spinlocked regions.
      
      Secondly, if CONFIG_PREEMPT=y, this bug solves itself because networking
      will instead use GFP_ATOMIC from this callsite.  Hence we won't get the
      might_sleep() debugging warnings which would have informed us of the buggy
      callsites.
      
      Solve both these problems by switching to in_interrupt().  Now, if someone
      runs a gfp_any() allocation from inside spinlock we will get the warning
      if CONFIG_PREEMPT=y.
      
      I reviewed all callsites and most of them were too complex for my little
      brain and none of them documented their interface requirements.  I have no
      idea what this patch will do.
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      99709372
  10. 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
  11. 11 2月, 2009 7 次提交
  12. 10 2月, 2009 2 次提交
  13. 09 2月, 2009 1 次提交
  14. 08 2月, 2009 1 次提交