platform/kernel/linux-amlogic.git
4 years agoMerge tag 'v4.9.219' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Mon, 13 Jul 2020 16:53:45 +0000 (13:53 -0300)]
Merge tag 'v4.9.219' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.219 stable release

Change-Id: I1cb302600e983a1dddadf6236ea8b76f6511a177

4 years agoODROID-N2: arm64/dts: add missing USB3 phy node entry
Dongjin Kim [Sat, 11 Jul 2020 12:51:27 +0000 (21:51 +0900)]
ODROID-N2: arm64/dts: add missing USB3 phy node entry

Change-Id: I38f3dfd4a0024de93d9816cfe4f71679666d833b
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
4 years agoODROID-N2PLUS: arm64/dts: add fan cooler mapping
Dongjin Kim [Wed, 24 Jun 2020 02:48:59 +0000 (11:48 +0900)]
ODROID-N2PLUS: arm64/dts: add fan cooler mapping

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I7c60abb9598905687347185b301e457fd300e578

4 years agoODROID-N2PLUS: arm64/dts: remove 'gpio_power' property for uSD
Dongjin Kim [Tue, 30 Jun 2020 07:50:45 +0000 (16:50 +0900)]
ODROID-N2PLUS: arm64/dts: remove 'gpio_power' property for uSD

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: If0cdb30ff5a235ce58a412beaa257c97acb0c72c

4 years agoODROID-N2/N2-PLUS: Default freq setting and cpu max_freq limit setting.
femto [Wed, 18 Dec 2019 05:16:51 +0000 (14:16 +0900)]
ODROID-N2/N2-PLUS: Default freq setting and cpu max_freq limit setting.

board_is_odroidn2 (): Both N2 and N2plus return 'true'

if (is_meson_g12b_cpu() && is_meson_rev_a()) // ODROID-N2
else                                         // ODROID-N2Plus

N2_A53_DEFAULT 1896000 /* N2 Core A53 */
N2_A73_DEFAULT 1800000 /* N2 Core A73 */

N2PLUS_A53_DEFAULT 1908000 /* N2 Plus Core A53 */
N2PLUS_A73_DEFAULT 2208000 /* N2 Plus Core A73 */

Signed-off-by: femto <ckkim@hardkernel.com>
Change-Id: I32fa6b37f54560e9071cf650c74f972b36fc4af2

4 years agoODROID-N2: arch/arm64: add new device tree for ODROID-N2PLUS
femto [Wed, 11 Dec 2019 09:21:55 +0000 (18:21 +0900)]
ODROID-N2: arch/arm64: add new device tree for ODROID-N2PLUS

Support g12b rev_b or higher.
  A73 opp_table max_freq = 2400 MHz
  A53 opp_table max_freq = 2016 MHz

Signed-off-by: femto <ckkim@hardkernel.com>
Change-Id: If031a50e9cfc6e7115b87b053e24573f25e325fb

4 years agoODROID-C4: move Hifi-Shield supports as DTBO
Dongjin Kim [Mon, 25 May 2020 07:14:49 +0000 (16:14 +0900)]
ODROID-C4: move Hifi-Shield supports as DTBO

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I5794046e446e6b55bccf9b062ebd62f2108f0f00

4 years agoODROID-COMMON: arm64/dts: Extract spidev node from main dts to spi0 dtbo
Deokgyu Yang [Fri, 29 May 2020 03:23:26 +0000 (12:23 +0900)]
ODROID-COMMON: arm64/dts: Extract spidev node from main dts to spi0 dtbo

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I2ceb31b971970b96e0113e528b4c174d81d35258

4 years agoODROID-COMMON: arm64/dts: Rename uart DTBOs to use numerical order
Deokgyu Yang [Fri, 29 May 2020 03:19:23 +0000 (12:19 +0900)]
ODROID-COMMON: arm64/dts: Rename uart DTBOs to use numerical order

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: Ie9d2325e83d9cbb4accfc21e5bac26f86275ed24

4 years agoODROID-COMMON: arm64/dts: move can0 node to each overlay directory
Hyeonki Hong [Fri, 29 May 2020 02:58:47 +0000 (11:58 +0900)]
ODROID-COMMON: arm64/dts: move can0 node to each overlay directory

Change-Id: Id193255239af6dbe0b8e7a80779ea5f3cfee2e6b

4 years agoODROID-COMMON: arm64/dts: move onewire node to each overlay directory
Hyeonki Hong [Mon, 25 May 2020 08:22:45 +0000 (17:22 +0900)]
ODROID-COMMON: arm64/dts: move onewire node to each overlay directory

Change-Id: Id0262986d0faceba5997e8bff9d89833aff8f5a0

4 years agoODROID-C4/N2: fix to remove compile warning of 'Warning (reg_format): "reg" property...
Dongjin Kim [Tue, 26 May 2020 03:15:05 +0000 (12:15 +0900)]
ODROID-C4/N2: fix to remove compile warning of 'Warning (reg_format): "reg" property in ...'

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Idd344270f12652a45511fad02330efd7b0a0ea98

4 years agoODROID-N2: arm64/dts: fix spidev compatible
Hyeonki Hong [Thu, 28 May 2020 09:42:45 +0000 (18:42 +0900)]
ODROID-N2: arm64/dts: fix spidev compatible

Change-Id: I42409d3092f6ee0db9b6c6c64050316727ed4e8b

4 years agoODROID-COMMON: arm64/dts: Move peripheral nodes from dts to each dtbos
Deokgyu Yang [Tue, 19 May 2020 08:36:07 +0000 (17:36 +0900)]
ODROID-COMMON: arm64/dts: Move peripheral nodes from dts to each dtbos

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I5ffdd2a3ab7051e9866d92d5d91731a33641e534

4 years agoODROID-N2: arm64/dts: Add overlays for hktft32, hktft35
Deokgyu Yang [Mon, 18 May 2020 08:40:33 +0000 (17:40 +0900)]
ODROID-N2: arm64/dts: Add overlays for hktft32, hktft35

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I7de72a741013e9275a0a8b6fe827119799701d92

4 years agoODROID-N2: arm64/dts: Add sx865x node to support HK 3.5 inch touchscreen shield
Deokgyu Yang [Mon, 18 May 2020 08:33:43 +0000 (17:33 +0900)]
ODROID-N2: arm64/dts: Add sx865x node to support HK 3.5 inch touchscreen shield

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: Iee5fa7ce0c43faf60fe651799b93bfb505a41378

4 years agoODROID-N2: arm64/dts: Add ads7846 node to support HK 3.2 inch touchscreen shield
Deokgyu Yang [Mon, 18 May 2020 08:33:19 +0000 (17:33 +0900)]
ODROID-N2: arm64/dts: Add ads7846 node to support HK 3.2 inch touchscreen shield

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: Iea8abff3a8b96009e1a741611508b925cb5c0b61

4 years agoODROID-N2: arm64/dts: Add hktft32 node to support HK 3.2 inch touchscreen shield
Deokgyu Yang [Mon, 18 May 2020 08:22:11 +0000 (17:22 +0900)]
ODROID-N2: arm64/dts: Add hktft32 node to support HK 3.2 inch touchscreen shield

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I1cbe2fa7479a211fd0a13923b5ef29ae2d0a5a84

4 years agoODROID-N2: arm64/dts: Add hktft35 node to support HK 3.5 inch touchscreen shield
Deokgyu Yang [Mon, 18 May 2020 08:20:34 +0000 (17:20 +0900)]
ODROID-N2: arm64/dts: Add hktft35 node to support HK 3.5 inch touchscreen shield

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I940a0f5509c84d5a5d8367b38b2aaaac234dcf61

4 years agoODROID-N2: arm64/dts: Change saradc node's status to okay
Deokgyu Yang [Mon, 18 May 2020 08:09:42 +0000 (17:09 +0900)]
ODROID-N2: arm64/dts: Change saradc node's status to okay

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: Icf2d114c3ad81b6a5268a7d9811b0e584b50a732

