~kmously/ubuntu/+source/linux/+git/xenial:update-to-4.4.215

Last commit made on 2020-03-23
Get this branch:
git clone -b update-to-4.4.215 https://git.launchpad.net/~kmously/ubuntu/+source/linux/+git/xenial
Only Khaled El Mously can upload to this branch. If you are Khaled El Mously please log in for upload directions.

Branch merges

Branch information

Name:
update-to-4.4.215
Repository:
lp:~kmously/ubuntu/+source/linux/+git/xenial

Recent commits

56046bc... by Greg Kroah-Hartman <email address hidden>

Linux 4.4.215

BugLink: https://bugs.launchpad.net/bugs/1868627

Signed-off-by: Khalid Elmously <email address hidden>

c316871... by tglx

xen: Enable interrupts when calling _cond_resched()

BugLink: https://bugs.launchpad.net/bugs/1868627

commit 8645e56a4ad6dcbf504872db7f14a2f67db88ef2 upstream.

xen_maybe_preempt_hcall() is called from the exception entry point
xen_do_hypervisor_callback with interrupts disabled.

_cond_resched() evades the might_sleep() check in cond_resched() which
would have caught that and schedule_debug() unfortunately lacks a check
for irqs_disabled().

Enable interrupts around the call and use cond_resched() to catch future
issues.

Fixes: fdfd811ddde3 ("x86/xen: allow privcmd hypercalls to be preempted")
Signed-off-by: Thomas Gleixner <email address hidden>
Link: https://<email address hidden>
Reviewed-by: Juergen Gross <email address hidden>
Signed-off-by: Boris Ostrovsky <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>

6d56469... by Takashi Iwai

ALSA: seq: Fix concurrent access to queue current tick/time

BugLink: https://bugs.launchpad.net/bugs/1868627

commit dc7497795e014d84699c3b8809ed6df35352dd74 upstream.

snd_seq_check_queue() passes the current tick and time of the given
queue as a pointer to snd_seq_prioq_cell_out(), but those might be
updated concurrently by the seq timer update.

Fix it by retrieving the current tick and time via the proper helper
functions at first, and pass those values to snd_seq_prioq_cell_out()
later in the loops.

snd_seq_timer_get_cur_time() takes a new argument and adjusts with the
current system time only when it's requested so; this update isn't
needed for snd_seq_check_queue(), as it's called either from the
interrupt handler or right after queuing.

Also, snd_seq_timer_get_cur_tick() is changed to read the value in the
spinlock for the concurrency, too.

Reported-by: <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>

0904972... by Takashi Iwai

ALSA: seq: Avoid concurrent access to queue flags

BugLink: https://bugs.launchpad.net/bugs/1868627

commit bb51e669fa49feb5904f452b2991b240ef31bc97 upstream.

The queue flags are represented in bit fields and the concurrent
access may result in unexpected results. Although the current code
should be mostly OK as it's only reading a field while writing other
fields as KCSAN reported, it's safer to cover both with a proper
spinlock protection.

This patch fixes the possible concurrent read by protecting with
q->owner_lock. Also the queue owner field is protected as well since
it's the field to be protected by the lock itself.

Reported-by: <email address hidden>
Reported-by: <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>

6351bdb... by Takashi Iwai

ALSA: rawmidi: Avoid bit fields for state flags

BugLink: https://bugs.launchpad.net/bugs/1868627

commit dfa9a5efe8b932a84b3b319250aa3ac60c20f876 upstream.

The rawmidi state flags (opened, append, active_sensing) are stored in
bit fields that can be potentially racy when concurrently accessed
without any locks. Although the current code should be fine, there is
also no any real benefit by keeping the bitfields for this kind of
short number of members.

This patch changes those bit fields flags to the simple bool fields.
There should be no size increase of the snd_rawmidi_substream by this
change.

Reported-by: <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>

532f431... by Aditya Pakki <email address hidden>

ecryptfs: replace BUG_ON with error handling code

