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

Last commit made on 2020-03-23
Get this branch:
git clone -b update-to-4.4.216 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.216
Repository:
lp:~kmously/ubuntu/+source/linux/+git/xenial

Recent commits

0e513b2... by Greg Kroah-Hartman <email address hidden>

Linux 4.4.216

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

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

d4c1fc1... by yangerkun <email address hidden>

crypto: algif_skcipher - use ZERO_OR_NULL_PTR in skcipher_recvmsg_async

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

Nowdays, we trigger a oops:
...
kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] SMP KASAN
...
Call Trace:
 [<ffffffff81a26fb1>] skcipher_recvmsg_async+0x3f1/0x1400 x86/../crypto/algif_skcipher.c:543
 [<ffffffff81a28053>] skcipher_recvmsg+0x93/0x7f0 x86/../crypto/algif_skcipher.c:723
 [<ffffffff823e43a4>] sock_recvmsg_nosec x86/../net/socket.c:702 [inline]
 [<ffffffff823e43a4>] sock_recvmsg x86/../net/socket.c:710 [inline]
 [<ffffffff823e43a4>] sock_recvmsg+0x94/0xc0 x86/../net/socket.c:705
 [<ffffffff823e464b>] sock_read_iter+0x27b/0x3a0 x86/../net/socket.c:787
 [<ffffffff817f479b>] aio_run_iocb+0x21b/0x7a0 x86/../fs/aio.c:1520
 [<ffffffff817f57c9>] io_submit_one x86/../fs/aio.c:1630 [inline]
 [<ffffffff817f57c9>] do_io_submit+0x6b9/0x10b0 x86/../fs/aio.c:1688
 [<ffffffff817f902d>] SYSC_io_submit x86/../fs/aio.c:1713 [inline]
 [<ffffffff817f902d>] SyS_io_submit+0x2d/0x40 x86/../fs/aio.c:1710
 [<ffffffff828b33c3>] tracesys_phase2+0x90/0x95

In skcipher_recvmsg_async, we use '!sreq->tsg' to determine does we
calloc fail. However, kcalloc may return ZERO_SIZE_PTR, and with this,
the latter sg_init_table will trigger the bug. Fix it be use ZERO_OF_NULL_PTR.

This function was introduced with ' commit a596999b7ddf ("crypto:
algif - change algif_skcipher to be asynchronous")', and has been removed
with 'commit e870456d8e7c ("crypto: algif_skcipher - overhaul memory
management")'.

Reported-by: Hulk Robot <email address hidden>
Signed-off-by: yangerkun <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

1bf58c9... by Mikulas Patocka <email address hidden>

dm cache: fix a crash due to incorrect work item cancelling

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

commit 7cdf6a0aae1cccf5167f3f04ecddcf648b78e289 upstream.

The crash can be reproduced by running the lvm2 testsuite test
lvconvert-thin-external-cache.sh for several minutes, e.g.:
  while :; do make check T=shell/lvconvert-thin-external-cache.sh; done

The crash happens in this call chain:
do_waker -> policy_tick -> smq_tick -> end_hotspot_period -> clear_bitset
-> memset -> __memset -- which accesses an invalid pointer in the vmalloc
area.

The work entry on the workqueue is executed even after the bitmap was
freed. The problem is that cancel_delayed_work doesn't wait for the
running work item to finish, so the work item can continue running and
re-submitting itself even after cache_postsuspend. In order to make sure
that the work item won't be running, we must use cancel_delayed_work_sync.

Also, change flush_workqueue to drain_workqueue, so that if some work item
submits itself or another work item, we are properly waiting for both of
them.

Fixes: c6b4fcbad044 ("dm: add cache target")
Cc: <email address hidden> # v3.9
Signed-off-by: Mikulas Patocka <email address hidden>
Signed-off-by: Mike Snitzer <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

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

2f43e98... by Desnes A. Nunes do Rosario

powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems

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

commit fc37a1632d40c80c067eb1bc235139f5867a2667 upstream.

PowerVM systems running compatibility mode on a few Power8 revisions are
still vulnerable to the hardware defect that loses PMU exceptions arriving
prior to a context switch.

The software fix for this issue is enabled through the CPU_FTR_PMAO_BUG
cpu_feature bit, nevertheless this bit also needs to be set for PowerVM
compatibility mode systems.

Fixes: 68f2f0d431d9ea4 ("powerpc: Add a cpu feature CPU_FTR_PMAO_BUG")
Signed-off-by: Desnes A. Nunes do Rosario <email address hidden>
Reviewed-by: Leonardo Bras <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

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