4 years agoODROID-COMMON: dts/overlays: Introduce device tree overlays
Yang Deokgyu [Wed, 2 Oct 2019 09:42:50 +0000 (18:42 +0900)]
ODROID-COMMON: dts/overlays: Introduce device tree overlays

Copy *.dtbo files at arch/arm64/boot/dts/amlogic/overlays to boot
partition, e.g, /media/boot/overlays/. Then use "fdtoverlay" tool
to integrate DTB and DTBOs. Or, you also can use "fdt apply" u-boot
command to prepare device tree blob at booting time.

Signed-off-by: Yang Deokgyu <secugyu@gmail.com>
Change-Id: Ie68abf53d832d82b17b186093d7cb04f62991aef

4 years agoODROID-C4: arm64/dts: remove 'gpio_power' property for uSD
Dongjin Kim [Tue, 30 Jun 2020 07:50:45 +0000 (16:50 +0900)]
ODROID-C4: arm64/dts: remove 'gpio_power' property for uSD

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Ib57acd78207ea6deb5c548693ec102b554a7439f

4 years agoODROID-COMMON: config: enable default thermal governer as 'STEP_WISE'
Dongjin Kim [Mon, 22 Jun 2020 06:10:16 +0000 (15:10 +0900)]
ODROID-COMMON: config: enable default thermal governer as 'STEP_WISE'

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I621711d6838d0e127e37addba0f3e8e437e36450

4 years agoODROID-COMMON: config: add to enable 'REGULATOR_FIXED_VOLTAGE'
Dongjin Kim [Tue, 9 Jun 2020 06:37:26 +0000 (15:37 +0900)]
ODROID-COMMON: config: add to enable 'REGULATOR_FIXED_VOLTAGE'

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I3277949b1ec8febe9fded094fd1069837495199f

4 years agoODROID-COMMON: arm64/dts: add new device node for 'spifc'
Dongjin Kim [Wed, 22 Jan 2020 06:42:27 +0000 (15:42 +0900)]
ODROID-COMMON: arm64/dts: add new device node for 'spifc'

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I929f4e43aecf0511b01b1cff5648e230d79f43a6

4 years agoODROID-G12: config: enable usb printer support
Mauro (mdrjr) Ribeiro [Mon, 8 Jun 2020 13:19:25 +0000 (10:19 -0300)]
ODROID-G12: config: enable usb printer support

Change-Id: Icc93469e881746314b91969ef038bfa488b1dd93

4 years agoODROID-C4:Fixed i2s clock setting error.
ckkim [Thu, 4 Jun 2020 08:16:21 +0000 (17:16 +0900)]
ODROID-C4:Fixed i2s clock setting error.

Hifi-shield and spi interconnection problem no longer occur.

Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: I4f6b1baec34371ac19638c5e47b8fa675f178c5a

4 years agoODROID-C4:Support I2S sound card.(HiFi-shield series)
ckkim [Fri, 22 May 2020 03:21:08 +0000 (12:21 +0900)]
ODROID-C4:Support I2S sound card.(HiFi-shield series)

Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: I09872a79dd879da6cd606edf1ed97653a4732a44

4 years agoRevert "drivers/amlogic: update media_modules"
Dongjin Kim [Thu, 14 May 2020 17:39:03 +0000 (02:39 +0900)]
Revert "drivers/amlogic: update media_modules"

This reverts commit 1cae8761354481e567b97f519a0fed536d561632.

Change-Id: Id39df76ac389699293f8d52ee5874ba60edd7d7f

4 years agoRevert "drivers/amlogic: update media_modules"
Mauro (mdrjr) Ribeiro [Thu, 21 May 2020 15:27:13 +0000 (12:27 -0300)]
Revert "drivers/amlogic: update media_modules"

This reverts commit 1cae8761354481e567b97f519a0fed536d561632.

4 years agoMerge "Revert "ODROID-C4: arm64/dts: remove 2.1GHz support due to instability"" into...
Mauro Ribeiro [Thu, 21 May 2020 15:11:05 +0000 (00:11 +0900)]
Merge "Revert "ODROID-C4: arm64/dts: remove 2.1GHz support due to instability"" into odroidg12-4.9.y

4 years agoODROID-G12: config: enable framebuffer rotation
Mauro (mdrjr) Ribeiro [Mon, 18 May 2020 13:11:43 +0000 (10:11 -0300)]
ODROID-G12: config: enable framebuffer rotation

Change-Id: I79cc036495a69c0d5a6872447b9323bb7f8eacff

4 years agoODROID: link odroidc4 to odroidg12 defconfigs
Mauro (mdrjr) Ribeiro [Wed, 13 May 2020 01:20:33 +0000 (22:20 -0300)]
ODROID: link odroidc4 to odroidg12 defconfigs

4 years agoODROID-G12: enable W5X00 SPI Ethernet
Mauro (mdrjr) Ribeiro [Wed, 13 May 2020 01:20:07 +0000 (22:20 -0300)]
ODROID-G12: enable W5X00 SPI Ethernet

Change-Id: Iabeb5ecb3dc2c9880cda8dd4abcd3912f80391e6

4 years agoMerge branch 'odroidg12-4.9.y'
Mauro (mdrjr) Ribeiro [Wed, 13 May 2020 01:09:45 +0000 (22:09 -0300)]
Merge branch 'odroidg12-4.9.y'

Change-Id: I626a3235079d66cb5bc8ecfd1266528ad24a6ed2

4 years agoODROID-N2: arm64/dts: add missing 'spifc' device entry
Dongjin Kim [Mon, 11 May 2020 08:37:52 +0000 (17:37 +0900)]
ODROID-N2: arm64/dts: add missing 'spifc' device entry

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Idae5ea0ea84933339afd1a246fd205eab85eefc5

4 years agoODROID-N2: arm64/dts: fix up including wrong .dtsi
Dongjin Kim [Mon, 11 May 2020 08:36:08 +0000 (17:36 +0900)]
ODROID-N2: arm64/dts: fix up including wrong .dtsi

'mesong12b.dtsi' is for the version after S922X (rev.B) while
'mesong12b_a.dtsi' is for S922X (rev.A)

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Id6b41eefab82e53952bfa9fff2f569e127b668fb

4 years agoRevert "ODROID-C4: arm64/dts: remove 2.1GHz support due to instability"
Dongjin Kim [Mon, 11 May 2020 02:58:23 +0000 (11:58 +0900)]
Revert "ODROID-C4: arm64/dts: remove 2.1GHz support due to instability"

WARNING: 2.1GHz with the performance governor can cause unxpected
         system instability.

This reverts commit 9c4b8621525270e176cb65db6b129501284a85a5.

Change-Id: Ia340425912ad3854988df89f30d8fe97cc3305ce

4 years agodrivers/amlogic: update media_modules
Mauro (mdrjr) Ribeiro [Sat, 25 Apr 2020 17:56:49 +0000 (14:56 -0300)]
drivers/amlogic: update media_modules

4 years agoRevert "ODROID-C4:arm64/dts:Support I2S sound card.(HiFi-shield series)"
Mauro (mdrjr) Ribeiro [Tue, 21 Apr 2020 18:20:47 +0000 (15:20 -0300)]
Revert "ODROID-C4:arm64/dts:Support I2S sound card.(HiFi-shield series)"

This reverts commit be8dae9c1a45e7a20e6217957971b8c5b0946bb1.

4 years agoRevert "chardev: add additional check for minor range overlap"
Mauro (mdrjr) Ribeiro [Tue, 21 Apr 2020 18:00:35 +0000 (15:00 -0300)]
Revert "chardev: add additional check for minor range overlap"

This reverts commit bb22efcb872b8108131a38399ae910dcb0304770.

4 years agoMerge branch 'odroidg12-4.9.y'
Mauro (mdrjr) Ribeiro [Tue, 21 Apr 2020 17:46:36 +0000 (14:46 -0300)]
Merge branch 'odroidg12-4.9.y'

