1. 08 Dec, 2011 1 commit
  2. 07 Dec, 2011 7 commits
    • Anton Vorontsov's avatar
      of/irq: Get rid of NO_IRQ usage · 77a7300a
      Anton Vorontsov authored
      PPC32/64 defines NO_IRQ to zero, so no problems expected.
      ARM defines NO_IRQ to -1, but OF code relies on IRQ domains support,
      which returns correct ('0') value in 'no irq' case. So everything
      should be fine.
      
      Other arches might break if some of their OF drivers rely on NO_IRQ
      being not 0. If so, the drivers must be fixed, finally.
      
      [ Rob Herring points out that microblaze should be fixed, and has posted
        a patch for testing for that.   - Linus ]
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      77a7300a
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 10ec5e6c
      Linus Torvalds authored
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        vmwgfx: Use kcalloc instead of kzalloc to allocate array
        drm/i915: fix infinite recursion on unbind due to ilk vt-d w/a
        drm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_id
      10ec5e6c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 3172f8fe
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix apparmor dereferencing potentially freed dentry, sanitize __d_path() API
      3172f8fe
    • Thomas Meyer's avatar
      vmwgfx: Use kcalloc instead of kzalloc to allocate array · 24bb5a0c
      Thomas Meyer authored
      The advantage of kcalloc is, that will prevent integer overflows which could
      result from the multiplication of number of elements and size and it is also
      a bit nicer to read.
      
      The semantic patch that makes this change is available
      in https://lkml.org/lkml/2011/11/25/107Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
      Reviewed-by: default avatarJakob Bornecrantz <jakob@vmware.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      24bb5a0c
    • Daniel Vetter's avatar
      drm/i915: fix infinite recursion on unbind due to ilk vt-d w/a · eb1711bb
      Daniel Vetter authored
      The recursion loop goes retire_requests->unbind->gpu_idle->retire_reqeusts.
      
      Every time we go through this we need a
      - active object that can be retired
      - and there are no other references to that object than the one from
        the active list, so that it gets unbound and freed immediately.
      Otherwise the recursion stops. So the recursion is only limited by the
      number of objects that fit these requirements sitting in the active list
      any time retire_request is called.
      
      Issue exercised by tests/gem_unref_active_buffers from i-g-t.
      
      There's been a decent bikeshed discussion whether it wouldn't be
      better to pass around a flag, but imo this is o.k. for such a limited
      case that only supports a w/a.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42180Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson>
      [ickle- we built better bikesheds, but this keeps the rain off for now]
      Tested-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      eb1711bb
    • Alex Deucher's avatar
      drm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_id · dc87cd5c
      Alex Deucher authored
      Seems like something got mis-merged here.
      
      Noticed by kallisti5 on IRC.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      dc87cd5c
    • Al Viro's avatar
      fix apparmor dereferencing potentially freed dentry, sanitize __d_path() API · 02125a82
      Al Viro authored
      __d_path() API is asking for trouble and in case of apparmor d_namespace_path()
      getting just that.  The root cause is that when __d_path() misses the root
      it had been told to look for, it stores the location of the most remote ancestor
      in *root.  Without grabbing references.  Sure, at the moment of call it had
      been pinned down by what we have in *path.  And if we raced with umount -l, we
      could have very well stopped at vfsmount/dentry that got freed as soon as
      prepend_path() dropped vfsmount_lock.
      
      It is safe to compare these pointers with pre-existing (and known to be still
      alive) vfsmount and dentry, as long as all we are asking is "is it the same
      address?".  Dereferencing is not safe and apparmor ended up stepping into
      that.  d_namespace_path() really wants to examine the place where we stopped,
      even if it's not connected to our namespace.  As the result, it looked
      at ->d_sb->s_magic of a dentry that might've been already freed by that point.
      All other callers had been careful enough to avoid that, but it's really
      a bad interface - it invites that kind of trouble.
      
      The fix is fairly straightforward, even though it's bigger than I'd like:
      	* prepend_path() root argument becomes const.
      	* __d_path() is never called with NULL/NULL root.  It was a kludge
      to start with.  Instead, we have an explicit function - d_absolute_root().
      Same as __d_path(), except that it doesn't get root passed and stops where
      it stops.  apparmor and tomoyo are using it.
      	* __d_path() returns NULL on path outside of root.  The main
      caller is show_mountinfo() and that's precisely what we pass root for - to
      skip those outside chroot jail.  Those who don't want that can (and do)
      use d_path().
      	* __d_path() root argument becomes const.  Everyone agrees, I hope.
      	* apparmor does *NOT* try to use __d_path() or any of its variants
      when it sees that path->mnt is an internal vfsmount.  In that case it's
      definitely not mounted anywhere and dentry_path() is exactly what we want
      there.  Handling of sysctl()-triggered weirdness is moved to that place.
      	* if apparmor is asked to do pathname relative to chroot jail
      and __d_path() tells it we it's not in that jail, the sucker just calls
      d_absolute_path() instead.  That's the other remaining caller of __d_path(),
      BTW.
              * seq_path_root() does _NOT_ return -ENAMETOOLONG (it's stupid anyway -
      the normal seq_file logics will take care of growing the buffer and redoing
      the call of ->show() just fine).  However, if it gets path not reachable
      from root, it returns SEQ_SKIP.  The only caller adjusted (i.e. stopped
      ignoring the return value as it used to do).
      Reviewed-by: default avatarJohn Johansen <john.johansen@canonical.com>
      ACKed-by: default avatarJohn Johansen <john.johansen@canonical.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: stable@vger.kernel.org
      02125a82
  3. 06 Dec, 2011 13 commits
  4. 05 Dec, 2011 19 commits