1. 28 Apr, 2010 1 commit
  2. 27 Apr, 2010 14 commits
  3. 26 Apr, 2010 5 commits
    • David Miller's avatar
      drm/radeon: Fix sparc regression in r300_scratch() · 88b04507
      David Miller authored
      Commit b4fe9454 ("drm/radeon: Fix
      memory allocation failures in the preKMS command stream checking.")
      added a regression in that it completely tossed the get_unaligned()
      done by r300_scratch() which we added in commit
      958a6f8c ("drm: radeon: Fix unaligned
      access in r300_scratch().").
      
      Put it back.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Acked-by: default avatarMatt Turner <mattst88@gmail.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      88b04507
    • Jesse Barnes's avatar
      drm: make sure vblank interrupts are disabled at DPMS time · e32ee7fa
      Jesse Barnes authored
      When we call drm_vblank_off() at DPMS off time (to wake any clients so
      they don't hang) we need to make sure interrupts are actually disabled.
      If drm_vblank_off() gets called before the vblank usage timer expires,
      it'll prevent the timer from disabling interrupts since it also clears
      the vblank_enabled flag for the pipe.
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      e32ee7fa
    • Neil Brown's avatar
      nfsd4: bug in read_buf · 2bc3c117
      Neil Brown authored
      When read_buf is called to move over to the next page in the pagelist
      of an NFSv4 request, it sets argp->end to essentially a random
      number, certainly not an address within the page which argp->p now
      points to.  So subsequent calls to READ_BUF will think there is much
      more than a page of spare space (the cast to u32 ensures an unsigned
      comparison) so we can expect to fall off the end of the second
      page.
      
      We never encountered thsi in testing because typically the only
      operations which use more than two pages are write-like operations,
      which have their own decoding logic.  Something like a getattr after a
      write may cross a page boundary, but it would be very unusual for it to
      cross another boundary after that.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      2bc3c117
    • Dave Chinner's avatar
      xfs: more swap extent fixes for dynamic fork offsets · dd77ef92
      Dave Chinner authored
      A new xfsqa test (226) with a prototype xfs_fsr change to try to
      handle dynamic fork offsets better triggers an assertion failure
      where the inode data fork is in btree format, yet there is room in
      the inode for it to be in extent format. The two inodes look like:
      
      before: ino 0x101 (target), num_extents 11, Max in-fork extents 6, broot size 40, fork offset 96
      before: ino 0x115 (temp),  num_extents 5, Max in-fork extents 3, broot size 40, fork offset 56
      after: ino 0x101 (target), num_extents 5, Max in-fork extents 6, broot size 40, fork offset 96
      after: ino 0x115 (temp), num_extents 11, Max in-fork extents 3, broot size 40, fork offset 56
      
      Basically the target inode ends up with 5 extents in btree format,
      but it had space for 6 extents in extent format, so ends up
      incorrect. Notably here the broot size is the same, and that is
      where the kernel code is going wrong - the btree root will fit, so
      it lets the swap go ahead.
      
      The check should not allow the swap to take place if the number of
      extents while in btree format is less than the number of extents
      that can fit in the inode in extent format. Adding that check will
      prevent this swap and corruption from occurring.
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      dd77ef92
    • Herbert Xu's avatar
      crypto: authenc - Add EINPROGRESS check · 180ce7e8
      Herbert Xu authored
      When Steffen originally wrote the authenc async hash patch, he
      correctly had EINPROGRESS checks in place so that we did not invoke
      the original completion handler with it.
      
      Unfortuantely I told him to remove it before the patch was applied.
      
      As only MAY_BACKLOG request completion handlers are required to
      handle EINPROGRESS completions, those checks are really needed.
      
      This patch restores them.
      Reported-by: default avatarSebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      180ce7e8
  4. 25 Apr, 2010 7 commits
  5. 24 Apr, 2010 13 commits
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq · ddc9b34c
      Linus Torvalds authored
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
        [CPUFREQ] use max load in conservative governor
        [CPUFREQ] fix a lockdep warning
      ddc9b34c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 8e500ff8
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits)
        gianfar: Fix potential oops during OF address translation
        fsl_pq_mdio: Fix kernel oops during OF address translation
        tcp: bind() fix when many ports are bound
        rdma: potential ERR_PTR dereference
        rtnetlink: potential ERR_PTR dereference
        net: ipv6 bind to device issue
        ipv6: allow to send packet after receiving ICMPv6 Too Big message with MTU field less than IPV6_MIN_MTU
        drivers/net/usb: Add new driver ipheth
        cxgb3: fix linkup issue
        X25 fix dead unaccepted sockets
        KS8851: NULL pointer dereference if list is empty
        net: 3c574_cs fix stats.tx_bytes counter
        xfrm6: ensure to use the same dev when building a bundle
        can: Fix possible NULL pointer dereference in ems_usb.c
        net: Fix an RCU warning in dev_pick_tx()
        ipv6: Fix tcp_v6_send_response transport header setting.
        bridge: add a missing ntohs()
        8139too: Fix a typo in the function name.
        mac80211: pass HT changes to driver when off channel
        mac80211: remove bogus TX agg state assignment
        ...
      8e500ff8
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 · 383bee6b
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
        PCI: Ensure we re-enable devices on resume
        x86/PCI: parse additional host bridge window resource types
        PCI: revert broken device warning
        PCI aerdrv: use correct bit defines and add 2ms delay to aer_root_reset
        x86/PCI: ignore Consumer/Producer bit in ACPI window descriptions
      383bee6b
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of... · b39c8be6
      Linus Torvalds authored
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
        eeepc-laptop: add missing sparse_keymap_free
        eeepc-wmi: Build fix
        asus: don't modify bluetooth/wlan on boot
        dell-wmi: Fix memory leak
        eeepc-wmi: add backlight support
        eeepc-wmi: use a platform device as parent device of all sub-devices
        eeepc-wmi: add an eeepc_wmi context structure
      b39c8be6
    • Phillip Lougher's avatar
      initramfs: handle unrecognised decompressor when unpacking · df37bd15
      Phillip Lougher authored
      The unpack routine fails to handle the decompress_method() returning
      unrecognised decompressor (compress_name == NULL).  This results in the
      routine looping eventually oopsing on an out of bounds memory access.
      
      Note this bug is usually hidden, only triggering on trailing junk after
      one or more correct compressed blocks.  The case of the compressed archive
      being complete junk is (by accident?) caught by the if (state != Reset)
      check because state is initialised to Start, but not updated due to the
      decompressor not having been called.  Obviously if the junk is trailing a
      correctly decompressed buffer, state == Reset from the previous call to
      the decompressor.
      Signed-off-by: default avatarPhillip Lougher <phillip@lougher.demon.co.uk>
      Reported-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      df37bd15
    • Dan Carpenter's avatar
      ksm: check for ERR_PTR from follow_page() · 22eccdd7
      Dan Carpenter authored
      The follow_page() function can potentially return -EFAULT so I added
      checks for this.
      
      Also I silenced an uninitialized variable warning on my version of gcc
      (version 4.3.2).
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Acked-by: default avatarRik van Riel <riel@redhat.com>
      Acked-by: default avatarIzik Eidus <ieidus@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      22eccdd7
    • Dmitry Torokhov's avatar
      VMware Balloon driver · 453dc659
      Dmitry Torokhov authored
      This is a standalone version of VMware Balloon driver.  Ballooning is a
      technique that allows hypervisor dynamically limit the amount of memory
      available to the guest (with guest cooperation).  In the overcommit
      scenario, when hypervisor set detects that it needs to shuffle some
      memory, it instructs the driver to allocate certain number of pages, and
      the underlying memory gets returned to the hypervisor.  Later hypervisor
      may return memory to the guest by reattaching memory to the pageframes and
      instructing the driver to "deflate" balloon.
      
      We are submitting a standalone driver because KVM maintainer (Avi Kivity)
      expressed opinion (rightly) that our transport does not fit well into
      virtqueue paradigm and thus it does not make much sense to integrate with
      virtio.
      
      There were also some concerns whether current ballooning technique is the
      right thing.  If there appears a better framework to achieve this we are
      prepared to evaluate and switch to using it, but in the meantime we'd like
      to get this driver upstream.
      
      We want to get the driver accepted in distributions so that users do not
      have to deal with an out-of-tree module and many distributions have
      "upstream first" requirement.
      
      The driver has been shipping for a number of years and users running on
      VMware platform will have it installed as part of VMware Tools even if it
      will not come from a distribution, thus there should not be additional
      risk in pulling the driver into mainline.  The driver will only activate
      if host is VMware so everyone else should not be affected at all.
      Signed-off-by: default avatarDmitry Torokhov <dtor@vmware.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      453dc659
    • Anton Blanchard's avatar
      fs/block_dev.c: fix performance regression in O_DIRECT|O_SYNC writes to block devices · b8af67e2
      Anton Blanchard authored
      We are seeing a large regression in database performance on recent
      kernels.  The database opens a block device with O_DIRECT|O_SYNC and a
      number of threads write to different regions of the file at the same time.
      
      A simple test case is below.  I haven't defined DEVICE since getting it
      wrong will destroy your data :) On an 3 disk LVM with a 64k chunk size we
      see about 17MB/sec and only a few threads in IO wait:
      
      procs  -----io---- -system-- -----cpu------
       r  b     bi    bo   in   cs us sy id wa st
       0  3      0 16170  656 2259  0  0 86 14  0
       0  2      0 16704  695 2408  0  0 92  8  0
       0  2      0 17308  744 2653  0  0 86 14  0
       0  2      0 17933  759 2777  0  0 89 10  0
      
      Most threads are blocking in vfs_fsync_range, which has:
      
              mutex_lock(&mapping->host->i_mutex);
              err = fop->fsync(file, dentry, datasync);
              if (!ret)
                      ret = err;
              mutex_unlock(&mapping->host->i_mutex);
      
      commit 148f948b (vfs: Introduce new
      helpers for syncing after writing to O_SYNC file or IS_SYNC inode) offers
      some explanation of what is going on:
      
          Use these new helpers for syncing from generic VFS functions. This makes
          O_SYNC writes to block devices acquire i_mutex for syncing. If we really
          care about this, we can make block_fsync() drop the i_mutex and reacquire
          it before it returns.
      
      Thanks Jan for such a good commit message!  As well as dropping i_mutex,
      Christoph suggests we should remove the call to sync_blockdev():
      
      > sync_blockdev is an overcomplicated alias for filemap_write_and_wait on
      > the block device inode, which is exactly what we did just before calling
      > into ->fsync
      
      The patch below incorporates both suggestions. With it the testcase improves
      from 17MB/s to 68M/sec:
      
      procs  -----io---- -system-- -----cpu------
       r  b     bi    bo   in   cs us sy id wa st
       0  7      0 65536 1000 3878  0  0 70 30  0
       0 34      0 69632 1016 3921  0  1 46 53  0
       0 57      0 69632 1000 3921  0  0 55 45  0
       0 53      0 69640  754 4111  0  0 81 19  0
      
      Testcase:
      
      #define _GNU_SOURCE
      #include <stdio.h>
      #include <pthread.h>
      #include <unistd.h>
      #include <stdlib.h>
      #include <string.h>
      #include <sys/types.h>
      #include <sys/stat.h>
      #include <fcntl.h>
      
      #define NR_THREADS 64
      #define BUFSIZE (64 * 1024)
      
      #define DEVICE "/dev/mapper/XXXXXX"
      
      #define ALIGN(VAL, SIZE) (((VAL)+(SIZE)-1) & ~((SIZE)-1))
      
      static int fd;
      
      static void *doit(void *arg)
      {
      	unsigned long offset = (long)arg;
      	char *b, *buf;
      
      	b = malloc(BUFSIZE + 1024);
      	buf = (char *)ALIGN((unsigned long)b, 1024);
      	memset(buf, 0, BUFSIZE);
      
      	while (1)
      		pwrite(fd, buf, BUFSIZE, offset);
      }
      
      int main(int argc, char *argv[])
      {
      	int flags = O_RDWR|O_DIRECT;
      	int i;
      	unsigned long offset = 0;
      
      	if (argc > 1 && !strcmp(argv[1], "O_SYNC"))
      		flags |= O_SYNC;
      
      	fd = open(DEVICE, flags);
      	if (fd == -1) {
      		perror("open");
      		exit(1);
      	}
      
      	for (i = 0; i < NR_THREADS-1; i++) {
      		pthread_t tid;
      		pthread_create(&tid, NULL, doit, (void *)offset);
      		offset += BUFSIZE;
      	}
      	doit((void *)offset);
      
      	return 0;
      }
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b8af67e2
    • Hans Verkuil's avatar
      lib/vsprintf.c: add missing EXPORT_SYMBOL(simple_strtoll) · 98d5ce0d
      Hans Verkuil authored
      Add a missing EXPORT_SYMBOL.
      
      I must be the first person that wants to use this function :-)
      Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      98d5ce0d
    • Amit Kucheria's avatar
      w1: fix omap 1-wire driver compilation · 81fa08f2
      Amit Kucheria authored
      Fixes the following error:
      
        drivers/w1/masters/omap_hdq.c: In function 'hdq_wait_for_flag':
        drivers/w1/masters/omap_hdq.c:137: error: implicit declaration of function 'schedule_timeout_uninterruptible'
        drivers/w1/masters/omap_hdq.c: In function 'hdq_write_byte':
        drivers/w1/masters/omap_hdq.c:177: error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)
        drivers/w1/masters/omap_hdq.c:177: error: (Each undeclared identifier is reported only once
        drivers/w1/masters/omap_hdq.c:177: error: for each function it appears in.)
        drivers/w1/masters/omap_hdq.c:177: error: implicit declaration of function 'schedule_timeout'
        drivers/w1/masters/omap_hdq.c: In function 'hdq_isr':
        drivers/w1/masters/omap_hdq.c:221: error: 'TASK_NORMAL' undeclared (first use in this function)
        drivers/w1/masters/omap_hdq.c: In function 'omap_hdq_break':
        drivers/w1/masters/omap_hdq.c:316: error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)
      Signed-off-by: default avatarAmit Kucheria <amit.kucheria@canonical.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      81fa08f2
    • Oleg Nesterov's avatar
      rmap: anon_vma_prepare() can leak anon_vma_chain · 31f2b0eb
      Oleg Nesterov authored
      If find_mergeable_anon_vma() succeeds but another thread installs
      ->anon_vma before we take ptl, then allocated == NULL but avc should be
      freed.  Change the code to check avc != NULL to detect this case.
      
      Also, a couple of whitespace changes to make the critical section more
      visible.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Reviewed-by: default avatarRik van Riel <riel@redhat.com>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      31f2b0eb
    • David Howells's avatar
      keys: fix an RCU warning · 93b4a44f
      David Howells authored
      Fix the following RCU warning:
      
        ===================================================
        [ INFO: suspicious rcu_dereference_check() usage. ]
        ---------------------------------------------------
        security/keys/request_key.c:116 invoked rcu_dereference_check() without protection!
      
      This was caused by doing:
      
      	[root@andromeda ~]# keyctl newring fred @s
      	539196288
      	[root@andromeda ~]# keyctl request2 user a a 539196288
      	request_key: Required key not available
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      93b4a44f
    • Albin Tonnerre's avatar
      lib: fix the use of LZO to decompress initramfs images · ccdb4004
      Albin Tonnerre authored
      This patch fixes 2 issues with the LZO decompressor:
      
      - It doesn't handle the case where a block isn't compressed at all.  In
        this case, calling lzo1x_decompress_safe will fail, so we need to just
        use memcpy() instead (the upstream LZO code does something similar)
      
      - Since commit 54291362 ("initramfs: add
        missing decompressor error check") , the decompressor return code is
        checked in the init/initramfs.c The LZO decompressor didn't return the
        expected value, causing the initramfs code to falsely believe a
        decompression error occured
      Signed-off-by: default avatarAlbin Tonnerre <albin.tonnerre@free-electrons.com>
      Tested-by: default avatarbert schulze <spambemyguest@googlemail.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ccdb4004