4 years agoODROID-COMMON: arm64/dts: set uart_a cts/rts to disable
Hyeonki Hong [Fri, 3 Apr 2020 09:26:53 +0000 (18:26 +0900)]
ODROID-COMMON: arm64/dts: set uart_a cts/rts to disable

Change-Id: I545a2c9e239af1eb2ccaa3f163f8f752b3d33f11
(cherry picked from commit 5a7fddf46c5709e7c05e77c189a902dec2364d1e)

4 years agoODROID-COMMON: arm64/dts: modify i2c alias bus number
Hyeonki Hong [Fri, 17 Apr 2020 07:14:51 +0000 (16:14 +0900)]
ODROID-COMMON: arm64/dts: modify i2c alias bus number

Change-Id: I94d1bc2f56bac1af6c7b45ab1b9bf8cbf50407c1
(cherry picked from commit 842d3137e635a69984da21192333e6c147ec4e8d)

4 years agoODROID-C4: arm64/dts: add gpio-line-names
Hyeonki Hong [Fri, 17 Apr 2020 08:49:02 +0000 (17:49 +0900)]
ODROID-C4: arm64/dts: add gpio-line-names

Change-Id: Iee8660174a6dbaa35db3d7f32e84bf22a459c7d1
(cherry picked from commit 3eea1ff5b658da710d0e9d944de542d7d01f55c6)

4 years agoODROID-COMMON:Added uSD card reset in poweroff function.
ckkim [Mon, 13 Apr 2020 05:10:47 +0000 (14:10 +0900)]
ODROID-COMMON:Added uSD card reset in poweroff function.

Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: I081293a937ff264f627db80c528295f0f886869e

4 years agoODROID-COMMON: arm64/dts: modify i2c alias bus number
Hyeonki Hong [Thu, 2 Apr 2020 09:46:17 +0000 (18:46 +0900)]
ODROID-COMMON: arm64/dts: modify i2c alias bus number

Change-Id: I57a7d4b1ed78f86fbb7e4512fcabe9c008d89063
(cherry picked from commit 5125046c2b3f071ffcb3d9cd541e6e934a23cde5)

4 years agoODROID-C4: arm64/dts: set spicc0 and i2c2 to enalbe by default
Hyeonki Hong [Fri, 3 Apr 2020 02:50:13 +0000 (11:50 +0900)]
ODROID-C4: arm64/dts: set spicc0 and i2c2 to enalbe by default

Change-Id: I08225fdb27743bd8195d50967b61867bf67ef937

4 years agoODROID-C4:arm64/dts:Support I2S sound card.(HiFi-shield series)
ckkim [Mon, 6 Apr 2020 07:06:37 +0000 (16:06 +0900)]
ODROID-C4:arm64/dts:Support I2S sound card.(HiFi-shield series)

Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: I0831e040831c1990796c63ff1ab92e333154d0db

4 years agoODROID-C4:Add support pcm5242(HiFi-shield2) codec.
ckkim [Mon, 6 Apr 2020 07:02:58 +0000 (16:02 +0900)]
ODROID-C4:Add support pcm5242(HiFi-shield2) codec.

Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: I9477e212374f819fd8b7d1ae0f1255a1f6660239

4 years agoLinux 4.9.219 v4.9.219
Greg Kroah-Hartman [Mon, 13 Apr 2020 08:32:59 +0000 (10:32 +0200)]
Linux 4.9.219

4 years agodrm/msm: Use the correct dma_sync calls in msm_gem
Rob Clark [Tue, 30 Jul 2019 21:46:28 +0000 (14:46 -0700)]
drm/msm: Use the correct dma_sync calls in msm_gem

commit 3de433c5b38af49a5fc7602721e2ab5d39f1e69c upstream.

[subject was: drm/msm: shake fist angrily at dma-mapping]

So, using dma_sync_* for our cache needs works out w/ dma iommu ops, but
it falls appart with dma direct ops.  The problem is that, depending on
display generation, we can have either set of dma ops (mdp4 and dpu have
iommu wired to mdss node, which maps to toplevel drm device, but mdp5
has iommu wired up to the mdp sub-node within mdss).

