1. 21 5月, 2015 1 次提交
  2. 19 5月, 2015 2 次提交
  3. 16 5月, 2015 6 次提交
  4. 15 5月, 2015 2 次提交
  5. 14 5月, 2015 3 次提交
    • D
      drm/radeon: don't do mst probing if MST isn't enabled. · bed447e7
      Dave Airlie 提交于
      This causes an oops as we haven't initialised the mst
      layer.
      Reported-by: NDave Jones <&lt;davej@codemonkey.org.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      bed447e7
    • J
      firmware: dmi_scan: Fix ordering of product_uuid · 5c1ac56b
      Jean Delvare 提交于
      In function dmi_present(), dmi_walk_early() calls dmi_table(), which
      calls dmi_decode(), which ultimately calls dmi_save_uuid(). This last
      function makes a decision based on the value of global variable
      dmi_ver. The problem is that this variable is set right _after_
      dmi_walk_early() returns. So dmi_save_uuid() always sees dmi_ver == 0
      regardless of the actual version implemented.
      
      This causes /sys/class/dmi/id/product_uuid to always use the old
      ordering even on systems implementing DMI/SMBIOS 2.6 or later, which
      should use the new ordering.
      
      This is broken since kernel v3.8 for legacy DMI implementations and
      since kernel v3.10 for SMBIOS 2 implementations. SMBIOS 3
      implementations with the 64-bit entry point are not affected.
      
      The first breakage does not matter much as in practice legacy DMI
      implementations are always for versions older than 2.6, which is when
      the UUID ordering changed. The second breakage is more problematic as
      it affects the vast majority of x86 systems manufactured since 2009.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Fixes: 9f9c9cbb ("drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists")
      Fixes: 79bae42d ("dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present()")
      Acked-by: NZhenzhong Duan <zhenzhong.duan@oracle.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Artem Savkov <artem.savkov@gmail.com>
      Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Cc: Matt Fleming <matt.fleming@intel.com>
      Cc: stable@vger.kernel.org [v3.10+]
      5c1ac56b
    • J
      firmware: dmi_scan: Simplified displayed version · c2493045
      Jean Delvare 提交于
      The trailing .x adds no information for the reader, and if anyone
      tries to parse that line, this is more work as they have 3 different
      formats to handle instead of 2. Plus, this makes backporting fixes
      harder.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Fixes: 95be58df ("firmware: dmi_scan: Use full dmi version for SMBIOS3")
      Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      c2493045
  6. 13 5月, 2015 13 次提交
  7. 12 5月, 2015 6 次提交
  8. 11 5月, 2015 7 次提交
    • S
      net: qca_spi: Fix possible race during probe · 268be0f7
      Stefan Wahren 提交于
      Registering the netdev before setting the priv data is unsafe.
      So fix this possible race by setting the priv data first.
      Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com>
      Cc: <stable@vger.kernel.org> # v3.18+
      Fixes: 291ab06e (net: qualcomm: new Ethernet over SPI driver for QCA7000)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      268be0f7
    • P
      drm/i915: Avoid GPU hang when coming out of s3 or s4 · 364aece0
      Peter Antoine 提交于
      This patch fixes a timing issue that causes a GPU hang when the system
      comes out of power saving.
      
      During pm_resume, We are submitting batchbuffers before enabling
      Interrupts this is causing us to miss the context switch interrupt,
      and in consequence intel_execlists_handle_ctx_events is not triggered.
      
      This patch is based on a patch from Deepak S <deepak.s@intel.com>
      from another platform.
      
      The patch fixes an issue introduced by:
        commit e7778be1
        drm/i915: Fix startup failure in LRC mode after recent init changes
      
      The above patch added a call to init_context() to fix an issue introduced
      by a previous patch. But, it then opened up a small timing window for the
      batches being added by the init_context (basically setting up the context)
      to complete before the interrupts have been turned on, thus hanging the
      GPU.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89600
      Cc: stable@vger.kernel.org # 4.0+
      Signed-off-by: NPeter Antoine <peter.antoine@intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      [Jani: fixed typo in subject, massaged the comments a bit]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      364aece0
    • B
      net: mdio-gpio: Allow for unspecified bus id · 7c0c8268
      Bert Vermeulen 提交于
      When the bus id was supplied via a struct platform_device, the driver wasn't
      handling -1 to mean an unspecified id of the only instance of this driver,
      as the platform spec requires.
      Signed-off-by: NBert Vermeulen <bert@biot.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c0c8268
    • M
      bnx2x: limit fw delay in kdump to 5s after boot · cd9c3997
      Michal Schmidt 提交于
      Commit 12a8541d "bnx2x: Delay during kdump load" added a 5 seconds
      delay to bnx2x's probe function in the kdump case to let the firmware
      realize the old driver is gone.
      
      The problem with the delay is that it is per-device, so if you have
      several bnx2x NICs in NPAR mode, the delays can accumulate to minutes.
      
      Fix it by adjusting the delay so that we do not wait more than
      necessary, i.e. no more delaying after 5 seconds of kernel boot time.
      Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd9c3997
    • M
      drm: Zero out invalid vblank timestamp in drm_update_vblank_count. · fdb68e09
      Mario Kleiner 提交于
      Since commit 844b03f2 we make
      sure that after vblank irq off, we return the last valid
      (vblank count, vblank timestamp) pair to clients, e.g., during
      modesets, which is good.
      
      An overlooked side effect of that commit for kms drivers without
      support for precise vblank timestamping is that at vblank irq
      enable, when we update the vblank counter from the hw counter, we
      can't update the corresponding vblank timestamp, so now we have a
      totally mismatched timestamp for the new count to confuse clients.
      
      Restore old client visible behaviour from before Linux 3.17, but
      zero out the timestamp at vblank counter update (instead of disable
      as in original implementation) if we can't generate a meaningful
      timestamp immediately for the new vblank counter. This will fix
      this regression, so callers know they need to retry again later
      if they need a valid timestamp, but at the same time preserves
      the improvements made in the commit mentioned above.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: <stable@vger.kernel.org> #v3.17+
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      fdb68e09
    • P
      pty: Fix input race when closing · 1a48632f
      Peter Hurley 提交于
      A read() from a pty master may mistakenly indicate EOF (errno == -EIO)
      after the pty slave has closed, even though input data remains to be read.
      For example,
      
             pty slave       |        input worker        |    pty master
                             |                            |
                             |                            |   n_tty_read()
      pty_write()            |                            |     input avail? no
        add data             |                            |     sleep
        schedule worker  --->|                            |     .
                             |---> flush_to_ldisc()       |     .
      pty_close()            |       fill read buffer     |     .
        wait for worker      |       wakeup reader    --->|     .
                             |       read buffer full?    |---> input avail ? yes
                             |<---   yes - exit worker    |     copy 4096 bytes to user
        TTY_OTHER_CLOSED <---|                            |<--- kick worker
                             |                            |
      
      		                **** New read() before worker starts ****
      
                             |                            |   n_tty_read()
                             |                            |     input avail? no
                             |                            |     TTY_OTHER_CLOSED? yes
                             |                            |     return -EIO
      
      Several conditions are required to trigger this race:
      1. the ldisc read buffer must become full so the input worker exits
      2. the read() count parameter must be >= 4096 so the ldisc read buffer
         is empty
      3. the subsequent read() occurs before the kicked worker has processed
         more input
      
      However, the underlying cause of the race is that data is pipelined, while
      tty state is not; ie., data already written by the pty slave end is not
      yet visible to the pty master end, but state changes by the pty slave end
      are visible to the pty master end immediately.
      
      Pipeline the TTY_OTHER_CLOSED state through input worker to the reader.
      1. Introduce TTY_OTHER_DONE which is set by the input worker when
         TTY_OTHER_CLOSED is set and either the input buffers are flushed or
         input processing has completed. Readers/polls are woken when
         TTY_OTHER_DONE is set.
      2. Reader/poll checks TTY_OTHER_DONE instead of TTY_OTHER_CLOSED.
      3. A new input worker is started from pty_close() after setting
         TTY_OTHER_CLOSED, which ensures the TTY_OTHER_DONE state will be
         set if the last input worker is already finished (or just about to
         exit).
      
      Remove tty_flush_to_ldisc(); no in-tree callers.
      
      Fixes: 52bce7f8 ("pty, n_tty: Simplify input processing on final close")
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96311
      BugLink: http://bugs.launchpad.net/bugs/1429756
      Cc: <stable@vger.kernel.org> # 3.19+
      Reported-by: NAndy Whitcroft <apw@canonical.com>
      Reported-by: NH.J. Lu <hjl.tools@gmail.com>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1a48632f
    • P
      tty/n_gsm.c: fix a memory leak when gsmtty is removed · 8f9cfeed
      Pan Xinhui 提交于
      when gsmtty_remove put dlci, it will cause memory leak if dlci->port's refcount is zero.
      So we do the cleanup work in .cleanup callback instead.
      
      dlci will be last put in two call chains.
      1) gsmld_close -> gsm_cleanup_mux -> gsm_dlci_release -> dlci_put
      2) gsmld_remove -> dlci_put
      so there is a race. the memory leak depends on the race.
      
      In call chain 2. we hit the memory leak. below comment tells.
      
      release_tty -> tty_driver_remove_tty -> gsmtty_remove -> dlci_put -> tty_port_destructor (WARN_ON(port->itty) and return directly)
                               |
                      tty->port->itty = NULL;
                               |
                      tty_kref_put ---> release_one_tty -> gsmtty_cleanup (added by our patch)
      
      So our patch fix the memory leak by doing the cleanup work after tty core did.
      Signed-off-by: NPan Xinhui <xinhuix.pan@intel.com>
      Fixes: dfabf7ff
      Cc: stable <stable@vger.kernel.org> # 3.14+
      Acked-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8f9cfeed