95d4303... by Dan Carpenter <email address hidden>

dmaengine: coh901318: Fix a double lock bug in dma_tc_handle()

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

commit 36d5d22090d13fd3a7a8c9663a711cbe6970aac8 upstream.

The caller is already holding the lock so this will deadlock.

Fixes: 0b58828c923e ("DMAENGINE: COH 901 318 remove irq counting")
Signed-off-by: Dan Carpenter <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Vinod Koul <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

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

0d673ff... by Dan Carpenter <email address hidden>

hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()

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

commit 44f2f882909fedfc3a56e4b90026910456019743 upstream.

This is only called from adt7462_update_device(). The caller expects it
to return zero on error. I fixed a similar issue earlier in commit
a4bf06d58f21 ("hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0")
but I missed this one.

Fixes: c0b4e3ab0c76 ("adt7462: new hwmon driver")
Signed-off-by: Dan Carpenter <email address hidden>
Reviewed-by: Darrick J. Wong <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Guenter Roeck <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

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

687f58f... by Ahmad Fatoum <email address hidden>

ARM: imx: build v7_cpu_resume() unconditionally

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

commit 512a928affd51c2dc631401e56ad5ee5d5dd68b6 upstream.

This function is not only needed by the platform suspend code, but is also
reused as the CPU resume function when the ARM cores can be powered down
completely in deep idle, which is the case on i.MX6SX and i.MX6UL(L).

Providing the static inline stub whenever CONFIG_SUSPEND is disabled means
that those platforms will hang on resume from cpuidle if suspend is disabled.

So there are two problems:

  - The static inline stub masks the linker error
  - The function is not available where needed

Fix both by just building the function unconditionally, when
CONFIG_SOC_IMX6 is enabled. The actual code is three instructions long,
so it's arguably ok to just leave it in for all i.MX6 kernel configurations.

Fixes: 05136f0897b5 ("ARM: imx: support arm power off in cpuidle for i.mx6sx")
Signed-off-by: Lucas Stach <email address hidden>
Signed-off-by: Ahmad Fatoum <email address hidden>
Signed-off-by: Rouven Czerwinski <email address hidden>
Signed-off-by: Shawn Guo <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

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

1be4429... by Jason Gunthorpe <email address hidden>

RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()

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

commit c14dfddbd869bf0c2bafb7ef260c41d9cebbcfec upstream.

The algorithm pre-allocates a cm_id since allocation cannot be done while
holding the cm.lock spinlock, however it doesn't free it on one error
path, leading to a memory leak.

Fixes: 067b171b8679 ("IB/cm: Share listening CM IDs")
Link: https://<email address hidden>
Signed-off-by: Jason Gunthorpe <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

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

c7ce3f7... by Bernard Metzler <email address hidden>

RDMA/iwcm: Fix iwcm work deallocation

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

commit 810dbc69087b08fd53e1cdd6c709f385bc2921ad upstream.

The dealloc_work_entries() function must update the work_free_list pointer
while freeing its entries, since potentially called again on same list. A
second iteration of the work list caused system crash. This happens, if
work allocation fails during cma_iw_listen() and free_cm_id() tries to
free the list again during cleanup.

Fixes: 922a8e9fb2e0 ("RDMA: iWARP Connection Manager.")
Link: https://<email address hidden>
Reported-by: <email address hidden>
Signed-off-by: Bernard Metzler <email address hidden>
Reviewed-by: Jason Gunthorpe <email address hidden>
Signed-off-by: Jason Gunthorpe <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

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

58854e5... by Charles Keepax <email address hidden>

ASoC: dapm: Correct DAPM handling of active widgets during shutdown

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

commit 9b3193089e77d3b59b045146ff1c770dd899acb1 upstream.

commit c2caa4da46a4 ("ASoC: Fix widget powerdown on shutdown") added a
set of the power state during snd_soc_dapm_shutdown to ensure the
widgets powered off. However, when commit 39eb5fd13dff
("ASoC: dapm: Delay w->power update until the changes are written")
added the new_power member of the widget structure, to differentiate
between the current power state and the target power state, it did not
update the shutdown to use the new_power member.

As new_power has not updated it will be left in the state set by the
last DAPM sequence, ie. 1 for active widgets. So as the DAPM sequence
for the shutdown proceeds it will turn the widgets on (despite them
already being on) rather than turning them off.

Fixes: 39eb5fd13dff ("ASoC: dapm: Delay w->power update until the changes are written")
Signed-off-by: Charles Keepax <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Mark Brown <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

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