BugLink: https://bugs.launchpad.net/bugs/1868627

commit 2c2a7552dd6465e8fde6bc9cccf8d66ed1c1eb72 upstream.

In crypt_scatterlist, if the crypt_stat argument is not set up
correctly, the kernel crashes. Instead, by returning an error code
upstream, the error is handled safely.

The issue is detected via a static analysis tool written by us.

Fixes: 237fead619984 (ecryptfs: fs/Makefile and fs/Kconfig)
Signed-off-by: Aditya Pakki <email address hidden>
Signed-off-by: Tyler Hicks <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>

83a2b55... by Bart Van Assche

scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session"

BugLink: https://bugs.launchpad.net/bugs/1868627

commit 807b9515b7d044cf77df31f1af9d842a76ecd5cb upstream.

Since commit e9d3009cb936 introduced a regression and since the fix for
that regression was not perfect, revert this commit.

Link: https://marc.info/?l=target-devel&m=158157054906195
Cc: Rahul Kundu <email address hidden>
Cc: Mike Marciniszyn <email address hidden>
Cc: Sagi Grimberg <email address hidden>
Reported-by: Dakshaja Uppalapati <email address hidden>
Fixes: e9d3009cb936 ("scsi: target: iscsi: Wait for all commands to finish before freeing a session")
Signed-off-by: Bart Van Assche <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>

68e4e27... by Bart Van Assche

scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout"

BugLink: https://bugs.launchpad.net/bugs/1868627

commit 76261ada16dcc3be610396a46d35acc3efbda682 upstream.

Since commit 04060db41178 introduces soft lockups when toggling network
interfaces, revert it.

Link: https://marc.info/?l=target-devel&m=158157054906196
Cc: Rahul Kundu <email address hidden>
Cc: Mike Marciniszyn <email address hidden>
Cc: Sagi Grimberg <email address hidden>
Reported-by: Dakshaja Uppalapati <email address hidden>
Fixes: 04060db41178 ("scsi: RDMA/isert: Fix a recently introduced regression related to logout")
Signed-off-by: Bart Van Assche <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>

7766bd5... by Filipe Manana <email address hidden>

Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents

BugLink: https://bugs.launchpad.net/bugs/1868627

commit e75fd33b3f744f644061a4f9662bd63f5434f806 upstream.

In btrfs_wait_ordered_range() once we find an ordered extent that has
finished with an error we exit the loop and don't wait for any other
ordered extents that might be still in progress.

All the users of btrfs_wait_ordered_range() expect that there are no more
ordered extents in progress after that function returns. So past fixes
such like the ones from the two following commits:

  ff612ba7849964 ("btrfs: fix panic during relocation after ENOSPC before
                   writeback happens")

  28aeeac1dd3080 ("Btrfs: fix panic when starting bg cache writeout after
                   IO error")

don't work when there are multiple ordered extents in the range.

Fix that by making btrfs_wait_ordered_range() wait for all ordered extents
even after it finds one that had an error.

Link: https://github.com/kdave/btrfs-progs/issues/228#issuecomment-569777554
CC: <email address hidden> # 4.4+
Reviewed-by: Qu Wenruo <email address hidden>
Reviewed-by: Josef Bacik <email address hidden>
Signed-off-by: Filipe Manana <email address hidden>
Signed-off-by: David Sterba <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>

1b4cd01... by Miaohe Lin <email address hidden>

KVM: apic: avoid calculating pending eoi from an uninitialized val

BugLink: https://bugs.launchpad.net/bugs/1868627

commit 23520b2def95205f132e167cf5b25c609975e959 upstream.

When pv_eoi_get_user() fails, 'val' may remain uninitialized and the return
value of pv_eoi_get_pending() becomes random. Fix the issue by initializing
the variable.

Reviewed-by: Vitaly Kuznetsov <email address hidden>
Signed-off-by: Miaohe Lin <email address hidden>
Cc: <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>