~thopiekar/linux/+git/linux-stable:linux-4.20.y

Last commit made on 2019-03-19
Get this branch:
git clone -b linux-4.20.y https://git.launchpad.net/~thopiekar/linux/+git/linux-stable

Branch merges

Branch information

Name:
linux-4.20.y
Repository:
lp:~thopiekar/linux/+git/linux-stable

Recent commits

c0ad257... by Greg Kroah-Hartman <email address hidden>

Linux 4.20.17

9ad64a5... by Zha Bin <email address hidden>

vhost/vsock: fix vhost vsock cid hashing inconsistent

commit 7fbe078c37aba3088359c9256c1a1d0c3e39ee81 upstream.

The vsock core only supports 32bit CID, but the Virtio-vsock spec define
CID (dst_cid and src_cid) as u64 and the upper 32bits is reserved as
zero. This inconsistency causes one bug in vhost vsock driver. The
scenarios is:

  0. A hash table (vhost_vsock_hash) is used to map an CID to a vsock
  object. And hash_min() is used to compute the hash key. hash_min() is
  defined as:
  (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits)).
  That means the hash algorithm has dependency on the size of macro
  argument 'val'.
  0. In function vhost_vsock_set_cid(), a 64bit CID is passed to
  hash_min() to compute the hash key when inserting a vsock object into
  the hash table.
  0. In function vhost_vsock_get(), a 32bit CID is passed to hash_min()
  to compute the hash key when looking up a vsock for an CID.

Because the different size of the CID, hash_min() returns different hash
key, thus fails to look up the vsock object for an CID.

To fix this bug, we keep CID as u64 in the IOCTLs and virtio message
headers, but explicitly convert u64 to u32 when deal with the hash table
and vsock core.

Fixes: 834e772c8db0 ("vhost/vsock: fix use-after-free in network stack callers")
Link: https://github.com/stefanha/virtio/blob/vsock/trunk/content.tex
Signed-off-by: Zha Bin <email address hidden>
Reviewed-by: Liu Jiang <email address hidden>
Reviewed-by: Stefan Hajnoczi <email address hidden>
Acked-by: Jason Wang <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Shengjing Zhu <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

a16d17d... by Nicholas Kazlauskas <email address hidden>

drm: Block fb changes for async plane updates

commit 25dc194b34dd5919dd07b8873ee338182e15df9d upstream.

The prepare_fb call always happens on new_plane_state.

The drm_atomic_helper_cleanup_planes checks to see if
plane state pointer has changed when deciding to call cleanup_fb on
either the new_plane_state or the old_plane_state.

For a non-async atomic commit the state pointer is swapped, so this
helper calls prepare_fb on the new_plane_state and cleanup_fb on the
old_plane_state. This makes sense, since we want to prepare the
framebuffer we are going to use and cleanup the the framebuffer we are
no longer using.

For the async atomic update helpers this differs. The async atomic
update helpers perform in-place updates on the existing state. They call
drm_atomic_helper_cleanup_planes but the state pointer is not swapped.
This means that prepare_fb is called on the new_plane_state and
cleanup_fb is called on the new_plane_state (not the old).

In the case where old_plane_state->fb == new_plane_state->fb then
there should be no behavioral difference between an async update
and a non-async commit. But there are issues that arise when
old_plane_state->fb != new_plane_state->fb.

The first is that the new_plane_state->fb is immediately cleaned up
after it has been prepared, so we're using a fb that we shouldn't
be.

The second occurs during a sequence of async atomic updates and
non-async regular atomic commits. Suppose there are two framebuffers
being interleaved in a double-buffering scenario, fb1 and fb2:

- Async update, oldfb = NULL, newfb = fb1, prepare fb1, cleanup fb1
- Async update, oldfb = fb1, newfb = fb2, prepare fb2, cleanup fb2
- Non-async commit, oldfb = fb2, newfb = fb1, prepare fb1, cleanup fb2

We call cleanup_fb on fb2 twice in this example scenario, and any
further use will result in use-after-free.

The simple fix to this problem is to block framebuffer changes
in the drm_atomic_helper_async_check function for now.

v2: Move check by itself, add a FIXME (Daniel)

Cc: Daniel Vetter <email address hidden>
Cc: Harry Wentland <email address hidden>
Cc: Andrey Grodzovsky <email address hidden>
Cc: <email address hidden> # v4.14+
Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
Signed-off-by: Nicholas Kazlauskas <email address hidden>
Acked-by: Andrey Grodzovsky <email address hidden>
Acked-by: Harry Wentland <email address hidden>
Reviewed-by: Daniel Vetter <email address hidden>
Signed-off-by: Harry Wentland <email address hidden>
Link: https://patchwork.freedesktop.org/patch/275364/
Signed-off-by: Greg Kroah-Hartman <email address hidden>

41ded4f... by Xiao Ni <email address hidden>

It's wrong to add len to sector_nr in raid10 reshape twice

commit b761dcf1217760a42f7897c31dcb649f59b2333e upstream.

In reshape_request it already adds len to sector_nr already. It's wrong to add len to
sector_nr again after adding pages to bio. If there is bad block it can't copy one chunk
at a time, it needs to goto read_more. Now the sector_nr is wrong. It can cause data
corruption.