Fixes this splat on mdp5 devices:

   Unable to handle kernel paging request at virtual address ffffffff80000000
   Mem abort info:
     ESR = 0x96000144
     Exception class = DABT (current EL), IL = 32 bits
     SET = 0, FnV = 0
     EA = 0, S1PTW = 0
   Data abort info:
     ISV = 0, ISS = 0x00000144
     CM = 1, WnR = 1
   swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000810e4000
   [ffffffff80000000] pgd=0000000000000000
   Internal error: Oops: 96000144 [#1] SMP
   Modules linked in: btqcomsmd btqca bluetooth cfg80211 ecdh_generic ecc rfkill libarc4 panel_simple msm wcnss_ctrl qrtr_smd drm_kms_helper venus_enc venus_dec videobuf2_dma_sg videobuf2_memops drm venus_core ipv6 qrtr qcom_wcnss_pil v4l2_mem2mem qcom_sysmon videobuf2_v4l2 qmi_helpers videobuf2_common crct10dif_ce mdt_loader qcom_common videodev qcom_glink_smem remoteproc bmc150_accel_i2c bmc150_magn_i2c bmc150_accel_core bmc150_magn snd_soc_lpass_apq8016 snd_soc_msm8916_analog mms114 mc nf_defrag_ipv6 snd_soc_lpass_cpu snd_soc_apq8016_sbc industrialio_triggered_buffer kfifo_buf snd_soc_lpass_platform snd_soc_msm8916_digital drm_panel_orientation_quirks
   CPU: 2 PID: 33 Comm: kworker/2:1 Not tainted 5.3.0-rc2 #1
   Hardware name: Samsung Galaxy A5U (EUR) (DT)
   Workqueue: events deferred_probe_work_func
   pstate: 80000005 (Nzcv daif -PAN -UAO)
   pc : __clean_dcache_area_poc+0x20/0x38
   lr : arch_sync_dma_for_device+0x28/0x30
   sp : ffff0000115736a0
   x29: ffff0000115736a0 x28: 0000000000000001
   x27: ffff800074830800 x26: ffff000011478000
   x25: 0000000000000000 x24: 0000000000000001
   x23: ffff000011478a98 x22: ffff800009fd1c10
   x21: 0000000000000001 x20: ffff800075ad0a00
   x19: 0000000000000000 x18: ffff0000112b2000
   x17: 0000000000000000 x16: 0000000000000000
   x15: 00000000fffffff0 x14: ffff000011455d70
   x13: 0000000000000000 x12: 0000000000000028
   x11: 0000000000000001 x10: ffff00001106c000
   x9 : ffff7e0001d6b380 x8 : 0000000000001000
   x7 : ffff7e0001d6b380 x6 : ffff7e0001d6b382
   x5 : 0000000000000000 x4 : 0000000000001000
   x3 : 000000000000003f x2 : 0000000000000040
   x1 : ffffffff80001000 x0 : ffffffff80000000
   Call trace:
    __clean_dcache_area_poc+0x20/0x38
    dma_direct_sync_sg_for_device+0xb8/0xe8
    get_pages+0x22c/0x250 [msm]
    msm_gem_get_and_pin_iova+0xdc/0x168 [msm]
    ...

Fixes the combination of two patches:

Fixes: 0036bc73ccbe (drm/msm: stop abusing dma_map/unmap for cache)
Fixes: 449fa54d6815 (dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device)
Tested-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Rob Clark <robdclark@chromium.org>
[seanpaul changed subject to something more desriptive]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190730214633.17820-1-robdclark@gmail.com
Cc: nobuhiro1.iwamatsu@toshiba.co.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agodrm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()
Hans Verkuil [Mon, 27 Aug 2018 08:07:42 +0000 (10:07 +0200)]
drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()

commit a4c30a4861c54af78c4eb8b7855524c1a96d9f80 upstream.

When parsing the reply of a DP_REMOTE_DPCD_READ DPCD command the
result is wrong due to a missing idx increment.

This was never noticed since DP_REMOTE_DPCD_READ is currently not
used, but if you enable it, then it is all wrong.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e72ddac2-1dc0-100a-d816-9ac98ac009dd@xs4all.nl
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agousb: dwc3: don't set gadget->is_otg flag
Roger Quadros [Mon, 26 Aug 2019 13:10:58 +0000 (16:10 +0300)]
usb: dwc3: don't set gadget->is_otg flag

commit c09b73cfac2a9317f1104169045c519c6021aa1d upstream.

This reverts
commit 6a4290cc28be1 ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.")

We don't yet support any of the OTG mechanisms (HNP/SRP/ADP)
and are not setting gadget->otg_caps, so don't set gadget->is_otg
flag.

If we do then we end up publishing a OTG1.0 descriptor in
the gadget descriptor which causes device enumeration to fail
if we are connected to a host with CONFIG_USB_OTG enabled.

Host side log without this patch

[   96.720453] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[   96.901391] usb 1-1: Dual-Role OTG device on non-HNP port
[   96.907552] usb 1-1: set a_alt_hnp_support failed: -32
[   97.060447] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[   97.241378] usb 1-1: Dual-Role OTG device on non-HNP port
[   97.247536] usb 1-1: set a_alt_hnp_support failed: -32
[   97.253606] usb usb1-port1: attempt power cycle
[   97.960449] usb 1-1: new high-speed USB device number 4 using xhci-hcd
[   98.141383] usb 1-1: Dual-Role OTG device on non-HNP port
[   98.147540] usb 1-1: set a_alt_hnp_support failed: -32
[   98.300453] usb 1-1: new high-speed USB device number 5 using xhci-hcd
[   98.481391] usb 1-1: Dual-Role OTG device on non-HNP port
[   98.487545] usb 1-1: set a_alt_hnp_support failed: -32
[   98.493532] usb usb1-port1: unable to enumerate USB device

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoarm64: Fix size of __early_cpu_boot_status
Arun KS [Tue, 30 Apr 2019 10:35:04 +0000 (16:05 +0530)]
arm64: Fix size of __early_cpu_boot_status

commit 61cf61d81e326163ce1557ceccfca76e11d0e57c upstream.

__early_cpu_boot_status is of type long. Use quad
assembler directive to allocate proper size.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Arun KS <arunks@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agodrm/msm: stop abusing dma_map/unmap for cache
Rob Clark [Sun, 30 Jun 2019 12:47:22 +0000 (05:47 -0700)]
drm/msm: stop abusing dma_map/unmap for cache

commit 0036bc73ccbe7e600a3468bf8e8879b122252274 upstream.

Recently splats like this started showing up:

   WARNING: CPU: 4 PID: 251 at drivers/iommu/dma-iommu.c:451 __iommu_dma_unmap+0xb8/0xc0
   Modules linked in: ath10k_snoc ath10k_core fuse msm ath mac80211 uvcvideo cfg80211 videobuf2_vmalloc videobuf2_memops vide
   CPU: 4 PID: 251 Comm: kworker/u16:4 Tainted: G        W         5.2.0-rc5-next-20190619+ #2317
   Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN23WW(V1.06) 10/25/2018
   Workqueue: msm msm_gem_free_work [msm]
   pstate: 80c00005 (Nzcv daif +PAN +UAO)
   pc : __iommu_dma_unmap+0xb8/0xc0
   lr : __iommu_dma_unmap+0x54/0xc0
   sp : ffff0000119abce0
   x29: ffff0000119abce0 x28: 0000000000000000
   x27: ffff8001f9946648 x26: ffff8001ec271068
   x25: 0000000000000000 x24: ffff8001ea3580a8
   x23: ffff8001f95ba010 x22: ffff80018e83ba88
   x21: ffff8001e548f000 x20: fffffffffffff000
   x19: 0000000000001000 x18: 00000000c00001fe
   x17: 0000000000000000 x16: 0000000000000000
   x15: ffff000015b70068 x14: 0000000000000005
   x13: 0003142cc1be1768 x12: 0000000000000001
   x11: ffff8001f6de9100 x10: 0000000000000009
   x9 : ffff000015b78000 x8 : 0000000000000000
   x7 : 0000000000000001 x6 : fffffffffffff000
   x5 : 0000000000000fff x4 : ffff00001065dbc8
   x3 : 000000000000000d x2 : 0000000000001000
   x1 : fffffffffffff000 x0 : 0000000000000000
   Call trace:
    __iommu_dma_unmap+0xb8/0xc0
    iommu_dma_unmap_sg+0x98/0xb8
    put_pages+0x5c/0xf0 [msm]
    msm_gem_free_work+0x10c/0x150 [msm]
    process_one_work+0x1e0/0x330
    worker_thread+0x40/0x438
    kthread+0x12c/0x130
    ret_from_fork+0x10/0x18
   ---[ end trace afc0dc5ab81a06bf ]---

Not quite sure what triggered that, but we really shouldn't be abusing
dma_{map,unmap}_sg() for cache maint.

Cc: Stephen Boyd <sboyd@kernel.org>
Tested-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630124735.27786-1-robdclark@gmail.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoclk: qcom: rcg: Return failure for RCG update
Taniya Das [Wed, 8 May 2019 18:24:53 +0000 (23:54 +0530)]
clk: qcom: rcg: Return failure for RCG update

commit 21ea4b62e1f3dc258001a68da98c9663a9dbd6c7 upstream.

In case of update config failure, return -EBUSY, so that consumers could
handle the failure gracefully.

Signed-off-by: Taniya Das <tdas@codeaurora.org>
Link: https://lkml.kernel.org/r/1557339895-21952-2-git-send-email-tdas@codeaurora.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoRDMA/cm: Update num_paths in cma_resolve_iboe_route error flow
Avihai Horon [Wed, 18 Mar 2020 10:17:41 +0000 (12:17 +0200)]
RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow

commit 987914ab841e2ec281a35b54348ab109b4c0bb4e upstream.

After a successful allocation of path_rec, num_paths is set to 1, but any
error after such allocation will leave num_paths uncleared.

This causes to de-referencing a NULL pointer later on. Hence, num_paths
needs to be set back to 0 if such an error occurs.

The following crash from syzkaller revealed it.

  kasan: CONFIG_KASAN_INLINE enabled
  kasan: GPF could be caused by NULL-ptr deref or user memory access
  general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI
  CPU: 0 PID: 357 Comm: syz-executor060 Not tainted 4.18.0+ #311
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
  rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org 04/01/2014
  RIP: 0010:ib_copy_path_rec_to_user+0x94/0x3e0
  Code: f1 f1 f1 f1 c7 40 0c 00 00 f4 f4 65 48 8b 04 25 28 00 00 00 48 89
  45 c8 31 c0 e8 d7 60 24 ff 48 8d 7b 4c 48 89 f8 48 c1 e8 03 <42> 0f b6
  14 30 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85
  RSP: 0018:ffff88006586f980 EFLAGS: 00010207
  RAX: 0000000000000009 RBX: 0000000000000000 RCX: 1ffff1000d5fe475
  RDX: ffff8800621e17c0 RSI: ffffffff820d45f9 RDI: 000000000000004c
  RBP: ffff88006586fa50 R08: ffffed000cb0df73 R09: ffffed000cb0df72
  R10: ffff88006586fa70 R11: ffffed000cb0df73 R12: 1ffff1000cb0df30
  R13: ffff88006586fae8 R14: dffffc0000000000 R15: ffff88006aff2200
  FS: 00000000016fc880(0000) GS:ffff88006d000000(0000)
  knlGS:0000000000000000
  CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000000020000040 CR3: 0000000063fec000 CR4: 00000000000006b0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
  Call Trace:
  ? ib_copy_path_rec_from_user+0xcc0/0xcc0
  ? __mutex_unlock_slowpath+0xfc/0x670
  ? wait_for_completion+0x3b0/0x3b0
  ? ucma_query_route+0x818/0xc60
  ucma_query_route+0x818/0xc60
  ? ucma_listen+0x1b0/0x1b0
  ? sched_clock_cpu+0x18/0x1d0
  ? sched_clock_cpu+0x18/0x1d0
  ? ucma_listen+0x1b0/0x1b0
  ? ucma_write+0x292/0x460
  ucma_write+0x292/0x460
  ? ucma_close_id+0x60/0x60
  ? sched_clock_cpu+0x18/0x1d0
  ? sched_clock_cpu+0x18/0x1d0
  __vfs_write+0xf7/0x620
  ? ucma_close_id+0x60/0x60
  ? kernel_read+0x110/0x110
  ? time_hardirqs_on+0x19/0x580
  ? lock_acquire+0x18b/0x3a0
  ? finish_task_switch+0xf3/0x5d0
  ? _raw_spin_unlock_irq+0x29/0x40
  ? _raw_spin_unlock_irq+0x29/0x40
  ? finish_task_switch+0x1be/0x5d0
  ? __switch_to_asm+0x34/0x70
  ? __switch_to_asm+0x40/0x70
  ? security_file_permission+0x172/0x1e0
  vfs_write+0x192/0x460
  ksys_write+0xc6/0x1a0
  ? __ia32_sys_read+0xb0/0xb0
  ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe
  ? do_syscall_64+0x1d/0x470
  do_syscall_64+0x9e/0x470
  entry_SYSCALL_64_after_hwframe+0x49/0xbe

Fixes: 3c86aa70bf67 ("RDMA/cm: Add RDMA CM support for IBoE devices")
Link: https://lore.kernel.org/r/20200318101741.47211-1-leon@kernel.org
Signed-off-by: Avihai Horon <avihaih@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoBluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
Qiujun Huang [Sun, 8 Mar 2020 09:45:27 +0000 (17:45 +0800)]
Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl

commit 71811cac8532b2387b3414f7cd8fe9e497482864 upstream.

Needn't call 'rfcomm_dlc_put' here, because 'rfcomm_dlc_exists' didn't
increase dlc->refcnt.

Reported-by: syzbot+4496e82090657320efc6@syzkaller.appspotmail.com
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Suggested-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoceph: canonicalize server path in place
Ilya Dryomov [Mon, 10 Feb 2020 21:51:08 +0000 (22:51 +0100)]
ceph: canonicalize server path in place

commit b27a939e8376a3f1ed09b9c33ef44d20f18ec3d0 upstream.

syzbot reported that 4fbc0c711b24 ("ceph: remove the extra slashes in
the server path") had caused a regression where an allocation could be
done under a spinlock -- compare_mount_options() is called by sget_fc()
with sb_lock held.

We don't really need the supplied server path, so canonicalize it
in place and compare it directly.  To make this work, the leading
slash is kept around and the logic in ceph_real_mount() to skip it
is restored.  CEPH_MSG_CLIENT_SESSION now reports the same (i.e.
canonicalized) path, with the leading slash of course.

Fixes: 4fbc0c711b24 ("ceph: remove the extra slashes in the server path")
Reported-by: syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoceph: remove the extra slashes in the server path
Xiubo Li [Fri, 20 Dec 2019 14:34:04 +0000 (09:34 -0500)]
ceph: remove the extra slashes in the server path

commit 4fbc0c711b2464ee1551850b85002faae0b775d5 upstream.

It's possible to pass the mount helper a server path that has more
than one contiguous slash character. For example:

  $ mount -t ceph 192.168.195.165:40176:/// /mnt/cephfs/

In the MDS server side the extra slashes of the server path will be
treated as snap dir, and then we can get the following debug logs:

  ceph:  mount opening path //
  ceph:  open_root_inode opening '//'
  ceph:  fill_trace 0000000059b8a3bc is_dentry 0 is_target 1
  ceph:  alloc_inode 00000000dc4ca00b
  ceph:  get_inode created new inode 00000000dc4ca00b 1.ffffffffffffffff ino 1
  ceph:  get_inode on 1=1.ffffffffffffffff got 00000000dc4ca00b

And then when creating any new file or directory under the mount
point, we can hit the following BUG_ON in ceph_fill_trace():

  BUG_ON(ceph_snap(dir) != dvino.snap);

Have the client ignore the extra slashes in the server path when
mounting. This will also canonicalize the path, so that identical mounts
can be consilidated.

1) "//mydir1///mydir//"
2) "/mydir1/mydir"
3) "/mydir1/mydir/"

