1. 01 Dec, 2014 3 commits
    • Mathias Krause's avatar
      drm/i915: Remove bogus __init annotation from DMI callbacks · 9b9d7b30
      Mathias Krause authored
      commit bbe1c274 upstream.
      
      The __init annotations for the DMI callback functions are wrong as this
      code can be called even after the module has been initialized, e.g. like
      this:
      
        # echo 1 > /sys/bus/pci/devices/0000:00:02.0/remove
        # modprobe i915
        # echo 1 > /sys/bus/pci/rescan
      
      The first command will remove the PCI device from the kernel's device
      list so the second command won't see it right away. But as it registers
      a PCI driver it'll see it on the third command. If the system happens to
      match one of the DMI table entries we'll try to call a function in long
      released memory and generate an Oops, at best.
      
      Fix this by removing the bogus annotation.
      
      Modpost should have caught that one but it ignores section reference
      mismatches from the .rodata section. :/
      
      Fixes: 25e341cf ("drm/i915: quirk away broken OpRegion VBT")
      Fixes: 8ca4013d ("CHROMIUM: i915: Add DMI override to skip CRT...")
      Fixes: 425d244c ("drm/i915: ignore LVDS on intel graphics systems...")
      Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Duncan Laurie <dlaurie@chromium.org>
      Cc: Jarod Wilson <jarod@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>	# Can modpost be fixed?
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      9b9d7b30
    • Mark Brown's avatar
      regmap: Fix handling of volatile registers for format_write() chips · 219fb641
      Mark Brown authored
      commit 5844a8b9 upstream.
      
      A previous over-zealous factorisation of code means that we only treat
      registers as volatile if they are readable. For most devices this is fine
      since normally most registers can be read and volatility implies
      readability but for format_write() devices where there is no readback from
      the hardware and we use volatility to mean simply uncacheability this means
      that we end up treating all registers as cacheble.
      
      A bigger refactoring of the code to clarify this is in order but as a fix
      make a minimal change and only check readability when checking volatility
      if there is no format_write() operation defined for the device.
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Tested-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      219fb641
    • Christian Borntraeger's avatar
      KVM: s390: Fix user triggerable bug in dead code · f999b196
      Christian Borntraeger authored
      commit 614a80e4 upstream.
      
      In the early days, we had some special handling for the
      KVM_EXIT_S390_SIEIC exit, but this was gone in 2009 with commit
      d7b0b5eb (KVM: s390: Make psw available on all exits, not
      just a subset).
      
      Now this switch statement is just a sanity check for userspace
      not messing with the kvm_run structure. Unfortunately, this
      allows userspace to trigger a kernel BUG. Let's just remove
      this switch statement.
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      [lizf: Backported to 3.4:
       - adjust context
       - no KVM_EXIT_S390_TSCH and KVM_EXIT_DEBUG in 3.4]
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      f999b196
  2. 25 Sep, 2014 37 commits