1. 11 Nov, 2009 7 commits
  2. 18 Sep, 2009 1 commit
  3. 23 Sep, 2009 1 commit
  4. 12 Nov, 2009 3 commits
  5. 14 Oct, 2009 1 commit
  6. 29 Sep, 2009 1 commit
  7. 10 Nov, 2009 6 commits
    • Alexey Dobriyan's avatar
      It's easy to lose useful DEBUG_BUGVERBOSE by switching EMBEDDED left and right. · 201449ca
      Alexey Dobriyan authored
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      201449ca
    • Andrew Morton's avatar
      s/_rl/_ratelimited/g · 2a3f4011
      Andrew Morton authored
      Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Joe Perches <joe@perches.com>
      Cc: Naohiro Ooiwa <nooiwa@miraclelinux.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      2a3f4011
    • Andrew Morton's avatar
      ERROR: code indent should use tabs where possible · 2abe484b
      Andrew Morton authored
      #42: FILE: include/linux/kernel.h:427:
      +        printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)$
      
      ERROR: code indent should use tabs where possible
      #44: FILE: include/linux/kernel.h:429:
      +        printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)$
      
      ERROR: code indent should use tabs where possible
      #46: FILE: include/linux/kernel.h:431:
      +        printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)$
      
      ERROR: code indent should use tabs where possible
      #48: FILE: include/linux/kernel.h:433:
      +        printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)$
      
      ERROR: code indent should use tabs where possible
      #50: FILE: include/linux/kernel.h:435:
      +        printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)$
      
      ERROR: code indent should use tabs where possible
      #52: FILE: include/linux/kernel.h:437:
      +        printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)$
      
      ERROR: code indent should use tabs where possible
      #54: FILE: include/linux/kernel.h:439:
      +        printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)$
      
      total: 7 errors, 0 warnings, 50 lines checked
      
      ./patches/kernelh-add-printk_ratelimited-and-pr_level_rl.patch has style problems, please review.  If any of these errors
      are false positives report them to the maintainer, see
      CHECKPATCH in MAINTAINERS.
      
      Please run checkpatch prior to sending patches
      
      Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Joe Perches <joe@perches.com>
      Cc: Naohiro Ooiwa <nooiwa@miraclelinux.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      2abe484b
    • Joe Perches's avatar
      Add a printk_ratelimited statement expression macro that uses a per-call · a9dfb9d7
      Joe Perches authored
      ratelimit_state so that multiple subsystems output messages are not
      suppressed by a global __ratelimit state.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Cc: Naohiro Ooiwa <nooiwa@miraclelinux.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      a9dfb9d7
    • Helge Deller's avatar
      The PR_GET_ENDIAN and PR_SET_ENDIAN prctl() calls have been implemented to · 5f8787b8
      Helge Deller authored
      allow to switch processes at runtime from big-endian to little-endian mode
      (and vice versa) on PowerPC processors.  Since the other architectures
      don't support this feature, they currently will just fail and return
      -EINVAL.
      
      This patch adds just minimal overhead and implements the PR_GET_ENDIAN
      call for all other architectures by returning the native endianess of the
      architecture.  Furthermore, calling prctl(PR_SET_ENDIAN) with the native
      endianess of the architecture will succeed, while trying to set another
      (not-supported) endianess, will fail.
      
      The patch can be tested with the following program:
      
      #include <stdio.h>
      #include <linux/prctl.h>
      
      int main(int argc, char **argv)
      {
      	int endian, ret;
      
      	ret = prctl(PR_GET_ENDIAN, &endian);
      	if (ret)
      		perror("prctl(PR_GET_ENDIAN) not implemented");
      	printf("current process/machine is running in %s endian mode (%d)\n",
      		endian == PR_ENDIAN_LITTLE ? "little":"big", endian);
      
      	/* setting native endianess should succeed */
      	ret = prctl(PR_SET_ENDIAN, endian);
      	printf("prctl(PR_SET_ENDIAN,%d) should succeed: %s\n",
      		endian, ret == 0 ? "OK":"FAIL");
      
      	/* setting foreign endianess should fail */
      	endian = (endian == PR_ENDIAN_LITTLE) ?
      		PR_ENDIAN_BIG : PR_ENDIAN_LITTLE;
      	ret = prctl(PR_SET_ENDIAN, endian);
      	printf("prctl(PR_SET_ENDIAN,%d) should fail: %s\n",
      		endian, ret == 0 ? "OK":"FAIL");
      }
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      5f8787b8
    • Thadeu Lima de Souza Cascardo's avatar
      Commit 8c870933 has removed the · 051c6420
      Thadeu Lima de Souza Cascardo authored
      pmu_device_init call from misc_init, but unlike other similar commits,
      has not removed its declaration.
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      051c6420
  8. 03 Nov, 2009 1 commit
  9. 15 Oct, 2009 1 commit
  10. 16 Oct, 2009 2 commits
    • Andrew Morton's avatar
      simplify · 206df4df
      Andrew Morton authored
      Cc: Amerigo Wang <amwang@redhat.com>
      Cc: Ben Woodard <bwoodard@llnl.gov>
      Cc: Brian Behlendorf <behlendorf1@llnl.gov>
      Cc: David Howells <dhowells@redhat.com>
      Cc: WANG Cong <amwang@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      206df4df
    • Amerigo Wang's avatar
      rwsem_is_locked() tests ->activity without locks, so we should always keep · 2580e032
      Amerigo Wang authored
      ->activity consistent.  However, the code in __rwsem_do_wake() breaks this
      rule, it updates ->activity after _all_ readers waken up, this may give
      some reader a wrong ->activity value, thus cause rwsem_is_locked() behaves
      wrong.
      
      Quote from Andrew:
      
      "
      - we have one or more processes sleeping in down_read(), waiting for access.
      
      - we wake one or more processes up without altering ->activity
      
      - they start to run and they do rwsem_is_locked().  This incorrectly
        returns "false", because the waker process is still crunching away in
        __rwsem_do_wake().
      
      - the waker now alters ->activity, but it was too late.
      "
      
      So we need get a spinlock to protect this.  And rwsem_is_locked() should
      not block, thus we use spin_trylock_irqsave().
      Reported-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Cc: Ben Woodard <bwoodard@llnl.gov>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: default avatarWANG Cong <amwang@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      2580e032
  11. 14 Oct, 2009 1 commit
  12. 11 Nov, 2009 1 commit
  13. 13 Oct, 2009 2 commits
    • H Hartley Sweeten's avatar
      The symbol 'call' is a static symbol used for initcall_debug. This same · eb62bab7
      H Hartley Sweeten authored
      symbol name is used locally by a couple functions and produces the
      following sparse warnings:
      
      	warning: symbol 'call' shadows an earlier one
      
      Fix this noise by renaming the local symbols.
      Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      eb62bab7
    • Daniel Mack's avatar
      On Mon, Oct 12, 2009 at 12:31:46PM -0400, H Hartley Sweeten wrote: · e8a65c9e
      Daniel Mack authored
      > On Wednesday, October 07, 2009 1:01 PM, Daniel Mack wrote:
      > > This is actually too trivial to publish, but to export the function of
      > > that chip to the userspace, a module like this is needed.
      > >
      > > Signed-off-by: Daniel Mack <daniel@caiaq.de>
      > > Cc: Andrew Morton <akpm@linux-foundation.org>
      > > Cc: David Brownell <dbrownell@users.sourceforge.net>
      > > Cc: spi-devel-general@lists.sourceforge.net
      > > ---
      >
      > [snip]
      >
      > > +static ssize_t dac7512_store_val(struct device *dev,
      > > +				 struct device_attribute *attr,
      > > +				 const char *buf, size_t count)
      > > +{
      > > +	struct spi_device *spi = to_spi_device(dev);
      > > +	unsigned char tmp[2];
      > > +	unsigned long val;
      > > +
      > > +	if (strict_strtoul(buf, 10, &val) < 0)
      > > +		return -EINVAL;
      > > +
      > > +	tmp[0] = val >> 8;
      > > +	tmp[1] = val & 0xff;
      > > +	spi_write(spi, tmp, sizeof(tmp));
      > > +	return count;
      > > +}
      > > +
      > > +static DEVICE_ATTR(value, S_IWUSR | S_IRUGO,
      > > +		   NULL, dac7512_store_val);
      >
      > You have declared the "value" device attribute with mode S_IWUSR | S_IRUGO
      > but have not provided a show callback.
      
      Sorry, forget my last mail, I got you wrong. You're of course right,
      S_IRUGO shouldn't be set for write-only attributes. Updates patch below.
      
      Thanks,
      Daniel
      
      >From ab18a967e55d2bb1d39559333bca81a01c2838f0 Mon Sep 17 00:00:00 2001
      Date: Thu, 8 Oct 2009 03:55:46 +0800
      Subject: [PATCH] drivers/misc: add driver for Texas Instruments DAC7512
      This is actually too trivial to publish, but to export the function of
      that chip to the userspace, a module like this is needed.
      Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: "H Hartley Sweeten" <hartleys@visionengravers.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      e8a65c9e
  14. 26 Oct, 2009 1 commit
  15. 23 Sep, 2009 1 commit
  16. 09 Oct, 2009 1 commit
  17. 11 Nov, 2009 1 commit
  18. 30 Sep, 2009 2 commits
  19. 28 Oct, 2009 1 commit
    • Andrew Lunn's avatar
      There is a race condition in um_request_irq(). The SIGIO handling is · 356968d7
      Andrew Lunn authored
      first enabled with the call to activate_fd().  The irq handler is then
      registered with request_irq().  What can happen is that directly after
      activate_fd() the SIGIO goes off and the IRQ source is disabled at the low
      level, the pollfd is set to -1.  Since no irq handler has yet been
      registered, the interrupt it left disabled at the low level.  The
      interrupt handler is then registered, but its too late, the interrupt
      source has been disabled at the lower level and is never re-enabled.  To
      fix this race condition i swapped the order.  First request_irq() then
      activate_fd() the interrupt sources.
      
      There is a second bug.  In 2.6.31 there was a change to the way __do_IRQ()
      and friends work for chained interrupt sources.  The old way was that all
      chained interrupt handlers were called.  The new way is that the chain is
      walked only until a handler returns IRQ_HANDLED or IRQ_WAKE_THREAD. 
      uml_net_interrupt() would always return IRQ_HANDLED, irrespective of if
      the device really did receive an interrupt or not.  This mean with the new
      code only the first device on a chained interrupt ever got its interrupts
      handled.  The second/third/...  device never got any interrupts processed.
       I changed uml_net_interrupt() to always return IRQ_NONE so that all
      handlers get called on a chained interrupt.
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      356968d7
  20. 30 Sep, 2009 1 commit
  21. 14 Oct, 2009 1 commit
    • Arjan van de Ven's avatar
      gcc is not convinced that the floppy.c ioctl has sufficient bound checks: · ca4665c7
      Arjan van de Ven authored
      In function `copy_from_user',
          inlined from `fd_copyin' at drivers/block/floppy.c:3080,
          inlined from `fd_ioctl' at drivers/block/floppy.c:3503:
      /home/arjan/linux/arch/x86/include/asm/uaccess_32.h:211:
      warning: call to `copy_from_user_overflow' declared with attribute
      warning: copy_from_user buffer size is not provably correct
      
      And frankly, as a human I have a hard time proving the same more or less
      (the size comes from the ioctl argument.  humpf.  maybe.  the code isn't
      very nice)
      
      This patch adds an explicit check to make 100% sure it's safe, better than
      finding out later that there indeed was a gap.
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      ca4665c7
  22. 12 Oct, 2009 1 commit
  23. 23 Jul, 2009 1 commit
  24. 03 Nov, 2009 1 commit