Regardless of the internal treatment of these paths, the kernel still
stores the original string including the leading '/' for presentation
to userland.

URL: https://tracker.ceph.com/issues/42771
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoIB/hfi1: Fix memory leaks in sysfs registration and unregistration
Kaike Wan [Thu, 26 Mar 2020 16:38:07 +0000 (12:38 -0400)]
IB/hfi1: Fix memory leaks in sysfs registration and unregistration

commit 5c15abc4328ad696fa61e2f3604918ed0c207755 upstream.

When the hfi1 driver is unloaded, kmemleak will report the following
issue:

unreferenced object 0xffff8888461a4c08 (size 8):
comm "kworker/0:0", pid 5, jiffies 4298601264 (age 2047.134s)
hex dump (first 8 bytes):
73 64 6d 61 30 00 ff ff sdma0...
backtrace:
[<00000000311a6ef5>] kvasprintf+0x62/0xd0
[<00000000ade94d9f>] kobject_set_name_vargs+0x1c/0x90
[<0000000060657dbb>] kobject_init_and_add+0x5d/0xb0
[<00000000346fe72b>] 0xffffffffa0c5ecba
[<000000006cfc5819>] 0xffffffffa0c866b9
[<0000000031c65580>] 0xffffffffa0c38e87
[<00000000e9739b3f>] local_pci_probe+0x41/0x80
[<000000006c69911d>] work_for_cpu_fn+0x16/0x20
[<00000000601267b5>] process_one_work+0x171/0x380
[<0000000049a0eefa>] worker_thread+0x1d1/0x3f0
[<00000000909cf2b9>] kthread+0xf8/0x130
[<0000000058f5f874>] ret_from_fork+0x35/0x40

This patch fixes the issue by:

- Releasing dd->per_sdma[i].kobject in hfi1_unregister_sysfs().
  - This will fix the memory leak.

- Calling kobject_put() to unwind operations only for those entries in
   dd->per_sdma[] whose operations have succeeded (including the current
   one that has just failed) in hfi1_verbs_register_sysfs().

Cc: <stable@vger.kernel.org>
Fixes: 0cb2aa690c7e ("IB/hfi1: Add sysfs interface for affinity setup")
Link: https://lore.kernel.org/r/20200326163807.21129.27371.stgit@awfm-01.aw.intel.com
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoIB/hfi1: Call kobject_put() when kobject_init_and_add() fails
Kaike Wan [Thu, 26 Mar 2020 16:38:14 +0000 (12:38 -0400)]
IB/hfi1: Call kobject_put() when kobject_init_and_add() fails

commit dfb5394f804ed4fcea1fc925be275a38d66712ab upstream.

When kobject_init_and_add() returns an error in the function
hfi1_create_port_files(), the function kobject_put() is not called for the
corresponding kobject, which potentially leads to memory leak.

This patch fixes the issue by calling kobject_put() even if
kobject_init_and_add() fails.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200326163813.21129.44280.stgit@awfm-01.aw.intel.com
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoASoC: jz4740-i2s: Fix divider written at incorrect offset in register
Paul Cercueil [Fri, 6 Mar 2020 22:29:27 +0000 (23:29 +0100)]
ASoC: jz4740-i2s: Fix divider written at incorrect offset in register

commit 9401d5aa328e64617d87abd59af1c91cace4c3e4 upstream.

The 4-bit divider value was written at offset 8, while the jz4740
programming manual locates it at offset 0.

