1. 16 Mar, 2012 1 commit
    • Linus Torvalds's avatar
      Merge branch '3.3-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · fe83558a
      Linus Torvalds authored
      Pull target fixes from Nicholas Bellinger:
       "This series addresses two recently reported regression bugs related to
        legacy SCSI reservation usage in target core, and iscsi-target
        reservation conflict handling.
      
        The second patch in particular addresses possible data-corruption with
        SCSI reservations that is specific to iscsi-target fabric LUNs with
        multiple client writers.  Both patches need to go into v3.2 stable
        ASAP, and the branch based on the last target-pending/3.3-rc-fixes
        HEAD.
      
        Again, thanks to Martin Svec for his help to identify and address this
        regression bug with iscsi-target."
      
      * '3.3-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        iscsi-target: Fix reservation conflict -EBUSY response handling bug
        target: Fix compatible reservation handling (CRH=1) with legacy RESERVE/RELEASE
      fe83558a
  2. 15 Mar, 2012 3 commits
  3. 14 Mar, 2012 11 commits
    • Chris Metcalf's avatar
    • Xiaotian Feng's avatar
      block: fix ioc leak in put_io_context · ff8c1474
      Xiaotian Feng authored
      When put_io_context is called, if ioc->icq_list is empty and refcount
      is 1, kernel will not free the ioc.
      
      This is caught by following kmemleak:
      
      unreferenced object 0xffff880036349fe0 (size 216):
        comm "sh", pid 2137, jiffies 4294931140 (age 290579.412s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          01 00 01 00 ad 4e ad de ff ff ff ff 00 00 00 00  .....N..........
        backtrace:
          [<ffffffff8169f926>] kmemleak_alloc+0x26/0x50
          [<ffffffff81195a9c>] kmem_cache_alloc_node+0x1cc/0x2a0
          [<ffffffff81356b67>] create_io_context_slowpath+0x27/0x130
          [<ffffffff81356d2b>] get_task_io_context+0xbb/0xf0
          [<ffffffff81055f0e>] copy_process+0x188e/0x18b0
          [<ffffffff8105609b>] do_fork+0x11b/0x420
          [<ffffffff810247f8>] sys_clone+0x28/0x30
          [<ffffffff816d3373>] stub_clone+0x13/0x20
          [<ffffffffffffffff>] 0xffffffffffffffff
      
      ioc should be freed if ioc->icq_list is empty.
      Signed-off-by: default avatarXiaotian Feng <dannyfeng@tencent.com>
      Acked-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      ff8c1474
    • Nicholas Bellinger's avatar
      iscsi-target: Fix reservation conflict -EBUSY response handling bug · 00fdc6bb
      Nicholas Bellinger authored
      This patch addresses a iscsi-target specific bug related to reservation conflict
      handling in iscsit_handle_scsi_cmd() that has been causing reservation conflicts
      to complete and not fail as expected due to incorrect errno checking.  The problem
      occured with the change to return -EBUSY from transport_generic_cmd_sequencer() ->
      transport_generic_allocate_tasks() failures, that broke iscsit_handle_scsi_cmd()
      checking for -EINVAL in order to invoke a non GOOD status response.
      
      This was manifesting itself as data corruption with legacy SPC-2 reservations,
      but also effects iscsi-target LUNs with SPC-3 persistent reservations.
      
      This bug was originally introduced in lio-core commit:
      
      commit 03e98c9e
      Author: Nicholas Bellinger <nab@linux-iscsi.org>
      Date:   Fri Nov 4 02:36:16 2011 -0700
      
          target: Address legacy PYX_TRANSPORT_* return code breakage
      Reported-by: default avatarMartin Svec <martin.svec@zoner.cz>
      Cc: Martin Svec <martin.svec@zoner.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      00fdc6bb
    • Nicholas Bellinger's avatar
      target: Fix compatible reservation handling (CRH=1) with legacy RESERVE/RELEASE · 087a03b3
      Nicholas Bellinger authored
      This patch addresses a bug with target_check_scsi2_reservation_conflict()
      return checking in target_scsi2_reservation_[reserve,release]() that was
      preventing CRH=1 operation from silently succeeding in the two special
      cases defined by SPC-3, and not failing with reservation conflict status
      when dealing with legacy RESERVE/RELEASE + active SPC-3 PR logic.
      
      Also explictly set cmd->scsi_status = SAM_STAT_RESERVATION_CONFLICT during
      the early non reservation holder failure from pr_ops->t10_seq_non_holder()
      check in transport_generic_cmd_sequencer() for fabrics that already expect
      it to be set.
      
      This bug was originally introduced in mainline commit:
      
      commit eacac00c
      Author: Christoph Hellwig <hch@infradead.org>
      Date:   Thu Nov 3 17:50:40 2011 -0400
      
          target: split core_scsi2_emulate_crh
      Reported-by: default avatarMartin Svec <martin.svec@zoner.cz>
      Cc: Martin Svec <martin.svec@zoner.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      087a03b3
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 762ad8a5
      Linus Torvalds authored
      Pull sparc updates from David Miller:
       "Please pull to get this fix for the sparc32 build when using a more
        recent binutils."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc32: Add -Av8 to assembler command line.
      762ad8a5
    • David S. Miller's avatar
      sparc32: Add -Av8 to assembler command line. · e0adb990
      David S. Miller authored
      Newer version of binutils are more strict about specifying the
      correct options to enable certain classes of instructions.
      
      The sparc32 build is done for v7 in order to support sun4c systems
      which lack hardware integer multiply and divide instructions.
      
      So we have to pass -Av8 when building the assembler routines that
      use these instructions and get patched into the kernel when we find
      out that we have a v8 capable cpu.
      Reported-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0adb990
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · b8fa7d41
      Linus Torvalds authored
      Pull networking changes from David Miller:
       "The most important bit here is the TCP syncookies issue, which seems
        to have been busted for some time.  That fix has been verified in
        production by the reporter.
      
        1) Persistent TUN devices erroneously hold on to the network namespace
           in such a way that it cannot be shutdown.  Fix from Stanislav
           Kinsbursky with help from Eric Dumazet.
      
        2) TCP SYN cookies have been broken for a while due to how the route
           lookup flow key is managed, connections can be delayed by as much
           as 20 seconds due to this bug.  Fix from Eric Dumazet.
      
        3) Missing jiffies.h include in lib/dynamic_queue_limits.c can break
           the build, from Tom Herbert.
      
        4) Add USB device ID for Sitecom LN-031, from Joerg Neikes.
      
        5) Fix OOPS in delayed workqueue in iwlegacy, from Stanislaw Gruszka.
      
        6) rt2x00 TX queue can be disabled forever due to races, fix by
           synchronizing pause/unpause with a lock.  Also from Stanislaw
           Gruszka.
      
        7) Statistics and endian fix in bnx2x driver from Yuval Mintz, Eilon
           Greenstein, and Ariel Elior."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        tun: don't hold network namespace by tun sockets
        bnx2x: FCoE statistics id fixed
        bnx2x: dcb bit indices flags used as bits
        bnx2x: added cpu_to_le16 when preparing ramrod's data
        bnx2x: pfc statistics counts pfc events twice
        rt2x00: fix random stalls
        iwl3945: fix possible il->txq NULL pointer dereference in delayed works
        dql: Fix undefined jiffies
        tcp: fix syncookie regression
        usb: asix: Patch for Sitecom LN-031
      b8fa7d41
    • Linus Torvalds's avatar
      Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 69539ab1
      Linus Torvalds authored
      Pull arch/tile update from Chris Metcalf
       "These include a couple of queued-up minor bug fixes from the
        community, a fix to unbreak the sysfs hooks in tile, and syncing up
        the defconfigs."
      
      Ugh.  defconfigs updates without "make minconfig".  Tons of ugly
      pointless lines there, I suspect.
      
      * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        tile: Use set_current_blocked() and block_sigmask()
        arch/tile: misplaced parens near likely
        arch/tile: sync up the defconfig files to the tip
        arch/tile: Fix up from commit 8a25a2fd
      69539ab1
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0a49aeca
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar.
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf record: Fix buffer overrun bug in tracepoint_id_to_path()
        perf/x86: Fix local vs remote memory events for NHM/WSM
      0a49aeca
    • Linus Torvalds's avatar
      Merge git://git.samba.org/sfrench/cifs-2.6 · 8e8bb96d
      Linus Torvalds authored
      Pull CIFS fixes from Steve French.
      
      * git://git.samba.org/sfrench/cifs-2.6:
        CIFS: Do not kmalloc under the flocks spinlock
        cifs: possible memory leak in xattr.
      8e8bb96d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · cd794539
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "A bunch of assorted fixes; Jan's freezing stuff still _not_ in there
        and neither is mm fun ;-/"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        restore smp_mb() in unlock_new_inode()
        vfs: fix return value from do_last()
        vfs: fix double put after complete_walk()
        udf: Fix deadlock in udf_release_file()
        vfs: Correctly set the dir i_mutex lockdep class
      cd794539
  4. 13 Mar, 2012 12 commits
  5. 12 Mar, 2012 11 commits
    • Peter Zijlstra's avatar
      perf/x86: Fix local vs remote memory events for NHM/WSM · 87e24f4b
      Peter Zijlstra authored
      Verified using the below proglet.. before:
      
      [root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 0
      remote write
      
       Performance counter stats for './numa 0':
      
               2,101,554 node-stores
               2,096,931 node-store-misses
      
             5.021546079 seconds time elapsed
      
      [root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 1
      local write
      
       Performance counter stats for './numa 1':
      
                 501,137 node-stores
                     199 node-store-misses
      
             5.124451068 seconds time elapsed
      
      After:
      
      [root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 0
      remote write
      
       Performance counter stats for './numa 0':
      
               2,107,516 node-stores
               2,097,187 node-store-misses
      
             5.012755149 seconds time elapsed
      
      [root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 1
      local write
      
       Performance counter stats for './numa 1':
      
               2,063,355 node-stores
                     165 node-store-misses
      
             5.082091494 seconds time elapsed
      
      #define _GNU_SOURCE
      
      #include <sched.h>
      #include <stdio.h>
      #include <errno.h>
      #include <sys/mman.h>
      #include <sys/types.h>
      #include <dirent.h>
      #include <signal.h>
      #include <unistd.h>
      #include <numaif.h>
      #include <stdlib.h>
      
      #define SIZE (32*1024*1024)
      
      volatile int done;
      
      void sig_done(int sig)
      {
      	done = 1;
      }
      
      int main(int argc, char **argv)
      {
      	cpu_set_t *mask, *mask2;
      	size_t size;
      	int i, err, t;
      	int nrcpus = 1024;
      	char *mem;
      	unsigned long nodemask = 0x01; /* node 0 */
      	DIR *node;
      	struct dirent *de;
      	int read = 0;
      	int local = 0;
      
      	if (argc < 2) {
      		printf("usage: %s [0-3]\n", argv[0]);
      		printf("  bit0 - local/remote\n");
      		printf("  bit1 - read/write\n");
      		exit(0);
      	}
      
      	switch (atoi(argv[1])) {
      	case 0:
      		printf("remote write\n");
      		break;
      	case 1:
      		printf("local write\n");
      		local = 1;
      		break;
      	case 2:
      		printf("remote read\n");
      		read = 1;
      		break;
      	case 3:
      		printf("local read\n");
      		local = 1;
      		read = 1;
      		break;
      	}
      
      	mask = CPU_ALLOC(nrcpus);
      	size = CPU_ALLOC_SIZE(nrcpus);
      	CPU_ZERO_S(size, mask);
      
      	node = opendir("/sys/devices/system/node/node0/");
      	if (!node)
      		perror("opendir");
      	while ((de = readdir(node))) {
      		int cpu;
      
      		if (sscanf(de->d_name, "cpu%d", &cpu) == 1)
      			CPU_SET_S(cpu, size, mask);
      	}
      	closedir(node);
      
      	mask2 = CPU_ALLOC(nrcpus);
      	CPU_ZERO_S(size, mask2);
      	for (i = 0; i < size; i++)
      		CPU_SET_S(i, size, mask2);
      	CPU_XOR_S(size, mask2, mask2, mask); // invert
      
      	if (!local)
      		mask = mask2;
      
      	err = sched_setaffinity(0, size, mask);
      	if (err)
      		perror("sched_setaffinity");
      
      	mem = mmap(0, SIZE, PROT_READ|PROT_WRITE,
      			MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
      	err = mbind(mem, SIZE, MPOL_BIND, &nodemask, 8*sizeof(nodemask), MPOL_MF_MOVE);
      	if (err)
      		perror("mbind");
      
      	signal(SIGALRM, sig_done);
      	alarm(5);
      
      	if (!read) {
      		while (!done) {
      			for (i = 0; i < SIZE; i++)
      				mem[i] = 0x01;
      		}
      	} else {
      		while (!done) {
      			for (i = 0; i < SIZE; i++)
      				t += *(volatile char *)(mem + i);
      		}
      	}
      
      	return 0;
      }
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: <stable@kernel.org>
      Link: http://lkml.kernel.org/n/tip-tq73sxus35xmqpojf7ootxgs@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      87e24f4b
    • roel's avatar
      arch/tile: misplaced parens near likely · cf8c1daf
      roel authored
      Parentheses were missing.
      Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      cf8c1daf
    • Chris Metcalf's avatar
      arch/tile: sync up the defconfig files to the tip · 7ed725cf
      Chris Metcalf authored
      This was inspired by mchehab@redhat.com's observation that we
      didn't have EDAC configured on by default in both files.  In addition,
      we were setting INITRAMFS_SOURCE to a non-empty string, which isn't
      a very common default and required editing to do test builds.
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      7ed725cf
    • Chris Metcalf's avatar
      arch/tile: Fix up from commit 8a25a2fd · 688b4db0
      Chris Metcalf authored
      This was Kay Siever's bombing to convert 'cpu' to a regular subsystem.
      The change left a bogus second argument to sysfs_create_file().
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      688b4db0
    • Stanislaw Gruszka's avatar
      rt2x00: fix random stalls · 3780d038
      Stanislaw Gruszka authored
      Is possible that we stop queue and then do not wake up it again,
      especially when packets are transmitted fast. That can be easily
      reproduced with modified tx queue entry_num to some small value e.g. 16.
      
      If mac80211 already hold local->queue_stop_reason_lock, then we can wait
      on that lock in both rt2x00queue_pause_queue() and
      rt2x00queue_unpause_queue(). After drooping ->queue_stop_reason_lock
      is possible that __ieee80211_wake_queue() will be performed before
      __ieee80211_stop_queue(), hence we stop queue and newer wake up it
      again.
      
      Another race condition is possible when between rt2x00queue_threshold()
      check and rt2x00queue_pause_queue() we will process all pending tx
      buffers on different cpu. This might happen if for example interrupt
      will be triggered on cpu performing rt2x00mac_tx().
      
      To prevent race conditions serialize pause/unpause by queue->tx_lock.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      3780d038
    • Stanislaw Gruszka's avatar
      iwl3945: fix possible il->txq NULL pointer dereference in delayed works · 210787e8
      Stanislaw Gruszka authored
      On il3945_down procedure we free tx queue data and nullify il->txq
      pointer. After that we drop mutex and then cancel delayed works. There
      is possibility, that after drooping mutex and before the cancel, some
      delayed work will start and crash while trying to send commands to
      the device. For example, here is reported crash in
      il3945_bg_reg_txpower_periodic():
      https://bugzilla.kernel.org/show_bug.cgi?id=42766#c10
      
      Patch fix problem by adding il->txq check on works that send commands,
      hence utilize tx queue.
      Reported-by: default avatarClemens Eisserer <linuxhippy@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      210787e8
    • Xi Wang's avatar
      panasonic-laptop: avoid overflow in acpi_pcc_hotkey_add() · e424fb8c
      Xi Wang authored
      num_sifr could go negative since acpi_pcc_get_sqty() returns -EINVAL
      on error.  Then it could bypass the sanity check (num_sifr > 255).
      The subsequent call to kzalloc() would allocate a small buffer, leading
      to a memory corruption.
      Signed-off-by: default avatarXi Wang <xi.wang@gmail.com>
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      e424fb8c
    • Ike Panhc's avatar
      acer-wmi: No wifi rfkill on Lenovo machines · 461e7437
      Ike Panhc authored
      We have several reports which says acer-wmi is loaded on ideapads
      and register rfkill for wifi which can not be unblocked.
      
      Since ideapad-laptop also register rfkill for wifi and it works
      reliably, it will be fine acer-wmi is not going to register rfkill
      for wifi once VPC2004 is found.
      
      Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no
      wifi rfkill capability, there are reports which says acer-wmi also
      block wireless on Thinkpad E520/E420.
      Signed-off-by: default avatarIke Panhc <ike.pan@canonical.com>
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      461e7437
    • Robert Gerlach's avatar
      Fujitsu tablet extras driver · 2d24c490
      Robert Gerlach authored
      This patch adds support for some of the devices within a wide variety
      of Fujitsu Tablet Computers, both convertibles and slates. Primarily
      it allows for the automatic detection of the tablet/notebook mode for
      convertible tablet pc's, and orientation for docked slates. It also
      adds support for the application panel buttons usually found next to
      the tablet screen, and docking station detection for slates.
      Signed-off-by: default avatarRobert Gerlach <khnz@gmx.de>
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      2d24c490
    • Ben Hutchings's avatar
      x86: Add amilo-rfkill driver for some Fujitsu-Siemens Amilo laptops · c215ab9a
      Ben Hutchings authored
      An rfkill driver based on the fsaa1655g and fsam7440 drivers for
      Fujitsu-Siemens Amilo A1655 and M7440 models found at:
      
      http://sourceforge.net/projects/fsaa1655g/
      http://sourceforge.net/projects/fsam7440/
      
      This adds DMI matching, replaces the procfs files with rfkill devices,
      and uses the proper functions to write to the i8042 safely.
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      c215ab9a
    • Tom Herbert's avatar
      dql: Fix undefined jiffies · 930c514f
      Tom Herbert authored
      In some configurations, jiffies may be undefined in
      lib/dynamic_queue_limits.c.  Adding include of jiffies.h to avoid
      this.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      930c514f
  6. 11 Mar, 2012 2 commits