Cc: <email address hidden> # v3.16+
Signed-off-by: Xiao Ni <email address hidden>
Signed-off-by: Song Liu <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

e1db25f... by kbuild test robot <email address hidden>

perf/x86/intel: Make dev_attr_allow_tsx_force_abort static

commit c634dc6bdedeb0b2c750fc611612618a85639ab2 upstream.

Fixes: 400816f60c54 ("perf/x86/intel: Implement support for TSX Force Abort")
Signed-off-by: kbuild test robot <email address hidden>
Signed-off-by: Thomas Gleixner <email address hidden>
Cc: "Peter Zijlstra (Intel)" <email address hidden>
Cc: kbuild-all@01.org
Cc: Borislav Petkov <email address hidden>
Cc: "H. Peter Anvin" <email address hidden>
Cc: Kan Liang <email address hidden>
Cc: Jiri Olsa <email address hidden>
Cc: Andi Kleen <email address hidden>
Cc: <email address hidden>
Link: https://lkml.kernel.org/r/20190313184243.GA10820@lkp-sb-ep06
Signed-off-by: Greg Kroah-Hartman <email address hidden>

88aeaf2... by Peter Zijlstra <email address hidden>

perf/x86/intel: Fix memory corruption

commit ede271b059463731cbd6dffe55ffd70d7dbe8392 upstream.

Through:

  validate_event()
    x86_pmu.get_event_constraints(.idx=-1)
      tfa_get_event_constraints()
        dyn_constraint()

cpuc->constraint_list[-1] is used, which is an obvious out-of-bound access.

In this case, simply skip the TFA constraint code, there is no event
constraint with just PMC3, therefore the code will never result in the
empty set.

Fixes: 400816f60c54 ("perf/x86/intel: Implement support for TSX Force Abort")
Reported-by: Tony Jones <email address hidden>
Reported-by: "DSouza, Nelson" <email address hidden>
Signed-off-by: Peter Zijlstra (Intel) <email address hidden>
Signed-off-by: Thomas Gleixner <email address hidden>
Tested-by: Tony Jones <email address hidden>
Tested-by: "DSouza, Nelson" <email address hidden>
Cc: <email address hidden>
Cc: <email address hidden>
Cc: <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

77ca22a... by Jian-Hong Pan <email address hidden>

ALSA: hda/realtek: Enable headset MIC of Acer TravelMate X514-51T with ALC255

commit cbc05fd6708c1744ee6a61cb4c461ff956d30524 upstream.

The Acer TravelMate X514-51T with ALC255 cannot detect the headset MIC
until ALC255_FIXUP_ACER_HEADSET_MIC quirk applied. Although, the
internal DMIC uses another module - snd_soc_skl as the driver. We still
need the NID 0x1a in the quirk to enable the headset MIC.

Signed-off-by: Jian-Hong Pan <email address hidden>
Signed-off-by: Kailang Yang <email address hidden>
Cc: <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

fe22c26... by Takashi Iwai

ALSA: hda/realtek - Reduce click noise on Dell Precision 5820 headphone

commit c0ca5eced22215c1e03e3ad479f8fab0bbb30772 upstream.

Dell Precision 5820 with ALC3234 codec (which is equivalent with
ALC255) shows click noises at (runtime) PM resume on the headphone.
The biggest source of the noise comes from the cleared headphone pin
control at resume, which is done via the standard shutup procedure.

Although we have an override of the standard shutup callback to
replace with NOP, this would skip other needed stuff (e.g. the pull
down of headset power). So, instead, this "fixes" the behavior of
alc_fixup_no_shutup() by introducing spec->no_shutup_pins flag.
When this flag is set, Realtek codec won't call the standard
snd_hda_shutup_pins() & co. Now alc_fixup_no_shutup() just sets this
flag instead of overriding spec->shutup callback itself. This allows
us to apply the similar fix for other entries easily if needed in
future.

Cc: <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

6454695... by Jian-Hong Pan <email address hidden>

ALSA: hda/realtek: Enable audio jacks of ASUS UX362FA with ALC294

commit 8bb37a2a4d7c02affef554f5dc05f6d2e39c31f9 upstream.

The ASUS UX362FA with ALC294 cannot detect the headset MIC and outputs
through the internal speaker and the headphone. This issue can be fixed
by the quirk in the commit 4e0511067 ALSA: hda/realtek: Enable audio
jacks of ASUS UX533FD with ALC294.

Besides, ASUS UX362FA and UX533FD have the same audio initial pin config
values. So, this patch replaces SND_PCI_QUIRK of UX533FD with a new
SND_HDA_PIN_QUIRK which benefits both UX362FA and UX533FD.

Fixes: 4e051106730d ("ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294")
Signed-off-by: Jian-Hong Pan <email address hidden>
Signed-off-by: Ming Shuo Chiu <email address hidden>
Cc: <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

320ccac... by Jaroslav Kysela <email address hidden>

ALSA: hda - add more quirks for HP Z2 G4 and HP Z240

commit 167897f4b32c2bc18b3b6183029a33fb420a114e upstream.

Apply the HP_MIC_NO_PRESENCE fixups for the more HP Z2 G4 and
HP Z240 models.

Reported-by: Jeff Burrell <email address hidden>
Signed-off-by: Jaroslav Kysela <email address hidden>
Cc: <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>