Fixes: 26b0aad80a86 ("ASoC: jz4740: Add dynamic sampling rate support to jz4740-i2s")
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200306222931.39664-2-paul@crapouillou.net
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agotools/accounting/getdelays.c: fix netlink attribute length
David Ahern [Thu, 2 Apr 2020 04:02:25 +0000 (21:02 -0700)]
tools/accounting/getdelays.c: fix netlink attribute length

commit 4054ab64e29bb05b3dfe758fff3c38a74ba753bb upstream.

A recent change to the netlink code: 6e237d099fac ("netlink: Relax attr
validation for fixed length types") logs a warning when programs send
messages with invalid attributes (e.g., wrong length for a u32).  Yafang
reported this error message for tools/accounting/getdelays.c.

send_cmd() is wrongly adding 1 to the attribute length.  As noted in
include/uapi/linux/netlink.h nla_len should be NLA_HDRLEN + payload
length, so drop the +1.

Fixes: 9e06d3f9f6b1 ("per task delay accounting taskstats interface: documentation fix")
Reported-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Yafang Shao <laoar.shao@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Shailabh Nagar <nagar@watson.ibm.com>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/20200327173111.63922-1-dsahern@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agorandom: always use batched entropy for get_random_u{32,64}
Jason A. Donenfeld [Fri, 21 Feb 2020 20:10:37 +0000 (21:10 +0100)]
random: always use batched entropy for get_random_u{32,64}

commit 69efea712f5b0489e67d07565aad5c94e09a3e52 upstream.

It turns out that RDRAND is pretty slow. Comparing these two
constructions:

  for (i = 0; i < CHACHA_BLOCK_SIZE; i += sizeof(ret))
    arch_get_random_long(&ret);

and

  long buf[CHACHA_BLOCK_SIZE / sizeof(long)];
  extract_crng((u8 *)buf);

it amortizes out to 352 cycles per long for the top one and 107 cycles
per long for the bottom one, on Coffee Lake Refresh, Intel Core i9-9880H.

And importantly, the top one has the drawback of not benefiting from the
real rng, whereas the bottom one has all the nice benefits of using our
own chacha rng. As get_random_u{32,64} gets used in more places (perhaps
beyond what it was originally intended for when it was introduced as
get_random_{int,long} back in the md5 monstrosity era), it seems like it
might be a good thing to strengthen its posture a tiny bit. Doing this
should only be stronger and not any weaker because that pool is already
initialized with a bunch of rdrand data (when available). This way, we
get the benefits of the hardware rng as well as our own rng.

Another benefit of this is that we no longer hit pitfalls of the recent
stream of AMD bugs in RDRAND. One often used code pattern for various
things is:

  do {
   val = get_random_u32();
  } while (hash_table_contains_key(val));

That recent AMD bug rendered that pattern useless, whereas we're really
very certain that chacha20 output will give pretty distributed numbers,
no matter what.

So, this simplification seems better both from a security perspective
and from a performance perspective.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200221201037.30231-1-Jason@zx2c4.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agonet: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing...
Oleksij Rempel [Fri, 3 Apr 2020 07:53:25 +0000 (09:53 +0200)]
net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers

[ Upstream commit 6110dff776f7fa65c35850ef65b41d3b39e2fac2 ]

After the power-down bit is cleared, the chip internally triggers a
global reset. According to the KSZ9031 documentation, we have to wait at
least 1ms for the reset to finish.

If the chip is accessed during reset, read will return 0xffff, while
write will be ignored. Depending on the system performance and MDIO bus
speed, we may or may not run in to this issue.

This bug was discovered on an iMX6QP system with KSZ9031 PHY and
attached PHY interrupt line. If IRQ was used, the link status update was
lost. In polling mode, the link status update was always correct.

The investigation showed, that during a read-modify-write access, the
read returned 0xffff (while the chip was still in reset) and
corresponding write hit the chip _after_ reset and triggered (due to the
0xffff) another reset in an undocumented bit (register 0x1f, bit 1),
resulting in the next write being lost due to the new reset cycle.

This patch fixes the issue by adding a 1...2 ms sleep after the
genphy_resume().

Fixes: 836384d2501d ("net: phy: micrel: Add specific suspend")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoslcan: Don't transmit uninitialized stack data in padding
Richard Palethorpe [Wed, 1 Apr 2020 10:06:39 +0000 (12:06 +0200)]
slcan: Don't transmit uninitialized stack data in padding

[ Upstream commit b9258a2cece4ec1f020715fe3554bc2e360f6264 ]

struct can_frame contains some padding which is not explicitly zeroed in
slc_bump. This uninitialized data will then be transmitted if the stack
initialization hardening feature is not enabled (CONFIG_INIT_STACK_ALL).

This commit just zeroes the whole struct including the padding.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Fixes: a1044e36e457 ("can: add slcan driver for serial/USB-serial CAN adapters")
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: linux-can@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: security@kernel.org
Cc: wg@grandegger.com
Cc: mkl@pengutronix.de
Cc: davem@davemloft.net
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agonet: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
Jisheng Zhang [Fri, 3 Apr 2020 02:23:29 +0000 (10:23 +0800)]
net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting

[ Upstream commit 3e1221acf6a8f8595b5ce354bab4327a69d54d18 ]

Commit 9463c4455900 ("net: stmmac: dwmac1000: Clear unused address
entries") cleared the unused mac address entries, but introduced an
out-of bounds mac address register programming bug -- After setting
the secondary unicast mac addresses, the "reg" value has reached
netdev_uc_count() + 1, thus we should only clear address entries
if (addr < perfect_addr_number)

Fixes: 9463c4455900 ("net: stmmac: dwmac1000: Clear unused address entries")
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agonet: dsa: bcm_sf2: Ensure correct sub-node is parsed
Florian Fainelli [Sun, 5 Apr 2020 20:00:30 +0000 (13:00 -0700)]
net: dsa: bcm_sf2: Ensure correct sub-node is parsed

[ Upstream commit afa3b592953bfaecfb4f2f335ec5f935cff56804 ]

When the bcm_sf2 was converted into a proper platform device driver and
used the new dsa_register_switch() interface, we would still be parsing
the legacy DSA node that contained all the port information since the
platform firmware has intentionally maintained backward and forward
compatibility to client programs. Ensure that we do parse the correct
node, which is "ports" per the revised DSA binding.

Fixes: d9338023fb8e ("net: dsa: bcm_sf2: Make it a real platform device driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agomm: mempolicy: require at least one nodeid for MPOL_PREFERRED
Randy Dunlap [Thu, 2 Apr 2020 04:10:58 +0000 (21:10 -0700)]
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED

commit aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd upstream.

Using an empty (malformed) nodelist that is not caught during mount option
parsing leads to a stack-out-of-bounds access.

The option string that was used was: "mpol=prefer:,".  However,
MPOL_PREFERRED requires a single node number, which is not being provided
here.

Add a check that 'nodes' is not empty after parsing for MPOL_PREFERRED's
nodeid.

Fixes: 095f1fc4ebf3 ("mempolicy: rework shmem mpol parsing and display")
Reported-by: Entropy Moe <3ntr0py1337@gmail.com>
Reported-by: syzbot+b055b1a6b2b958707a21@syzkaller.appspotmail.com
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: syzbot+b055b1a6b2b958707a21@syzkaller.appspotmail.com
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Link: http://lkml.kernel.org/r/89526377-7eb6-b662-e1d8-4430928abde9@infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agopadata: always acquire cpu_hotplug_lock before pinst->lock
Daniel Jordan [Tue, 3 Dec 2019 19:31:11 +0000 (14:31 -0500)]
padata: always acquire cpu_hotplug_lock before pinst->lock

commit 38228e8848cd7dd86ccb90406af32de0cad24be3 upstream.

lockdep complains when padata's paths to update cpumasks via CPU hotplug
and sysfs are both taken:

  # echo 0 > /sys/devices/system/cpu/cpu1/online
  # echo ff > /sys/kernel/pcrypt/pencrypt/parallel_cpumask

  ======================================================
  WARNING: possible circular locking dependency detected
  5.4.0-rc8-padata-cpuhp-v3+ #1 Not tainted
  ------------------------------------------------------
  bash/205 is trying to acquire lock:
  ffffffff8286bcd0 (cpu_hotplug_lock.rw_sem){++++}, at: padata_set_cpumask+0x2b/0x120

  but task is already holding lock:
  ffff8880001abfa0 (&pinst->lock){+.+.}, at: padata_set_cpumask+0x26/0x120

  which lock already depends on the new lock.

padata doesn't take cpu_hotplug_lock and pinst->lock in a consistent
order.  Which should be first?  CPU hotplug calls into padata with
cpu_hotplug_lock already held, so it should have priority.

Fixes: 6751fb3c0e0c ("padata: Use get_online_cpus/put_online_cpus")
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agonet: dsa: tag_brcm: Fix skb->fwd_offload_mark location
Florian Fainelli [Tue, 7 Apr 2020 00:54:12 +0000 (17:54 -0700)]
net: dsa: tag_brcm: Fix skb->fwd_offload_mark location

When the backport of upstream commit
0e62f543bed03a64495bd2651d4fe1aa4bcb7fe5 ("net: dsa: Fix duplicate
frames flooded by learning") was done the assignment of
skb->fwd_offload_mark would land in brcm_tag_xmit() which is incorrect,
it should have been in brcm_tag_rcv().

Fixes: 5e845dc62f38 ("net: dsa: Fix duplicate frames flooded by learning")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agocoresight: do not use the BIT() macro in the UAPI header
Eugene Syromiatnikov [Tue, 24 Mar 2020 04:22:13 +0000 (05:22 +0100)]
coresight: do not use the BIT() macro in the UAPI header

commit 9b6eaaf3db5e5888df7bca7fed7752a90f7fd871 upstream.

The BIT() macro definition is not available for the UAPI headers
(moreover, it can be defined differently in the user space); replace
its usage with the _BITUL() macro that is defined in <linux/const.h>.

Fixes: 237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200324042213.GA10452@asgard.redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoblk-mq: Allow blocking queue tag iter callbacks
Keith Busch [Tue, 25 Sep 2018 16:36:20 +0000 (10:36 -0600)]
blk-mq: Allow blocking queue tag iter callbacks

commit 530ca2c9bd6949c72c9b5cfc330cb3dbccaa3f5b upstream.

A recent commit runs tag iterator callbacks under the rcu read lock,
but existing callbacks do not satisfy the non-blocking requirement.
The commit intended to prevent an iterator from accessing a queue that's
being modified. This patch fixes the original issue by taking a queue
reference instead of reading it, which allows callbacks to make blocking
calls.

Fixes: f5bbbbe4d6357 ("blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter")
Acked-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoblk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter
Jianchao Wang [Tue, 21 Aug 2018 07:15:04 +0000 (15:15 +0800)]
blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter

commit f5bbbbe4d63577026f908a809f22f5fd5a90ea1f upstream.

For blk-mq, part_in_flight/rw will invoke blk_mq_in_flight/rw to
account the inflight requests. It will access the queue_hw_ctx and
nr_hw_queues w/o any protection. When updating nr_hw_queues and
blk_mq_in_flight/rw occur concurrently, panic comes up.

Before update nr_hw_queues, the q will be frozen. So we could use
q_usage_counter to avoid the race. percpu_ref_is_zero is used here
so that we will not miss any in-flight request. The access to
nr_hw_queues and queue_hw_ctx in blk_mq_queue_tag_busy_iter are
under rcu critical section, __blk_mq_update_nr_hw_queues could use
synchronize_rcu to ensure the zeroed q_usage_counter to be globally
visible.

Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Cc: Giuliano Procida <gprocida@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agodrm/etnaviv: replace MMU flush marker with flush sequence
Lucas Stach [Fri, 5 Jul 2019 17:17:23 +0000 (19:17 +0200)]
drm/etnaviv: replace MMU flush marker with flush sequence

commit 4900dda90af2cb13bc1d4c12ce94b98acc8fe64e upstream.

If a MMU is shared between multiple GPUs, all of them need to flush their
TLBs, so a single marker that gets reset on the first flush won't do.
Replace the flush marker with a sequence number, so that it's possible to
check if the TLB is in sync with the current page table state for each GPU.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agosctp: fix possibly using a bad saddr with a given dst
Marcelo Ricardo Leitner [Thu, 26 Mar 2020 23:47:46 +0000 (20:47 -0300)]
sctp: fix possibly using a bad saddr with a given dst

[ Upstream commit 582eea230536a6f104097dd46205822005d5fe3a ]

Under certain circumstances, depending on the order of addresses on the
interfaces, it could be that sctp_v[46]_get_dst() would return a dst
with a mismatched struct flowi.

For example, if when walking through the bind addresses and the first
one is not a match, it saves the dst as a fallback (added in
410f03831c07), but not the flowi. Then if the next one is also not a
match, the previous dst will be returned but with the flowi information
for the 2nd address, which is wrong.

The fix is to use a locally stored flowi that can be used for such
attempts, and copy it to the parameter only in case it is a possible
match, together with the corresponding dst entry.

The patch updates IPv6 code mostly just to be in sync. Even though the issue
is also present there, it fallback is not expected to work with IPv6.

Fixes: 410f03831c07 ("sctp: add routing output fallback")
Reported-by: Jin Meng <meng.a.jin@nokia-sbell.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Tested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agosctp: fix refcount bug in sctp_wfree
Qiujun Huang [Fri, 27 Mar 2020 03:07:51 +0000 (11:07 +0800)]
sctp: fix refcount bug in sctp_wfree

[ Upstream commit 5c3e82fe159622e46e91458c1a6509c321a62820 ]

We should iterate over the datamsgs to move
all chunks(skbs) to newsk.

The following case cause the bug:
for the trouble SKB, it was in outq->transmitted list

sctp_outq_sack
        sctp_check_transmitted
                SKB was moved to outq->sacked list
        then throw away the sack queue
                SKB was deleted from outq->sacked
(but it was held by datamsg at sctp_datamsg_to_asoc
So, sctp_wfree was not called here)

then migrate happened

        sctp_for_each_tx_datachunk(
        sctp_clear_owner_w);
        sctp_assoc_migrate();
        sctp_for_each_tx_datachunk(
        sctp_set_owner_w);
SKB was not in the outq, and was not changed to newsk

finally

__sctp_outq_teardown
        sctp_chunk_put (for another skb)
                sctp_datamsg_put
                        __kfree_skb(msg->frag_list)
                                sctp_wfree (for SKB)
SKB->sk was still oldsk (skb->sk != asoc->base.sk).

Reported-and-tested-by: syzbot+cea71eec5d6de256d54d@syzkaller.appspotmail.com
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Acked-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agonet, ip_tunnel: fix interface lookup with no key
William Dauchy [Fri, 27 Mar 2020 18:56:39 +0000 (19:56 +0100)]
net, ip_tunnel: fix interface lookup with no key

[ Upstream commit 25629fdaff2ff509dd0b3f5ff93d70a75e79e0a1 ]

when creating a new ipip interface with no local/remote configuration,
the lookup is done with TUNNEL_NO_KEY flag, making it impossible to
match the new interface (only possible match being fallback or metada
case interface); e.g: `ip link add tunl1 type ipip dev eth0`

To fix this case, adding a flag check before the key comparison so we
permit to match an interface with no local/remote config; it also avoids
breaking possible userland tools relying on TUNNEL_NO_KEY flag and
uninitialised key.

context being on my side, I'm creating an extra ipip interface attached
to the physical one, and moving it to a dedicated namespace.

Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
Signed-off-by: William Dauchy <w.dauchy@criteo.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoipv4: fix a RCU-list lock in fib_triestat_seq_show
Qian Cai [Wed, 25 Mar 2020 22:01:00 +0000 (18:01 -0400)]
ipv4: fix a RCU-list lock in fib_triestat_seq_show

[ Upstream commit fbe4e0c1b298b4665ee6915266c9d6c5b934ef4a ]

fib_triestat_seq_show() calls hlist_for_each_entry_rcu(tb, head,
tb_hlist) without rcu_read_lock() will trigger a warning,

 net/ipv4/fib_trie.c:2579 RCU-list traversed in non-reader section!!

 other info that might help us debug this:

 rcu_scheduler_active = 2, debug_locks = 1
 1 lock held by proc01/115277:
  #0: c0000014507acf00 (&p->lock){+.+.}-{3:3}, at: seq_read+0x58/0x670

 Call Trace:
  dump_stack+0xf4/0x164 (unreliable)
  lockdep_rcu_suspicious+0x140/0x164
  fib_triestat_seq_show+0x750/0x880
  seq_read+0x1a0/0x670
  proc_reg_read+0x10c/0x1b0
  __vfs_read+0x3c/0x70
  vfs_read+0xac/0x170
  ksys_read+0x7c/0x140
  system_call+0x5c/0x68

Fix it by adding a pair of rcu_read_lock/unlock() and use
cond_resched_rcu() to avoid the situation where walking of a large
number of items  may prevent scheduling for a long time.

Signed-off-by: Qian Cai <cai@lca.pw>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agodrm/bochs: downgrade pci_request_region failure from error to warning
Gerd Hoffmann [Fri, 13 Mar 2020 08:41:52 +0000 (09:41 +0100)]
drm/bochs: downgrade pci_request_region failure from error to warning

[ Upstream commit 8c34cd1a7f089dc03933289c5d4a4d1489549828 ]

Shutdown of firmware framebuffer has a bunch of problems.  Because
of this the framebuffer region might still be reserved even after
drm_fb_helper_remove_conflicting_pci_framebuffers() returned.

Don't consider pci_request_region() failure for the framebuffer
region as fatal error to workaround this issue.

Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200313084152.2734-1-kraxel@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agol2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall()
Guillaume Nault [Fri, 22 Sep 2017 13:39:24 +0000 (15:39 +0200)]
l2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall()

commit b228a94066406b6c456321d69643b0d7ce11cfa6 upstream.

There are several ways to remove L2TP sessions:

  * deleting a session explicitly using the netlink interface (with
    L2TP_CMD_SESSION_DELETE),
  * deleting the session's parent tunnel (either by closing the
    tunnel's file descriptor or using the netlink interface),
  * closing the PPPOL2TP file descriptor of a PPP pseudo-wire.

In some cases, when these methods are used concurrently on the same
session, the session can be removed twice, leading to use-after-free
bugs.

This patch adds a 'dead' flag, used by l2tp_session_delete() and
l2tp_tunnel_closeall() to prevent them from stepping on each other's
toes.

The session deletion path used when closing a PPPOL2TP file descriptor
doesn't need to be adapted. It already has to ensure that a session
remains valid for the lifetime of its PPPOL2TP file descriptor.
So it takes an extra reference on the session in the ->session_close()
callback (pppol2tp_session_close()), which is eventually dropped
in the ->sk_destruct() callback of the PPPOL2TP socket
(pppol2tp_session_destruct()).
Still, __l2tp_session_unhash() and l2tp_session_queue_purge() can be
called twice and even concurrently for a given session, but thanks to
proper locking and re-initialisation of list fields, this is not an
issue.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agol2tp: ensure sessions are freed after their PPPOL2TP socket
Guillaume Nault [Fri, 22 Sep 2017 13:39:23 +0000 (15:39 +0200)]
l2tp: ensure sessions are freed after their PPPOL2TP socket

commit cdd10c9627496ad25c87ce6394e29752253c69d3 upstream.

If l2tp_tunnel_delete() or l2tp_tunnel_closeall() deletes a session
right after pppol2tp_release() orphaned its socket, then the 'sock'
variable of the pppol2tp_session_close() callback is NULL. Yet the
session is still used by pppol2tp_release().

Therefore we need to take an extra reference in any case, to prevent
l2tp_tunnel_delete() or l2tp_tunnel_closeall() from freeing the session.

Since the pppol2tp_session_close() callback is only set if the session
is associated to a PPPOL2TP socket and that both l2tp_tunnel_delete()
and l2tp_tunnel_closeall() hold the PPPOL2TP socket before calling
pppol2tp_session_close(), we're sure that pppol2tp_session_close() and
pppol2tp_session_destruct() are paired and called in the right order.
So the reference taken by the former will be released by the later.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoODROID-COMMON: scripts: Add dtco target for better handling DT overlay
Deokgyu Yang [Tue, 7 Apr 2020 07:31:02 +0000 (16:31 +0900)]
ODROID-COMMON: scripts: Add dtco target for better handling DT overlay

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I67277f745dc292b53fead0e476969344dcb0d427
(cherry picked from commit 8335f10cb98e43f03ab56e5ef756abee85d4cb02)

4 years agoRevert "ODROID-COMMON: media/hdmitx: add "now" to attr to trigger set_disp_mode_auto()"
Dongjin Kim [Wed, 8 Apr 2020 04:07:29 +0000 (13:07 +0900)]
Revert "ODROID-COMMON: media/hdmitx: add "now" to attr to trigger set_disp_mode_auto()"

This reverts commit 2e65f010b521bae8c5f72996613f9e5bc5eee104.

Change-Id: I71054b56d1a2ae3590d496afcbb1ba4847881181
(cherry picked from commit 8f53e1c6e87206910b6334084b44335174abf2f7)

4 years agonetfilter: fix merge error
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:41:05 +0000 (21:41 -0300)]
netfilter: fix merge error

4 years agoMerge tag 'v4.9.218' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:33:19 +0000 (21:33 -0300)]
Merge tag 'v4.9.218' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.218 stable release

4 years agoMerge tag 'v4.9.217' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:33:14 +0000 (21:33 -0300)]
Merge tag 'v4.9.217' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.217 stable release

4 years agoMerge tag 'v4.9.216' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:33:09 +0000 (21:33 -0300)]
Merge tag 'v4.9.216' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.216 stable release

