Skip to content
  1. Sep 15, 2012
  2. Sep 13, 2012
  3. Sep 12, 2012
  4. Sep 11, 2012
    • Catalin Iacob's avatar
      ALSA: hda_intel: add position_fix quirk for Asus K53E · c302d613
      Catalin Iacob authored
      Commit c20c5a84 changed some chipsets to
      default to POS_FIX_COMBO so they now use POS_FIX_LPIB instead of
      POS_FIX_POSBUF. Since then I've been getting artifacts on playback, including
      repeated sounds on my Asus laptop.
      
      My hardware is Cougar Point which the commit log of
      c20c5a84
      
       mentions as tested so POS_FIX_COMBO
      probably works in general but apparently it doesn't on Asus K53E therefore the
      need for the quirk.
      
      Signed-off-by: default avatarCatalin Iacob <iacobcatalin@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c302d613
    • Dan Carpenter's avatar
      ALSA: compress_core: fix open flags test in snd_compr_open() · 81cb3246
      Dan Carpenter authored
      
      
      O_RDONLY is zero so the original test (f->f_flags & O_RDONLY) is always
      false and it will never do compress capture.  The test for O_WRONLY is
      also slightly off.  The original test would consider "->flags =
      (O_WRONLY | O_RDWR)" as write only instead of rejecting it as invalid.
      
      I've also removed the pr_err() because that could flood dmesg.
      
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      81cb3246
    • Fabio Estevam's avatar
      ARM: clk-imx35: Fix SSI clock registration · 48540058
      Fabio Estevam authored
      
      
      SSI block has two types of clock:
      
      ipg: bus clock, the clock needed for accessing registers.
      per: peripheral clock, the clock needed for generating the bit rate.
      
      Currently SSI driver only supports slave mode and only need to handle
      the ipg clock, because the peripheral clock comes from the master codec.
      
      Only register the ipg clock and do not register the peripheral clock for ssi.
      
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Tested-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Cc: stable@vger.kernel.org
      48540058
    • Fabio Estevam's avatar
      ARM: clk-imx25: Fix SSI clock registration · 912bfe76
      Fabio Estevam authored
      
      
      SSI block has two types of clock:
      
      ipg: bus clock, the clock needed for accessing registers.
      per: peripheral clock, the clock needed for generating the bit rate.
      
      Currently SSI driver only supports slave mode and only need to handle
      the ipg clock, because the peripheral clock comes from the master codec.
      
      Only register the ipg clock and do not register the peripheral clock for ssi.
      
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Cc: stable@vger.kernel.org
      912bfe76
    • Herbert Xu's avatar
      crypto: authenc - Fix crash with zero-length assoc data · 9b2f4cb6
      Herbert Xu authored
      
      
      The authenc code doesn't deal with zero-length associated data
      correctly and ends up constructing a zero-length sg entry which
      causes a crash when it's fed into the crypto system.
      
      This patch fixes this by avoiding the code-path that triggers
      the SG construction if we have no associated data.
      
      This isn't the most optimal fix as it means that we'll end up
      using the fallback code-path even when we could still execute
      the digest function.  However, this isn't a big deal as nobody
      but the test path would supply zero-length associated data.
      
      Reported-by: default avatarRomain Francoise <romain@orebokech.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Tested-by: default avatarRomain Francoise <romain@orebokech.com>
      9b2f4cb6
    • James Hogan's avatar
      kbuild: add symbol prefix arg to kallsyms · 6895f97e
      James Hogan authored
      Commit 1f2bfbd0
      
       ("kbuild: link of
      vmlinux moved to a script") introduced in v3.5-rc1 broke kallsyms on
      architectures which have symbol prefixes.
      
      The --symbol-prefix argument used to be added to the KALLSYMS command
      line from the architecture Makefile, however this isn't picked up by the
      new scripts/link-vmlinux.sh. This resulted in symbols like
      kallsyms_addresses being added which weren't correctly overriding the
      weak symbols such as _kallsyms_addresses. These could then trigger
      BUG_ONs in kallsyms code.
      
      This is fixed by removing the KALLSYMS addition from the architecture
      Makefile, and using CONFIG_SYMBOL_PREFIX in the link-vmlinux.sh script
      to determine whether to add the --symbol-prefix argument.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: default avatarBob Liu <lliubbo@gmail.com>
      6895f97e
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 1a95620f
      Linus Torvalds authored
      
      
      Pull SCSI fixes from James Bottomley:
       "I had actually prepared this fix set before I left for KS + Plumbers,
        so it's been incubating much longer than it should have.  I'll be
        picking up my three week backlog this week, so more fixes will then be
        forthcoming
      
        This set consist of three minor and one fairly major (the device not
        ready causing offlining problem which is a serious regression
        introduced by the media change update) fixes.
      
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com&gt;">
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] Fix 'Device not ready' issue on mpt2sas
        [SCSI] scsi_lib: fix scsi_io_completion's SG_IO error propagation
        [SCSI] megaraid_sas: Move poll_aen_lock initializer
        [SCSI] mpt2sas: Fix for Driver oops, when loading driver with max_queue_depth command line option to a very small value
      1a95620f
    • Linus Torvalds's avatar
      Merge tag 'kvm-3.6-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm · ffc29649
      Linus Torvalds authored
      Pull KVM updates from Avi Kivity:
       "A trio of KVM fixes: incorrect lookup of guest cpuid, an uninitialized
        variable fix, and error path cleanup fix."
      
      * tag 'kvm-3.6-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: fix error paths for failed gfn_to_page() calls
        KVM: x86: Check INVPCID feature bit in EBX of leaf 7
        KVM: PIC: fix use of uninitialised variable.
      ffc29649
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 44346cfe
      Linus Torvalds authored
      Pull FUSE fixes from Miklos Szeredi:
       "This contains bugfixes for FUSE and CUSE and a compile warning fix."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: fix retrieve length
        fuse: mark variables uninitialized
        cuse: kill connection on initialization error
        cuse: fix fuse_conn_kill()
      44346cfe
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6 · e9bd8f16
      Linus Torvalds authored
      Pull CIFS fixes from Steve French.
      
      * 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
        CIFS: Fix endianness conversion
        CIFS: Fix error handling in cifs_push_mandatory_locks
      e9bd8f16
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 1b0a9069
      Linus Torvalds authored
      Pull UDF and ext3 fixes from Jan Kara:
       "One UDF data corruption fix and one ext3 fix where we didn't write
        everything to disk on fsync in one corner case."
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        udf: Fix data corruption for files in ICB
        ext3: Fix fdatasync() for files with only i_size changes
      1b0a9069
    • Linus Torvalds's avatar
      Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 6562271a
      Linus Torvalds authored
      Pull i2c subsystem fixes from Jean Delvare.
      
      * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        i2c-core: Fix for lockdep validator
        i2c-designware: Fix build error if CONFIG_I2C_DESIGNWARE_PLATFORM=y && CONFIG_I2C_DESIGNWARE_PCI=y
        i2c-i801: Add Device IDs for Intel Lynx Point-LP PCH
      6562271a
    • Lai Jiangshan's avatar
      workqueue: fix possible idle worker depletion across CPU hotplug · ee378aa4
      Lai Jiangshan authored
      
      
      To simplify both normal and CPU hotplug paths, worker management is
      prevented while CPU hoplug is in progress.  This is achieved by CPU
      hotplug holding the same exclusion mechanism used by workers to ensure
      there's only one manager per pool.
      
      If someone else seems to be performing the manager role, workers
      proceed to execute work items.  CPU hotplug using the same mechanism
      can lead to idle worker depletion because all workers could proceed to
      execute work items while CPU hotplug is in progress and CPU hotplug
      itself wouldn't actually perform the worker management duty - it
      doesn't guarantee that there's an idle worker left when it releases
      management.
      
      This idle worker depletion, under extreme circumstances, can break
      forward-progress guarantee and thus lead to deadlock.
      
      This patch fixes the bug by using separate mechanisms for manager
      exclusion among workers and hotplug exclusion.  For manager exclusion,
      POOL_MANAGING_WORKERS which was restored by the previous patch is
      used.  pool->manager_mutex is now only used for exclusion between the
      elected manager and CPU hotplug.  The elected manager won't proceed
      without holding pool->manager_mutex.
      
      This ensures that the worker which won the manager position can't skip
      managing while CPU hotplug is in progress.  It will block on
      manager_mutex and perform management after CPU hotplug is complete.
      
      Note that hotplug may happen while waiting for manager_mutex.  A
      manager isn't either on idle or busy list and thus the hoplug code
      can't unbind/rebind it.  Make the manager handle its own un/rebinding.
      
      tj: Updated comment and description.
      
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      ee378aa4
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 5d67f2e8
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Just noticed I hadn't send these out, nothing majorly urgent, I know
        AMD guys have some regression fixes coming soon.
      
        This contains:
         2 nouveau fixes so it loads on the retina MBP systems properly,
         2 vmwgfx fixes to load the driver earlier, and allow distros config it
         1 error->debug fix in ast
        and Keith was playing with 32-on-64 and decided we may as well stick
        the compat ioctl in all the drivers.  It fixes udl for him."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/vmwgfx: add MODULE_DEVICE_TABLE so vmwgfx loads at boot
        drm/vmwgfx: allow a kconfig option to choose if fbcon is enabled
        drm: use drm_compat_ioctl for 32-bit apps
        drm/ast: drop debug level on error printk
        drm/nv50-/gpio: initialise to vbios defaults during init
        drm/nvd0/disp: hopefully fix selection of 6/8bpc mode on DP outputs
      5d67f2e8
    • Lai Jiangshan's avatar
      workqueue: restore POOL_MANAGING_WORKERS · 552a37e9
      Lai Jiangshan authored
      This patch restores POOL_MANAGING_WORKERS which was replaced by
      pool->manager_mutex by 60373152
      
       "workqueue: use mutex for global_cwq
      manager exclusion".
      
      There's a subtle idle worker depletion bug across CPU hotplug events
      and we need to distinguish an actual manager and CPU hotplug
      preventing management.  POOL_MANAGING_WORKERS will be used for the
      former and manager_mutex the later.
      
      This patch just lays POOL_MANAGING_WORKERS on top of the existing
      manager_mutex and doesn't introduce any synchronization changes.  The
      next patch will update it.
      
      Note that this patch fixes a non-critical anomaly where
      too_many_workers() may return %true spuriously while CPU hotplug is in
      progress.  While the issue could schedule idle timer spuriously, it
      didn't trigger any actual misbehavior.
      
      tj: Rewrote patch description.
      
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      552a37e9
  5. Sep 10, 2012
    • Xiao Guangrong's avatar
      KVM: fix error paths for failed gfn_to_page() calls · 4484141a
      Xiao Guangrong authored
      
      
      This bug was triggered:
      [ 4220.198458] BUG: unable to handle kernel paging request at fffffffffffffffe
      [ 4220.203907] IP: [<ffffffff81104d85>] put_page+0xf/0x34
      ......
      [ 4220.237326] Call Trace:
      [ 4220.237361]  [<ffffffffa03830d0>] kvm_arch_destroy_vm+0xf9/0x101 [kvm]
      [ 4220.237382]  [<ffffffffa036fe53>] kvm_put_kvm+0xcc/0x127 [kvm]
      [ 4220.237401]  [<ffffffffa03702bc>] kvm_vcpu_release+0x18/0x1c [kvm]
      [ 4220.237407]  [<ffffffff81145425>] __fput+0x111/0x1ed
      [ 4220.237411]  [<ffffffff8114550f>] ____fput+0xe/0x10
      [ 4220.237418]  [<ffffffff81063511>] task_work_run+0x5d/0x88
      [ 4220.237424]  [<ffffffff8104c3f7>] do_exit+0x2bf/0x7ca
      
      The test case:
      
      	printf(fmt, ##args);		\
      	exit(-1);} while (0)
      
      static int create_vm(void)
      {
      	int sys_fd, vm_fd;
      
      	sys_fd = open("/dev/kvm", O_RDWR);
      	if (sys_fd < 0)
      		die("open /dev/kvm fail.\n");
      
      	vm_fd = ioctl(sys_fd, KVM_CREATE_VM, 0);
      	if (vm_fd < 0)
      		die("KVM_CREATE_VM fail.\n");
      
      	return vm_fd;
      }
      
      static int create_vcpu(int vm_fd)
      {
      	int vcpu_fd;
      
      	vcpu_fd = ioctl(vm_fd, KVM_CREATE_VCPU, 0);
      	if (vcpu_fd < 0)
      		die("KVM_CREATE_VCPU ioctl.\n");
      	printf("Create vcpu.\n");
      	return vcpu_fd;
      }
      
      static void *vcpu_thread(void *arg)
      {
      	int vm_fd = (int)(long)arg;
      
      	create_vcpu(vm_fd);
      	return NULL;
      }
      
      int main(int argc, char *argv[])
      {
      	pthread_t thread;
      	int vm_fd;
      
      	(void)argc;
      	(void)argv;
      
      	vm_fd = create_vm();
      	pthread_create(&thread, NULL, vcpu_thread, (void *)(long)vm_fd);
      	printf("Exit.\n");
      	return 0;
      }
      
      It caused by release kvm->arch.ept_identity_map_addr which is the
      error page.
      
      The parent thread can send KILL signal to the vcpu thread when it was
      exiting which stops faulting pages and potentially allocating memory.
      So gfn_to_pfn/gfn_to_page may fail at this time
      
      Fixed by checking the page before it is used
      
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      4484141a
    • Takashi Iwai's avatar
      ALSA: hda - Fix Oops at codec reset/reconfig · 07dc59f0
      Takashi Iwai authored
      
      
      snd_hda_codec_reset() calls restore_pincfgs() where the codec is
      powered up again, which eventually tries to resume and initialize via
      the callbacks of the codec.  However, it's the place just after codec
      free callback, thus no codec callbacks should be called after that.
      On a codec like CS4206, it results in Oops due to the access in init
      callback.
      
      This patch fixes the issue by clearing the codec callbacks properly
      after freeing codec.
      
      Reported-by: default avatarDaniel J Blueman <daniel@quora.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      07dc59f0
    • Jean Delvare's avatar
      i2c-core: Fix for lockdep validator · 390946b1
      Jean Delvare authored
      
      
      If kernel is compiled with CONFIG_PROVE_LOCKING the
      validator raises an error when a multiplexer is removed
      via sysfs and sub-clients are connected to it. This is a
      false positive.
      Documentation/lockdep-design.txt recommends to handle this
      via calls to mutex_lock_nested().
      
      Based on an earlier fix from Michael Lawnick.
      
      Note that the extra code resolves to nothing unless
      CONFIG_DEBUG_LOCK_ALLOC=y.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Michael Lawnick <ml.lawnick@gmx.de>
      390946b1
    • Axel Lin's avatar
      i2c-designware: Fix build error if CONFIG_I2C_DESIGNWARE_PLATFORM=y && CONFIG_I2C_DESIGNWARE_PCI=y · e68bb91b
      Axel Lin authored
      
      
      This patch adds config I2C_DESIGNWARE_CORE in Kconfig, and let
      I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_PCI select I2C_DESIGNWARE_CORE.
      
      Because both I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_PCI can be built as
      built-in or module, we also need to export the functions in i2c-designware-core.
      
      This fixes below build error when CONFIG_I2C_DESIGNWARE_PLATFORM=y &&
      CONFIG_I2C_DESIGNWARE_PCI=y:
      
        LD      drivers/i2c/busses/built-in.o
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_clear_int':
      i2c-designware-core.c:(.text+0xa10): multiple definition of `i2c_dw_clear_int'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x928): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_init':
      i2c-designware-core.c:(.text+0x178): multiple definition of `i2c_dw_init'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x90): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `dw_readl':
      i2c-designware-core.c:(.text+0xe8): multiple definition of `dw_readl'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x0): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_isr':
      i2c-designware-core.c:(.text+0x724): multiple definition of `i2c_dw_isr'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x63c): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_xfer':
      i2c-designware-core.c:(.text+0x4b0): multiple definition of `i2c_dw_xfer'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x3c8): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_is_enabled':
      i2c-designware-core.c:(.text+0x9d4): multiple definition of `i2c_dw_is_enabled'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x8ec): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `dw_writel':
      i2c-designware-core.c:(.text+0x124): multiple definition of `dw_writel'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x3c): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_xfer_msg':
      i2c-designware-core.c:(.text+0x2e8): multiple definition of `i2c_dw_xfer_msg'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x200): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_enable':
      i2c-designware-core.c:(.text+0x9c8): multiple definition of `i2c_dw_enable'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x8e0): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_read_comp_param':
      i2c-designware-core.c:(.text+0xa24): multiple definition of `i2c_dw_read_comp_param'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x93c): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_disable':
      i2c-designware-core.c:(.text+0x9dc): multiple definition of `i2c_dw_disable'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x8f4): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_func':
      i2c-designware-core.c:(.text+0x710): multiple definition of `i2c_dw_func'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x628): first defined here
      drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_disable_int':
      i2c-designware-core.c:(.text+0xa18): multiple definition of `i2c_dw_disable_int'
      drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x930): first defined here
      make[3]: *** [drivers/i2c/busses/built-in.o] Error 1
      make[2]: *** [drivers/i2c/busses] Error 2
      make[1]: *** [drivers/i2c] Error 2
      make: *** [drivers] Error 2
      
      Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Tested-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: stable@vger.kernel.org [3.2+]
      e68bb91b
    • James Ralston's avatar
      i2c-i801: Add Device IDs for Intel Lynx Point-LP PCH · 4a8f1ddd
      James Ralston authored
      
      
      Add the SMBus Device IDs for the Intel Lynx Point-LP PCH.
      
      Signed-off-by: default avatarJames Ralston <james.d.ralston@intel.com>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      4a8f1ddd
    • Will Deacon's avatar
      ARM: 7529/1: delay: set loops_per_jiffy when moving to timer-based loop · beafa0de
      Will Deacon authored
      
      
      The delay functions may be called by some platforms between switching to
      the timer-based delay loop but before calibration. In this case, the
      initial loops_per_jiffy may not be suitable for the timer (although a
      compromise may be achievable) and delay times may be considered too
      inaccurate.
      
      This patch updates loops_per_jiffy when switching to the timer-based
      delay loop so that delays are consistent prior to calibration.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      beafa0de
    • Will Deacon's avatar
      ARM: 7528/1: uaccess: annotate [__]{get,put}_user functions with might_fault() · ad72907a
      Will Deacon authored
      
      
      The user access functions may generate a fault, resulting in invocation
      of a handler that may sleep.
      
      This patch annotates the accessors with might_fault() so that we print a
      warning if they are invoked from atomic context and help lockdep keep
      track of mmap_sem.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      ad72907a
    • Russell King's avatar
      ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS · 8404663f
      Russell King authored
      
      
      The {get,put}_user macros don't perform range checking on the provided
      __user address when !CPU_HAS_DOMAINS.
      
      This patch reworks the out-of-line assembly accessors to check the user
      address against a specified limit, returning -EFAULT if is is out of
      range.
      
      [will: changed get_user register allocation to match put_user]
      [rmk: fixed building on older ARM architectures]
      
      Reported-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      8404663f
  6. Sep 09, 2012