4 years agoMerge tag 'v4.9.215' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:32:59 +0000 (21:32 -0300)]
Merge tag 'v4.9.215' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.215 stable release

4 years agoMerge tag 'v4.9.214' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:28:16 +0000 (21:28 -0300)]
Merge tag 'v4.9.214' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.214 stable release

4 years agoMerge tag 'v4.9.213' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:28:12 +0000 (21:28 -0300)]
Merge tag 'v4.9.213' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.213 stable release

4 years agoMerge tag 'v4.9.212' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:26:32 +0000 (21:26 -0300)]
Merge tag 'v4.9.212' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.212 stable release

4 years agoMerge tag 'v4.9.211' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:24:11 +0000 (21:24 -0300)]
Merge tag 'v4.9.211' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.211 stable release

4 years agoMerge tag 'v4.9.210' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:21:26 +0000 (21:21 -0300)]
Merge tag 'v4.9.210' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.210 stable release

4 years agoMerge tag 'v4.9.209' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:21:21 +0000 (21:21 -0300)]
Merge tag 'v4.9.209' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.209 stable release

4 years agoMerge tag 'v4.9.208' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:21:16 +0000 (21:21 -0300)]
Merge tag 'v4.9.208' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.208 stable release

4 years agoMerge tag 'v4.9.207' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:21:08 +0000 (21:21 -0300)]
Merge tag 'v4.9.207' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.207 stable release

4 years agoMerge tag 'v4.9.206' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Mauro (mdrjr) Ribeiro [Wed, 8 Apr 2020 00:18:21 +0000 (21:18 -0300)]
Merge tag 'v4.9.206' of git://git./linux/kernel/git/stable/linux-stable into odroidg12-4.9.y

This is the 4.9.206 stable release