All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.4 00/28] 5.4.127-rc1 review
@ 2021-06-16 15:33 Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 01/28] net: ieee802154: fix null deref in parse dev addr Greg Kroah-Hartman
                   ` (33 more replies)
  0 siblings, 34 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, stable

This is the start of the stable review cycle for the 5.4.127 release.
There are 28 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Fri, 18 Jun 2021 15:28:19 +0000.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.127-rc1.gz
or in the git tree and branch at:
	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 5.4.127-rc1

Zheng Yongjun <zhengyongjun3@huawei.com>
    fib: Return the correct errno code

Zheng Yongjun <zhengyongjun3@huawei.com>
    net: Return the correct errno code

Zheng Yongjun <zhengyongjun3@huawei.com>
    net/x25: Return the correct errno code

Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
    rtnetlink: Fix missing error code in rtnl_bridge_notify()

Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
    drm/amd/display: Fix overlay validation by considering cursors

Bindu Ramamurthy <bindu.r@amd.com>
    drm/amd/display: Allow bandwidth validation for 0 streams.

Josh Triplett <josh@joshtriplett.org>
    net: ipconfig: Don't override command-line hostnames or domains

Hannes Reinecke <hare@suse.de>
    nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue()

Hannes Reinecke <hare@suse.de>
    nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails

Hannes Reinecke <hare@suse.de>
    nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues()

Ewan D. Milne <emilne@redhat.com>
    scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V

Daniel Wagner <dwagner@suse.de>
    scsi: qedf: Do not put host in qedf_vport_create() unconditionally

Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
    ethernet: myri10ge: Fix missing error code in myri10ge_probe()

Maurizio Lombardi <mlombard@redhat.com>
    scsi: target: core: Fix warning on realtime kernels

Hillf Danton <hdanton@sina.com>
    gfs2: Fix use-after-free in gfs2_glock_shrink_scan

Khem Raj <raj.khem@gmail.com>
    riscv: Use -mno-relax when using lld linker

Bixuan Cui <cuibixuan@huawei.com>
    HID: gt683r: add missing MODULE_DEVICE_TABLE

Andreas Gruenbacher <agruenba@redhat.com>
    gfs2: Prevent direct-I/O write fallback errors from getting lost

Yongqiang Liu <liuyongqiang13@huawei.com>
    ARM: OMAP2+: Fix build warning when mmc_omap is not built

Pavel Machek (CIP) <pavel@denx.de>
    drm/tegra: sor: Do not leak runtime PM reference

Anirudh Rayabharam <mail@anirudhrb.com>
    HID: usbhid: fix info leak in hid_submit_ctrl

Mark Bolhuis <mark@bolhuis.dev>
    HID: Add BUS_VIRTUAL to hid_connect logging

Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
    HID: multitouch: set Stylus suffix for Stylus-application devices, too

Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
    HID: quirks: Add quirk for Lenovo optical mouse

Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    HID: hid-sensor-hub: Return error for hid_set_field() failure

Dmitry Torokhov <dmitry.torokhov@gmail.com>
    HID: hid-input: add mapping for emoji picker key

Nirenjan Krishnan <nirenjan@gmail.com>
    HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65

Dan Robertson <dan@dlrobertson.com>
    net: ieee802154: fix null deref in parse dev addr


-------------

Diffstat:

 Makefile                                             |  4 ++--
 arch/arm/mach-omap2/board-n8x0.c                     |  2 +-
 arch/riscv/Makefile                                  |  9 +++++++++
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c    | 10 +++++++++-
 .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c    |  2 +-
 drivers/gpu/drm/tegra/sor.c                          | 14 ++++++++++----
 drivers/hid/hid-core.c                               |  3 +++
 drivers/hid/hid-debug.c                              |  1 +
 drivers/hid/hid-gt683r.c                             |  1 +
 drivers/hid/hid-ids.h                                |  2 ++
 drivers/hid/hid-input.c                              |  3 +++
 drivers/hid/hid-multitouch.c                         |  8 ++++----
 drivers/hid/hid-quirks.c                             |  2 ++
 drivers/hid/hid-sensor-hub.c                         | 13 +++++++++----
 drivers/hid/usbhid/hid-core.c                        |  2 +-
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c     |  1 +
 drivers/nvme/target/loop.c                           |  5 ++++-
 drivers/scsi/qedf/qedf_main.c                        | 20 +++++++++-----------
 drivers/scsi/scsi_devinfo.c                          |  1 +
 drivers/target/target_core_transport.c               |  4 +---
 fs/gfs2/file.c                                       |  5 ++++-
 fs/gfs2/glock.c                                      |  2 +-
 include/linux/hid.h                                  |  3 +--
 include/uapi/linux/input-event-codes.h               |  1 +
 net/compat.c                                         |  2 +-
 net/core/fib_rules.c                                 |  2 +-
 net/core/rtnetlink.c                                 |  4 +++-
 net/ieee802154/nl802154.c                            |  9 +++++----
 net/ipv4/ipconfig.c                                  | 13 ++++++++-----
 net/x25/af_x25.c                                     |  2 +-
 30 files changed, 100 insertions(+), 50 deletions(-)



^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 5.4 01/28] net: ieee802154: fix null deref in parse dev addr
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 02/28] HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65 Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Robertson, Alexander Aring,
	Stefan Schmidt, Sasha Levin

From: Dan Robertson <dan@dlrobertson.com>

[ Upstream commit 9fdd04918a452980631ecc499317881c1d120b70 ]

Fix a logic error that could result in a null deref if the user sets
the mode incorrectly for the given addr type.

Signed-off-by: Dan Robertson <dan@dlrobertson.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210423040214.15438-2-dan@dlrobertson.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 328bb9f5342e..b2ba1d2556f1 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1314,19 +1314,20 @@ ieee802154_llsec_parse_dev_addr(struct nlattr *nla,
 	if (!nla || nla_parse_nested_deprecated(attrs, NL802154_DEV_ADDR_ATTR_MAX, nla, nl802154_dev_addr_policy, NULL))
 		return -EINVAL;
 
-	if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] ||
-	    !attrs[NL802154_DEV_ADDR_ATTR_MODE] ||
-	    !(attrs[NL802154_DEV_ADDR_ATTR_SHORT] ||
-	      attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]))
+	if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] || !attrs[NL802154_DEV_ADDR_ATTR_MODE])
 		return -EINVAL;
 
 	addr->pan_id = nla_get_le16(attrs[NL802154_DEV_ADDR_ATTR_PAN_ID]);
 	addr->mode = nla_get_u32(attrs[NL802154_DEV_ADDR_ATTR_MODE]);
 	switch (addr->mode) {
 	case NL802154_DEV_ADDR_SHORT:
+		if (!attrs[NL802154_DEV_ADDR_ATTR_SHORT])
+			return -EINVAL;
 		addr->short_addr = nla_get_le16(attrs[NL802154_DEV_ADDR_ATTR_SHORT]);
 		break;
 	case NL802154_DEV_ADDR_EXTENDED:
+		if (!attrs[NL802154_DEV_ADDR_ATTR_EXTENDED])
+			return -EINVAL;
 		addr->extended_addr = nla_get_le64(attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]);
 		break;
 	default:
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 02/28] HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 01/28] net: ieee802154: fix null deref in parse dev addr Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 03/28] HID: hid-input: add mapping for emoji picker key Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nirenjan Krishnan, Jiri Kosina, Sasha Levin

From: Nirenjan Krishnan <nirenjan@gmail.com>

[ Upstream commit 25bdbfbb2d8331a67824dd03d0087e9c98835f3a ]

The Saitek X65 joystick has a pair of axes that were used as mouse
pointer controls by the Windows driver. The corresponding usage page is
the Game Controls page, which is not recognized by the generic HID
driver, and therefore, both axes get mapped to ABS_MISC. The quirk makes
the second axis get mapped to ABS_MISC+1, and therefore made available
separately.

Signed-off-by: Nirenjan Krishnan <nirenjan@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-ids.h    | 1 +
 drivers/hid/hid-quirks.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 1bfa690143d7..ec1b9555d10e 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -1028,6 +1028,7 @@
 #define USB_DEVICE_ID_SAITEK_X52	0x075c
 #define USB_DEVICE_ID_SAITEK_X52_2	0x0255
 #define USB_DEVICE_ID_SAITEK_X52_PRO	0x0762
+#define USB_DEVICE_ID_SAITEK_X65	0x0b6a
 
 #define USB_VENDOR_ID_SAMSUNG		0x0419
 #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE	0x0001
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index f35d919c4eba..4e7a89790746 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -158,6 +158,7 @@ static const struct hid_device_id hid_quirks[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52_2), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52_PRO), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X65), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD2), HID_QUIRK_NO_INIT_REPORTS },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD), HID_QUIRK_NO_INIT_REPORTS },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SENNHEISER, USB_DEVICE_ID_SENNHEISER_BTD500USB), HID_QUIRK_NOGET },
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 03/28] HID: hid-input: add mapping for emoji picker key
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 01/28] net: ieee802154: fix null deref in parse dev addr Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 02/28] HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65 Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 04/28] HID: hid-sensor-hub: Return error for hid_set_field() failure Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dmitry Torokhov, Jiri Kosina, Sasha Levin

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

[ Upstream commit 7b229b13d78d112e2c5d4a60a3c6f602289959fa ]

HUTRR101 added a new usage code for a key that is supposed to invoke and
dismiss an emoji picker widget to assist users to locate and enter emojis.

This patch adds a new key definition KEY_EMOJI_PICKER and maps 0x0c/0x0d9
usage code to this new keycode. Additionally hid-debug is adjusted to
recognize this new usage code as well.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-debug.c                | 1 +
 drivers/hid/hid-input.c                | 3 +++
 include/uapi/linux/input-event-codes.h | 1 +
 3 files changed, 5 insertions(+)

diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 9453147d020d..01135713e8f9 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -929,6 +929,7 @@ static const char *keys[KEY_MAX + 1] = {
 	[KEY_APPSELECT] = "AppSelect",
 	[KEY_SCREENSAVER] = "ScreenSaver",
 	[KEY_VOICECOMMAND] = "VoiceCommand",
+	[KEY_EMOJI_PICKER] = "EmojiPicker",
 	[KEY_BRIGHTNESS_MIN] = "BrightnessMin",
 	[KEY_BRIGHTNESS_MAX] = "BrightnessMax",
 	[KEY_BRIGHTNESS_AUTO] = "BrightnessAuto",
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index ec08895e7b1d..6d551ae251c0 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -957,6 +957,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 
 		case 0x0cd: map_key_clear(KEY_PLAYPAUSE);	break;
 		case 0x0cf: map_key_clear(KEY_VOICECOMMAND);	break;
+
+		case 0x0d9: map_key_clear(KEY_EMOJI_PICKER);	break;
+
 		case 0x0e0: map_abs_clear(ABS_VOLUME);		break;
 		case 0x0e2: map_key_clear(KEY_MUTE);		break;
 		case 0x0e5: map_key_clear(KEY_BASSBOOST);	break;
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 472cd5bc5567..311a57f3e01a 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -607,6 +607,7 @@
 #define KEY_VOICECOMMAND		0x246	/* Listening Voice Command */
 #define KEY_ASSISTANT		0x247	/* AL Context-aware desktop assistant */
 #define KEY_KBD_LAYOUT_NEXT	0x248	/* AC Next Keyboard Layout Select */
+#define KEY_EMOJI_PICKER	0x249	/* Show/hide emoji picker (HUTRR101) */
 
 #define KEY_BRIGHTNESS_MIN		0x250	/* Set Brightness to Minimum */
 #define KEY_BRIGHTNESS_MAX		0x251	/* Set Brightness to Maximum */
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 04/28] HID: hid-sensor-hub: Return error for hid_set_field() failure
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 03/28] HID: hid-input: add mapping for emoji picker key Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 05/28] HID: quirks: Add quirk for Lenovo optical mouse Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Srinivas Pandruvada,
	Jonathan Cameron, Jiri Kosina, Sasha Levin

From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

[ Upstream commit edb032033da0dc850f6e7740fa1023c73195bc89 ]

In the function sensor_hub_set_feature(), return error when hid_set_field()
fails.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-sensor-hub.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 3dd7d3246737..f9983145d4e7 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -210,16 +210,21 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
 	buffer_size = buffer_size / sizeof(__s32);
 	if (buffer_size) {
 		for (i = 0; i < buffer_size; ++i) {
-			hid_set_field(report->field[field_index], i,
-				      (__force __s32)cpu_to_le32(*buf32));
+			ret = hid_set_field(report->field[field_index], i,
+					    (__force __s32)cpu_to_le32(*buf32));
+			if (ret)
+				goto done_proc;
+
 			++buf32;
 		}
 	}
 	if (remaining_bytes) {
 		value = 0;
 		memcpy(&value, (u8 *)buf32, remaining_bytes);
-		hid_set_field(report->field[field_index], i,
-			      (__force __s32)cpu_to_le32(value));
+		ret = hid_set_field(report->field[field_index], i,
+				    (__force __s32)cpu_to_le32(value));
+		if (ret)
+			goto done_proc;
 	}
 	hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT);
 	hid_hw_wait(hsdev->hdev);
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 05/28] HID: quirks: Add quirk for Lenovo optical mouse
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 04/28] HID: hid-sensor-hub: Return error for hid_set_field() failure Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 06/28] HID: multitouch: set Stylus suffix for Stylus-application devices, too Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Saeed Mirzamohammadi, Jiri Kosina,
	Sasha Levin

From: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>

[ Upstream commit 3b2520076822f15621509a6da3bc4a8636cd33b4 ]

The Lenovo optical mouse with vendor id of 0x17ef and product id of
0x600e experiences disconnecting issues every 55 seconds:

[38565.706242] usb 1-1.4: Product: Lenovo Optical Mouse
[38565.728603] input: Lenovo Optical Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:17EF:600E.029A/input/input665
[38565.755949] hid-generic 0003:17EF:600E.029A: input,hidraw1: USB HID v1.11 Mouse [Lenovo Optical Mouse] on usb-0000:01:00.0-1.4/input0
[38619.360692] usb 1-1.4: USB disconnect, device number 48
[38620.864990] usb 1-1.4: new low-speed USB device number 49 using xhci_hcd
[38620.984011] usb 1-1.4: New USB device found, idVendor=17ef,idProduct=600e, bcdDevice= 1.00
[38620.998117] usb 1-1.4: New USB device strings: Mfr=0, Product=2,SerialNumber=0

This adds HID_QUIRK_ALWAYS_POLL for this device in order to work properly.

Signed-off-by: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-ids.h    | 1 +
 drivers/hid/hid-quirks.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index ec1b9555d10e..6ed6158d4f73 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -741,6 +741,7 @@
 #define USB_DEVICE_ID_LENOVO_X1_COVER	0x6085
 #define USB_DEVICE_ID_LENOVO_X1_TAB	0x60a3
 #define USB_DEVICE_ID_LENOVO_X1_TAB3	0x60b5
+#define USB_DEVICE_ID_LENOVO_OPTICAL_USB_MOUSE_600E	0x600e
 #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_608D	0x608d
 #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019	0x6019
 #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_602E	0x602e
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 4e7a89790746..efc9d0d28170 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -110,6 +110,7 @@ static const struct hid_device_id hid_quirks[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_M912), HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M406XE), HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2), HID_QUIRK_ALWAYS_POLL },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_OPTICAL_USB_MOUSE_600E), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_608D), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_602E), HID_QUIRK_ALWAYS_POLL },
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 06/28] HID: multitouch: set Stylus suffix for Stylus-application devices, too
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 05/28] HID: quirks: Add quirk for Lenovo optical mouse Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 07/28] HID: Add BUS_VIRTUAL to hid_connect logging Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ahelenia Ziemiańska,
	Jiri Kosina, Sasha Levin

From: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>

[ Upstream commit bc8b796f618c3ccb0a2a8ed1e96c00a1a7849415 ]

This re-adds the suffix to Win8 stylus-on-touchscreen devices,
now that they aren't erroneously marked as MT

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-multitouch.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index f290ba856323..37270b8f4e58 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1587,13 +1587,13 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
 		/* we do not set suffix = "Touchscreen" */
 		hi->input->name = hdev->name;
 		break;
-	case HID_DG_STYLUS:
-		/* force BTN_STYLUS to allow tablet matching in udev */
-		__set_bit(BTN_STYLUS, hi->input->keybit);
-		break;
 	case HID_VD_ASUS_CUSTOM_MEDIA_KEYS:
 		suffix = "Custom Media Keys";
 		break;
+	case HID_DG_STYLUS:
+		/* force BTN_STYLUS to allow tablet matching in udev */
+		__set_bit(BTN_STYLUS, hi->input->keybit);
+		fallthrough;
 	case HID_DG_PEN:
 		suffix = "Stylus";
 		break;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 07/28] HID: Add BUS_VIRTUAL to hid_connect logging
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 06/28] HID: multitouch: set Stylus suffix for Stylus-application devices, too Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 08/28] HID: usbhid: fix info leak in hid_submit_ctrl Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mark Bolhuis, Jiri Kosina, Sasha Levin

From: Mark Bolhuis <mark@bolhuis.dev>

[ Upstream commit 48e33befe61a7d407753c53d1a06fc8d6b5dab80 ]

Add BUS_VIRTUAL to hid_connect logging since it's a valid hid bus type and it
should not print <UNKNOWN>

Signed-off-by: Mark Bolhuis <mark@bolhuis.dev>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 8d202011b2db..550fff6e41ec 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1998,6 +1998,9 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
 	case BUS_I2C:
 		bus = "I2C";
 		break;
+	case BUS_VIRTUAL:
+		bus = "VIRTUAL";
+		break;
 	default:
 		bus = "<UNKNOWN>";
 	}
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 08/28] HID: usbhid: fix info leak in hid_submit_ctrl
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 07/28] HID: Add BUS_VIRTUAL to hid_connect logging Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 09/28] drm/tegra: sor: Do not leak runtime PM reference Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot+7c2bb71996f95a82524c,
	Anirudh Rayabharam, Benjamin Tissoires, Jiri Kosina, Sasha Levin

From: Anirudh Rayabharam <mail@anirudhrb.com>

[ Upstream commit 6be388f4a35d2ce5ef7dbf635a8964a5da7f799f ]

In hid_submit_ctrl(), the way of calculating the report length doesn't
take into account that report->size can be zero. When running the
syzkaller reproducer, a report of size 0 causes hid_submit_ctrl) to
calculate transfer_buffer_length as 16384. When this urb is passed to
the usb core layer, KMSAN reports an info leak of 16384 bytes.

To fix this, first modify hid_report_len() to account for the zero
report size case by using DIV_ROUND_UP for the division. Then, call it
from hid_submit_ctrl().

Reported-by: syzbot+7c2bb71996f95a82524c@syzkaller.appspotmail.com
Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/usbhid/hid-core.c | 2 +-
 include/linux/hid.h           | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 17a638f15082..1cfbbaf6901d 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -374,7 +374,7 @@ static int hid_submit_ctrl(struct hid_device *hid)
 	raw_report = usbhid->ctrl[usbhid->ctrltail].raw_report;
 	dir = usbhid->ctrl[usbhid->ctrltail].dir;
 
-	len = ((report->size - 1) >> 3) + 1 + (report->id > 0);
+	len = hid_report_len(report);
 	if (dir == USB_DIR_OUT) {
 		usbhid->urbctrl->pipe = usb_sndctrlpipe(hid_to_usb_dev(hid), 0);
 		usbhid->urbctrl->transfer_buffer_length = len;
diff --git a/include/linux/hid.h b/include/linux/hid.h
index ae906deb42e8..85bedeb9ca9f 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -1154,8 +1154,7 @@ static inline void hid_hw_wait(struct hid_device *hdev)
  */
 static inline u32 hid_report_len(struct hid_report *report)
 {
-	/* equivalent to DIV_ROUND_UP(report->size, 8) + !!(report->id > 0) */
-	return ((report->size - 1) >> 3) + 1 + (report->id > 0);
+	return DIV_ROUND_UP(report->size, 8) + (report->id > 0);
 }
 
 int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 09/28] drm/tegra: sor: Do not leak runtime PM reference
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 08/28] HID: usbhid: fix info leak in hid_submit_ctrl Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 10/28] ARM: OMAP2+: Fix build warning when mmc_omap is not built Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Pavel Machek (CIP),
	Thierry Reding, Sasha Levin

From: Pavel Machek (CIP) <pavel@denx.de>

[ Upstream commit 73a395c46704304b96bc5e2ee19be31124025c0c ]

It's theoretically possible for the runtime PM reference to leak if the
code fails anywhere between the pm_runtime_resume_and_get() and
pm_runtime_put() calls, so make sure to release the runtime PM reference
in that case.

Practically this will never happen because none of the functions will
fail on Tegra, but it's better for the code to be pedantic in case these
assumptions will ever become wrong.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
[treding@nvidia.com: add commit message]
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/tegra/sor.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 6c3d22165239..0419b6105c8a 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -2875,21 +2875,21 @@ static int tegra_sor_init(struct host1x_client *client)
 		if (err < 0) {
 			dev_err(sor->dev, "failed to acquire SOR reset: %d\n",
 				err);
-			return err;
+			goto rpm_put;
 		}
 
 		err = reset_control_assert(sor->rst);
 		if (err < 0) {
 			dev_err(sor->dev, "failed to assert SOR reset: %d\n",
 				err);
-			return err;
+			goto rpm_put;
 		}
 	}
 
 	err = clk_prepare_enable(sor->clk);
 	if (err < 0) {
 		dev_err(sor->dev, "failed to enable clock: %d\n", err);
-		return err;
+		goto rpm_put;
 	}
 
 	usleep_range(1000, 3000);
@@ -2900,7 +2900,7 @@ static int tegra_sor_init(struct host1x_client *client)
 			dev_err(sor->dev, "failed to deassert SOR reset: %d\n",
 				err);
 			clk_disable_unprepare(sor->clk);
-			return err;
+			goto rpm_put;
 		}
 
 		reset_control_release(sor->rst);
@@ -2929,6 +2929,12 @@ static int tegra_sor_init(struct host1x_client *client)
 	tegra_sor_writel(sor, value, SOR_INT_MASK);
 
 	return 0;
+
+rpm_put:
+	if (sor->rst)
+		pm_runtime_put(sor->dev);
+
+	return err;
 }
 
 static int tegra_sor_exit(struct host1x_client *client)
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 10/28] ARM: OMAP2+: Fix build warning when mmc_omap is not built
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 09/28] drm/tegra: sor: Do not leak runtime PM reference Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 11/28] gfs2: Prevent direct-I/O write fallback errors from getting lost Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yongqiang Liu, Tony Lindgren, Sasha Levin

From: Yongqiang Liu <liuyongqiang13@huawei.com>

[ Upstream commit 040ab72ee10ea88e1883ad143b3e2b77596abc31 ]

GCC reports the following warning with W=1:

arch/arm/mach-omap2/board-n8x0.c:325:19: warning:
variable 'index' set but not used [-Wunused-but-set-variable]
325 |  int bit, *openp, index;
    |                   ^~~~~

Fix this by moving CONFIG_MMC_OMAP to cover the rest codes
in the n8x0_mmc_callback().

Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/mach-omap2/board-n8x0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 418a61ecb827..5e86145db0e2 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -322,6 +322,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot)
 
 static void n8x0_mmc_callback(void *data, u8 card_mask)
 {
+#ifdef CONFIG_MMC_OMAP
 	int bit, *openp, index;
 
 	if (board_is_n800()) {
@@ -339,7 +340,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
 	else
 		*openp = 0;
 
-#ifdef CONFIG_MMC_OMAP
 	omap_mmc_notify_cover_event(mmc_device, index, *openp);
 #else
 	pr_warn("MMC: notify cover event not available\n");
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 11/28] gfs2: Prevent direct-I/O write fallback errors from getting lost
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 10/28] ARM: OMAP2+: Fix build warning when mmc_omap is not built Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 12/28] HID: gt683r: add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Andreas Gruenbacher, Sasha Levin

From: Andreas Gruenbacher <agruenba@redhat.com>

[ Upstream commit 43a511c44e58e357a687d61a20cf5ef1dc9e5a7c ]

When a direct I/O write falls entirely and falls back to buffered I/O and the
buffered I/O fails, the write failed with return value 0 instead of the error
number reported by the buffered I/O. Fix that.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/gfs2/file.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 4a10b4e7092a..69c52edf5713 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -875,8 +875,11 @@ static ssize_t gfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
 		current->backing_dev_info = inode_to_bdi(inode);
 		buffered = iomap_file_buffered_write(iocb, from, &gfs2_iomap_ops);
 		current->backing_dev_info = NULL;
-		if (unlikely(buffered <= 0))
+		if (unlikely(buffered <= 0)) {
+			if (!ret)
+				ret = buffered;
 			goto out_unlock;
+		}
 
 		/*
 		 * We need to ensure that the page cache pages are written to
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 12/28] HID: gt683r: add missing MODULE_DEVICE_TABLE
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 11/28] gfs2: Prevent direct-I/O write fallback errors from getting lost Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 13/28] riscv: Use -mno-relax when using lld linker Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hulk Robot, Bixuan Cui, Jiri Kosina,
	Sasha Levin

From: Bixuan Cui <cuibixuan@huawei.com>

[ Upstream commit a4b494099ad657f1cb85436d333cf38870ee95bc ]

This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-gt683r.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-gt683r.c b/drivers/hid/hid-gt683r.c
index 898871c8c768..29ccb0accfba 100644
--- a/drivers/hid/hid-gt683r.c
+++ b/drivers/hid/hid-gt683r.c
@@ -54,6 +54,7 @@ static const struct hid_device_id gt683r_led_id[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) },
 	{ }
 };
+MODULE_DEVICE_TABLE(hid, gt683r_led_id);
 
 static void gt683r_brightness_set(struct led_classdev *led_cdev,
 				enum led_brightness brightness)
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 13/28] riscv: Use -mno-relax when using lld linker
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 12/28] HID: gt683r: add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 14/28] gfs2: Fix use-after-free in gfs2_glock_shrink_scan Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Khem Raj, Nathan Chancellor,
	Palmer Dabbelt, Sasha Levin

From: Khem Raj <raj.khem@gmail.com>

[ Upstream commit ec3a5cb61146c91f0f7dcec8b7e7157a4879a9ee ]

lld does not implement the RISCV relaxation optimizations like GNU ld
therefore disable it when building with lld, Also pass it to
assembler when using external GNU assembler ( LLVM_IAS != 1 ), this
ensures that relevant assembler option is also enabled along. if these
options are not used then we see following relocations in objects

0000000000000000 R_RISCV_ALIGN     *ABS*+0x0000000000000002

These are then rejected by lld
ld.lld: error: capability.c:(.fixup+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax but the .o is already compiled with -mno-relax

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/riscv/Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index f5e914210245..1cbe0ad78b0f 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -34,6 +34,15 @@ else
 	KBUILD_LDFLAGS += -melf32lriscv
 endif
 
+ifeq ($(CONFIG_LD_IS_LLD),y)
+	KBUILD_CFLAGS += -mno-relax
+	KBUILD_AFLAGS += -mno-relax
+ifneq ($(LLVM_IAS),1)
+	KBUILD_CFLAGS += -Wa,-mno-relax
+	KBUILD_AFLAGS += -Wa,-mno-relax
+endif
+endif
+
 # ISA string setting
 riscv-march-$(CONFIG_ARCH_RV32I)	:= rv32ima
 riscv-march-$(CONFIG_ARCH_RV64I)	:= rv64ima
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 14/28] gfs2: Fix use-after-free in gfs2_glock_shrink_scan
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 13/28] riscv: Use -mno-relax when using lld linker Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 15/28] scsi: target: core: Fix warning on realtime kernels Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot, Hillf Danton,
	Andreas Gruenbacher, Sasha Levin

From: Hillf Danton <hdanton@sina.com>

[ Upstream commit 1ab19c5de4c537ec0d9b21020395a5b5a6c059b2 ]

The GLF_LRU flag is checked under lru_lock in gfs2_glock_remove_from_lru() to
remove the glock from the lru list in __gfs2_glock_put().

On the shrink scan path, the same flag is cleared under lru_lock but because
of cond_resched_lock(&lru_lock) in gfs2_dispose_glock_lru(), progress on the
put side can be made without deleting the glock from the lru list.

Keep GLF_LRU across the race window opened by cond_resched_lock(&lru_lock) to
ensure correct behavior on both sides - clear GLF_LRU after list_del under
lru_lock.

Reported-by: syzbot <syzbot+34ba7ddbf3021981a228@syzkaller.appspotmail.com>
Signed-off-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/gfs2/glock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 9e1685a30bf8..01c41087f067 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1552,6 +1552,7 @@ __acquires(&lru_lock)
 	while(!list_empty(list)) {
 		gl = list_entry(list->next, struct gfs2_glock, gl_lru);
 		list_del_init(&gl->gl_lru);
+		clear_bit(GLF_LRU, &gl->gl_flags);
 		if (!spin_trylock(&gl->gl_lockref.lock)) {
 add_back_to_lru:
 			list_add(&gl->gl_lru, &lru_list);
@@ -1597,7 +1598,6 @@ static long gfs2_scan_glock_lru(int nr)
 		if (!test_bit(GLF_LOCK, &gl->gl_flags)) {
 			list_move(&gl->gl_lru, &dispose);
 			atomic_dec(&lru_count);
-			clear_bit(GLF_LRU, &gl->gl_flags);
 			freed++;
 			continue;
 		}
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 15/28] scsi: target: core: Fix warning on realtime kernels
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 14/28] gfs2: Fix use-after-free in gfs2_glock_shrink_scan Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 16/28] ethernet: myri10ge: Fix missing error code in myri10ge_probe() Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bart Van Assche, Maurizio Lombardi,
	Martin K. Petersen, Sasha Levin

From: Maurizio Lombardi <mlombard@redhat.com>

[ Upstream commit 515da6f4295c2c42b8c54572cce3d2dd1167c41e ]

On realtime kernels, spin_lock_irq*(spinlock_t) do not disable the
interrupts, a call to irqs_disabled() will return false thus firing a
warning in __transport_wait_for_tasks().

Remove the warning and also replace assert_spin_locked() with
lockdep_assert_held()

Link: https://lore.kernel.org/r/20210531121326.3649-1-mlombard@redhat.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/target/target_core_transport.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index a16835c0bb1d..5cf9e7677926 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2993,9 +2993,7 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
 	__releases(&cmd->t_state_lock)
 	__acquires(&cmd->t_state_lock)
 {
-
-	assert_spin_locked(&cmd->t_state_lock);
-	WARN_ON_ONCE(!irqs_disabled());
+	lockdep_assert_held(&cmd->t_state_lock);
 
 	if (fabric_stop)
 		cmd->transport_state |= CMD_T_FABRIC_STOP;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 16/28] ethernet: myri10ge: Fix missing error code in myri10ge_probe()
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 15/28] scsi: target: core: Fix warning on realtime kernels Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 17/28] scsi: qedf: Do not put host in qedf_vport_create() unconditionally Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Abaci Robot, Jiapeng Chong,
	David S. Miller, Sasha Levin

From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

[ Upstream commit f336d0b93ae978f12c5e27199f828da89b91e56a ]

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'status'.

Eliminate the follow smatch warning:

drivers/net/ethernet/myricom/myri10ge/myri10ge.c:3818 myri10ge_probe()
warn: missing error code 'status'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index c979f38a2e0c..c4c716094982 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -3849,6 +3849,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		dev_err(&pdev->dev,
 			"invalid sram_size %dB or board span %ldB\n",
 			mgp->sram_size, mgp->board_span);
+		status = -EINVAL;
 		goto abort_with_ioremap;
 	}
 	memcpy_fromio(mgp->eeprom_strings,
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 17/28] scsi: qedf: Do not put host in qedf_vport_create() unconditionally
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 16/28] ethernet: myri10ge: Fix missing error code in myri10ge_probe() Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 18/28] scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Javed Hasan, Daniel Wagner,
	Martin K. Petersen, Sasha Levin

From: Daniel Wagner <dwagner@suse.de>

[ Upstream commit 79c932cd6af9829432888c4a0001d01793a09f12 ]

Do not drop reference count on vn_port->host in qedf_vport_create()
unconditionally. Instead drop the reference count in qedf_vport_destroy().

Link: https://lore.kernel.org/r/20210521143440.84816-1-dwagner@suse.de
Reported-by: Javed Hasan <jhasan@marvell.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/qedf/qedf_main.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 9c0955c334e3..7a6306f8483e 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -1729,22 +1729,20 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
 		fcoe_wwn_to_str(vport->port_name, buf, sizeof(buf));
 		QEDF_WARN(&(base_qedf->dbg_ctx), "Failed to create vport, "
 			   "WWPN (0x%s) already exists.\n", buf);
-		goto err1;
+		return rc;
 	}
 
 	if (atomic_read(&base_qedf->link_state) != QEDF_LINK_UP) {
 		QEDF_WARN(&(base_qedf->dbg_ctx), "Cannot create vport "
 			   "because link is not up.\n");
-		rc = -EIO;
-		goto err1;
+		return -EIO;
 	}
 
 	vn_port = libfc_vport_create(vport, sizeof(struct qedf_ctx));
 	if (!vn_port) {
 		QEDF_WARN(&(base_qedf->dbg_ctx), "Could not create lport "
 			   "for vport.\n");
-		rc = -ENOMEM;
-		goto err1;
+		return -ENOMEM;
 	}
 
 	fcoe_wwn_to_str(vport->port_name, buf, sizeof(buf));
@@ -1768,7 +1766,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
 	if (rc) {
 		QEDF_ERR(&(base_qedf->dbg_ctx), "Could not allocate memory "
 		    "for lport stats.\n");
-		goto err2;
+		goto err;
 	}
 
 	fc_set_wwnn(vn_port, vport->node_name);
@@ -1786,7 +1784,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
 	if (rc) {
 		QEDF_WARN(&base_qedf->dbg_ctx,
 			  "Error adding Scsi_Host rc=0x%x.\n", rc);
-		goto err2;
+		goto err;
 	}
 
 	/* Set default dev_loss_tmo based on module parameter */
@@ -1827,9 +1825,10 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
 	vport_qedf->dbg_ctx.host_no = vn_port->host->host_no;
 	vport_qedf->dbg_ctx.pdev = base_qedf->pdev;
 
-err2:
+	return 0;
+
+err:
 	scsi_host_put(vn_port->host);
-err1:
 	return rc;
 }
 
@@ -1870,8 +1869,7 @@ static int qedf_vport_destroy(struct fc_vport *vport)
 	fc_lport_free_stats(vn_port);
 
 	/* Release Scsi_Host */
-	if (vn_port->host)
-		scsi_host_put(vn_port->host);
+	scsi_host_put(vn_port->host);
 
 out:
 	return 0;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 18/28] scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 17/28] scsi: qedf: Do not put host in qedf_vport_create() unconditionally Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 19/28] nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues() Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ewan D. Milne, Martin K. Petersen,
	Sasha Levin

From: Ewan D. Milne <emilne@redhat.com>

[ Upstream commit e57f5cd99ca60cddf40201b0f4ced9f1938e299c ]

Apparently some arrays are now returning "HPE" as the vendor.

Link: https://lore.kernel.org/r/20210601175214.25719-1-emilne@redhat.com
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/scsi_devinfo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index fb5a7832353c..7f76bf5cc8a8 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -184,6 +184,7 @@ static struct {
 	{"HP", "C3323-300", "4269", BLIST_NOTQ},
 	{"HP", "C5713A", NULL, BLIST_NOREPORTLUN},
 	{"HP", "DISK-SUBSYSTEM", "*", BLIST_REPORTLUN2},
+	{"HPE", "OPEN-", "*", BLIST_REPORTLUN2 | BLIST_TRY_VPD_PAGES},
 	{"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN},
 	{"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
 	{"IBM", "2105", NULL, BLIST_RETRY_HWERROR},
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 19/28] nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues()
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 18/28] scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 20/28] nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hannes Reinecke, Chaitanya Kulkarni,
	Christoph Hellwig, Sasha Levin

From: Hannes Reinecke <hare@suse.de>

[ Upstream commit a6c144f3d2e230f2b3ac5ed8c51e0f0391556197 ]

The queue count is increased in nvme_loop_init_io_queues(), so we
need to reset it to 1 at the end of nvme_loop_destroy_io_queues().
Otherwise the function is not re-entrant safe, and crash will happen
during concurrent reset and remove calls.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nvme/target/loop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index 82b87a4c50f6..b4f5503ae570 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -288,6 +288,7 @@ static void nvme_loop_destroy_io_queues(struct nvme_loop_ctrl *ctrl)
 		clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[i].flags);
 		nvmet_sq_destroy(&ctrl->queues[i].nvme_sq);
 	}
+	ctrl->ctrl.queue_count = 1;
 }
 
 static int nvme_loop_init_io_queues(struct nvme_loop_ctrl *ctrl)
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 20/28] nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 19/28] nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues() Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 21/28] nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue() Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hannes Reinecke, Chaitanya Kulkarni,
	Christoph Hellwig, Sasha Levin

From: Hannes Reinecke <hare@suse.de>

[ Upstream commit 1c5f8e882a05de5c011e8c3fbeceb0d1c590eb53 ]

When the call to nvme_enable_ctrl() in nvme_loop_configure_admin_queue()
fails the NVME_LOOP_Q_LIVE flag is not cleared.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nvme/target/loop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index b4f5503ae570..f752e9432676 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -395,6 +395,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl)
 	return 0;
 
 out_cleanup_queue:
+	clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags);
 	blk_cleanup_queue(ctrl->ctrl.admin_q);
 out_cleanup_fabrics_q:
 	blk_cleanup_queue(ctrl->ctrl.fabrics_q);
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 21/28] nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue()
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 20/28] nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 22/28] net: ipconfig: Dont override command-line hostnames or domains Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hannes Reinecke, Chaitanya Kulkarni,
	Christoph Hellwig, Sasha Levin

From: Hannes Reinecke <hare@suse.de>

[ Upstream commit 4237de2f73a669e4f89ac0aa2b44fb1a1d9ec583 ]

We need to check the NVME_LOOP_Q_LIVE flag in
nvme_loop_destroy_admin_queue() to protect against duplicate
invocations eg during concurrent reset and remove calls.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nvme/target/loop.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index f752e9432676..f657a12bf1fe 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -252,7 +252,8 @@ static const struct blk_mq_ops nvme_loop_admin_mq_ops = {
 
 static void nvme_loop_destroy_admin_queue(struct nvme_loop_ctrl *ctrl)
 {
-	clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags);
+	if (!test_and_clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags))
+		return;
 	nvmet_sq_destroy(&ctrl->queues[0].nvme_sq);
 	blk_cleanup_queue(ctrl->ctrl.admin_q);
 	blk_cleanup_queue(ctrl->ctrl.fabrics_q);
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 22/28] net: ipconfig: Dont override command-line hostnames or domains
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 21/28] nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue() Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 23/28] drm/amd/display: Allow bandwidth validation for 0 streams Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Josh Triplett, David S. Miller, Sasha Levin

From: Josh Triplett <josh@joshtriplett.org>

[ Upstream commit b508d5fb69c2211a1b860fc058aafbefc3b3c3cd ]

If the user specifies a hostname or domain name as part of the ip=
command-line option, preserve it and don't overwrite it with one
supplied by DHCP/BOOTP.

For instance, ip=::::myhostname::dhcp will use "myhostname" rather than
ignoring and overwriting it.

Fix the comment on ic_bootp_string that suggests it only copies a string
"if not already set"; it doesn't have any such logic.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ipv4/ipconfig.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 9bcca08efec9..c05ad600a4ff 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -870,7 +870,7 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
 
 
 /*
- *  Copy BOOTP-supplied string if not already set.
+ *  Copy BOOTP-supplied string
  */
 static int __init ic_bootp_string(char *dest, char *src, int len, int max)
 {
@@ -919,12 +919,15 @@ static void __init ic_do_bootp_ext(u8 *ext)
 		}
 		break;
 	case 12:	/* Host name */
-		ic_bootp_string(utsname()->nodename, ext+1, *ext,
-				__NEW_UTS_LEN);
-		ic_host_name_set = 1;
+		if (!ic_host_name_set) {
+			ic_bootp_string(utsname()->nodename, ext+1, *ext,
+					__NEW_UTS_LEN);
+			ic_host_name_set = 1;
+		}
 		break;
 	case 15:	/* Domain name (DNS) */
-		ic_bootp_string(ic_domain, ext+1, *ext, sizeof(ic_domain));
+		if (!ic_domain[0])
+			ic_bootp_string(ic_domain, ext+1, *ext, sizeof(ic_domain));
 		break;
 	case 17:	/* Root path */
 		if (!root_server_path[0])
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 23/28] drm/amd/display: Allow bandwidth validation for 0 streams.
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 22/28] net: ipconfig: Dont override command-line hostnames or domains Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 24/28] drm/amd/display: Fix overlay validation by considering cursors Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bindu Ramamurthy, Roman Li,
	Alex Deucher, Sasha Levin

From: Bindu Ramamurthy <bindu.r@amd.com>

[ Upstream commit ba8e59773ae59818695d1e20b8939282da80ec8c ]

[Why]
Bandwidth calculations are triggered for non zero streams, and
in case of 0 streams, these calculations were skipped with
pstate status not being updated.

[How]
As the pstate status is applicable for non zero streams, check
added for allowing 0 streams inline with dcn internal bandwidth
validations.

Signed-off-by: Bindu Ramamurthy <bindu.r@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index 08062de3fbeb..2b1175bb2dae 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -2917,7 +2917,7 @@ bool dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context,
 	voltage_supported = dcn20_validate_bandwidth_internal(dc, context, false);
 	dummy_pstate_supported = context->bw_ctx.bw.dcn.clk.p_state_change_support;
 
-	if (voltage_supported && dummy_pstate_supported) {
+	if (voltage_supported && (dummy_pstate_supported || !(context->stream_count))) {
 		context->bw_ctx.bw.dcn.clk.p_state_change_support = false;
 		goto restore_dml_state;
 	}
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 24/28] drm/amd/display: Fix overlay validation by considering cursors
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 23/28] drm/amd/display: Allow bandwidth validation for 0 streams Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:59   ` Harry Wentland
  2021-06-16 15:33 ` [PATCH 5.4 25/28] rtnetlink: Fix missing error code in rtnl_bridge_notify() Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  33 siblings, 1 reply; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tianci.Yin, Harry Wentland,
	Nicholas Choi, Bhawanpreet Lakha, Nicholas Kazlauskas,
	Mark Yacoub, Daniel Wheeler, Rodrigo Siqueira, Alex Deucher,
	Sasha Levin

From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

[ Upstream commit 33f409e60eb0c59a4d0d06a62ab4642a988e17f7 ]

A few weeks ago, we saw a two cursor issue in a ChromeOS system. We
fixed it in the commit:

 drm/amd/display: Fix two cursor duplication when using overlay
 (read the commit message for more details)

After this change, we noticed that some IGT subtests related to
kms_plane and kms_plane_scaling started to fail. After investigating
this issue, we noticed that all subtests that fail have a primary plane
covering the overlay plane, which is currently rejected by amdgpu dm.
Fail those IGT tests highlight that our verification was too broad and
compromises the overlay usage in our drive. This patch fixes this issue
by ensuring that we only reject commits where the primary plane is not
fully covered by the overlay when the cursor hardware is enabled. With
this fix, all IGT tests start to pass again, which means our overlay
support works as expected.

Cc: Tianci.Yin <tianci.yin@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Nicholas Choi <nicholas.choi@amd.com>
Cc: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com>
Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Cc: Mark Yacoub <markyacoub@google.com>
Cc: Daniel Wheeler <daniel.wheeler@amd.com>

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 6e31e899192c..29657844bac1 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -7272,7 +7272,7 @@ static int validate_overlay(struct drm_atomic_state *state)
 	int i;
 	struct drm_plane *plane;
 	struct drm_plane_state *old_plane_state, *new_plane_state;
-	struct drm_plane_state *primary_state, *overlay_state = NULL;
+	struct drm_plane_state *primary_state, *cursor_state, *overlay_state = NULL;
 
 	/* Check if primary plane is contained inside overlay */
 	for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
@@ -7302,6 +7302,14 @@ static int validate_overlay(struct drm_atomic_state *state)
 	if (!primary_state->crtc)
 		return 0;
 
+	/* check if cursor plane is enabled */
+	cursor_state = drm_atomic_get_plane_state(state, overlay_state->crtc->cursor);
+	if (IS_ERR(cursor_state))
+		return PTR_ERR(cursor_state);
+
+	if (drm_atomic_plane_disabling(plane->state, cursor_state))
+		return 0;
+
 	/* Perform the bounds check to ensure the overlay plane covers the primary */
 	if (primary_state->crtc_x < overlay_state->crtc_x ||
 	    primary_state->crtc_y < overlay_state->crtc_y ||
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 25/28] rtnetlink: Fix missing error code in rtnl_bridge_notify()
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 24/28] drm/amd/display: Fix overlay validation by considering cursors Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 26/28] net/x25: Return the correct errno code Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Abaci Robot, Jiapeng Chong,
	David S. Miller, Sasha Levin

From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

[ Upstream commit a8db57c1d285c758adc7fb43d6e2bad2554106e1 ]

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'err'.

Eliminate the follow smatch warning:

net/core/rtnetlink.c:4834 rtnl_bridge_notify() warn: missing error code
'err'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/core/rtnetlink.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 73c09b5864d7..bdeb169a7a99 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -4535,8 +4535,10 @@ static int rtnl_bridge_notify(struct net_device *dev)
 	if (err < 0)
 		goto errout;
 
-	if (!skb->len)
+	if (!skb->len) {
+		err = -EINVAL;
 		goto errout;
+	}
 
 	rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
 	return 0;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 26/28] net/x25: Return the correct errno code
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 25/28] rtnetlink: Fix missing error code in rtnl_bridge_notify() Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 27/28] net: " Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Zheng Yongjun, David S. Miller, Sasha Levin

From: Zheng Yongjun <zhengyongjun3@huawei.com>

[ Upstream commit d7736958668c4facc15f421e622ffd718f5be80a ]

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/x25/af_x25.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index cb1f5016c433..d8d603aa4887 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -546,7 +546,7 @@ static int x25_create(struct net *net, struct socket *sock, int protocol,
 	if (protocol)
 		goto out;
 
-	rc = -ENOBUFS;
+	rc = -ENOMEM;
 	if ((sk = x25_alloc_socket(net, kern)) == NULL)
 		goto out;
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 27/28] net: Return the correct errno code
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 26/28] net/x25: Return the correct errno code Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 15:33 ` [PATCH 5.4 28/28] fib: " Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Zheng Yongjun, David S. Miller, Sasha Levin

From: Zheng Yongjun <zhengyongjun3@huawei.com>

[ Upstream commit 49251cd00228a3c983651f6bb2f33f6a0b8f152e ]

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/compat.c b/net/compat.c
index c848bcb517f3..f5b88166c44a 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -160,7 +160,7 @@ int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk,
 	if (kcmlen > stackbuf_size)
 		kcmsg_base = kcmsg = sock_kmalloc(sk, kcmlen, GFP_KERNEL);
 	if (kcmsg == NULL)
-		return -ENOBUFS;
+		return -ENOMEM;
 
 	/* Now copy them over neatly. */
 	memset(kcmsg, 0, kcmlen);
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5.4 28/28] fib: Return the correct errno code
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 27/28] net: " Greg Kroah-Hartman
@ 2021-06-16 15:33 ` Greg Kroah-Hartman
  2021-06-16 18:49 ` [PATCH 5.4 00/28] 5.4.127-rc1 review Jon Hunter
                   ` (5 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Zheng Yongjun, David S. Miller, Sasha Levin

From: Zheng Yongjun <zhengyongjun3@huawei.com>

[ Upstream commit 59607863c54e9eb3f69afc5257dfe71c38bb751e ]

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/core/fib_rules.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index bb11fc87bbae..675f27ef6872 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -1138,7 +1138,7 @@ static void notify_rule_change(int event, struct fib_rule *rule,
 {
 	struct net *net;
 	struct sk_buff *skb;
-	int err = -ENOBUFS;
+	int err = -ENOMEM;
 
 	net = ops->fro_net;
 	skb = nlmsg_new(fib_rule_nlmsg_size(ops, rule), GFP_KERNEL);
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [PATCH 5.4 24/28] drm/amd/display: Fix overlay validation by considering cursors
  2021-06-16 15:33 ` [PATCH 5.4 24/28] drm/amd/display: Fix overlay validation by considering cursors Greg Kroah-Hartman
@ 2021-06-16 15:59   ` Harry Wentland
  2021-06-16 16:25     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 37+ messages in thread
From: Harry Wentland @ 2021-06-16 15:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: stable, Tianci.Yin, Nicholas Choi, Bhawanpreet Lakha,
	Nicholas Kazlauskas, Mark Yacoub, Daniel Wheeler,
	Rodrigo Siqueira, Alex Deucher, Sasha Levin

Hi Greg

Please drop this from 5.4, 5.10, or 5.12 stable kernels as it's apt to break any userspace that is using the legacy cursor IOCTL, which is most userspace.

We are in the process of reverting this on amd-staging-drm-next. Siqueira will send a patch.

Thanks,
Harry

On 2021-06-16 11:33 a.m., Greg Kroah-Hartman wrote:
> From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>
> [ Upstream commit 33f409e60eb0c59a4d0d06a62ab4642a988e17f7 ]
>
> A few weeks ago, we saw a two cursor issue in a ChromeOS system. We
> fixed it in the commit:
>
>  drm/amd/display: Fix two cursor duplication when using overlay
>  (read the commit message for more details)
>
> After this change, we noticed that some IGT subtests related to
> kms_plane and kms_plane_scaling started to fail. After investigating
> this issue, we noticed that all subtests that fail have a primary plane
> covering the overlay plane, which is currently rejected by amdgpu dm.
> Fail those IGT tests highlight that our verification was too broad and
> compromises the overlay usage in our drive. This patch fixes this issue
> by ensuring that we only reject commits where the primary plane is not
> fully covered by the overlay when the cursor hardware is enabled. With
> this fix, all IGT tests start to pass again, which means our overlay
> support works as expected.
>
> Cc: Tianci.Yin <tianci.yin@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Nicholas Choi <nicholas.choi@amd.com>
> Cc: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com>
> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
> Cc: Mark Yacoub <markyacoub@google.com>
> Cc: Daniel Wheeler <daniel.wheeler@amd.com>
>
> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 6e31e899192c..29657844bac1 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -7272,7 +7272,7 @@ static int validate_overlay(struct drm_atomic_state *state)
>  	int i;
>  	struct drm_plane *plane;
>  	struct drm_plane_state *old_plane_state, *new_plane_state;
> -	struct drm_plane_state *primary_state, *overlay_state = NULL;
> +	struct drm_plane_state *primary_state, *cursor_state, *overlay_state = NULL;
>  
>  	/* Check if primary plane is contained inside overlay */
>  	for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
> @@ -7302,6 +7302,14 @@ static int validate_overlay(struct drm_atomic_state *state)
>  	if (!primary_state->crtc)
>  		return 0;
>  
> +	/* check if cursor plane is enabled */
> +	cursor_state = drm_atomic_get_plane_state(state, overlay_state->crtc->cursor);
> +	if (IS_ERR(cursor_state))
> +		return PTR_ERR(cursor_state);
> +
> +	if (drm_atomic_plane_disabling(plane->state, cursor_state))
> +		return 0;
> +
>  	/* Perform the bounds check to ensure the overlay plane covers the primary */
>  	if (primary_state->crtc_x < overlay_state->crtc_x ||
>  	    primary_state->crtc_y < overlay_state->crtc_y ||


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 5.4 24/28] drm/amd/display: Fix overlay validation by considering cursors
  2021-06-16 15:59   ` Harry Wentland
@ 2021-06-16 16:25     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-16 16:25 UTC (permalink / raw)
  To: Harry Wentland
  Cc: linux-kernel, stable, Tianci.Yin, Nicholas Choi,
	Bhawanpreet Lakha, Nicholas Kazlauskas, Mark Yacoub,
	Daniel Wheeler, Rodrigo Siqueira, Alex Deucher, Sasha Levin

On Wed, Jun 16, 2021 at 11:59:55AM -0400, Harry Wentland wrote:
> Hi Greg
> 
> Please drop this from 5.4, 5.10, or 5.12 stable kernels as it's apt to break any userspace that is using the legacy cursor IOCTL, which is most userspace.
> 
> We are in the process of reverting this on amd-staging-drm-next. Siqueira will send a patch.

Dropped from all 3 trees now, thanks!

greg k-h

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 5.4 00/28] 5.4.127-rc1 review
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2021-06-16 15:33 ` [PATCH 5.4 28/28] fib: " Greg Kroah-Hartman
@ 2021-06-16 18:49 ` Jon Hunter
  2021-06-16 22:37 ` Florian Fainelli
                   ` (4 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Jon Hunter @ 2021-06-16 18:49 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, stable, linux-tegra

On Wed, 16 Jun 2021 17:33:11 +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.4.127 release.
> There are 28 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 18 Jun 2021 15:28:19 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.127-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h

All tests passing for Tegra ...

Test results for stable-v5.4:
    12 builds:	12 pass, 0 fail
    26 boots:	26 pass, 0 fail
    59 tests:	59 pass, 0 fail

Linux version:	5.4.127-rc1-g4e778e863160
Boards tested:	tegra124-jetson-tk1, tegra186-p2771-0000,
                tegra194-p2972-0000, tegra20-ventana,
                tegra210-p2371-2180, tegra210-p3450-0000,
                tegra30-cardhu-a04

Tested-by: Jon Hunter <jonathanh@nvidia.com>

Jon

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 5.4 00/28] 5.4.127-rc1 review
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2021-06-16 18:49 ` [PATCH 5.4 00/28] 5.4.127-rc1 review Jon Hunter
@ 2021-06-16 22:37 ` Florian Fainelli
  2021-06-17 10:42 ` Naresh Kamboju
                   ` (3 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Florian Fainelli @ 2021-06-16 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, lkft-triage, pavel,
	jonathanh, stable



On 6/16/2021 8:33 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.4.127 release.
> There are 28 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 18 Jun 2021 15:28:19 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.127-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h

On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels:

Tested-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 5.4 00/28] 5.4.127-rc1 review
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2021-06-16 22:37 ` Florian Fainelli
@ 2021-06-17 10:42 ` Naresh Kamboju
  2021-06-17 10:59 ` Sudip Mukherjee
                   ` (2 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Naresh Kamboju @ 2021-06-17 10:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: open list, Shuah Khan, Florian Fainelli, patches, lkft-triage,
	Jon Hunter, linux-stable, Pavel Machek, Andrew Morton,
	Linus Torvalds, Guenter Roeck

On Wed, 16 Jun 2021 at 21:05, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 5.4.127 release.
> There are 28 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 18 Jun 2021 15:28:19 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
>         https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.127-rc1.gz
> or in the git tree and branch at:
>         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>

## Build
* kernel: 5.4.127-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git branch: linux-5.4.y
* git commit: 4e778e863160695fca936b0a9452e94fc9824a76
* git describe: v5.4.126-29-g4e778e863160
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.4.y/build/v5.4.126-29-g4e778e863160

## No regressions (compared to v5.4.125-85-g4a2dfe908c1e)


## No fixes (compared to v5.4.125-85-g4a2dfe908c1e)


## Test result summary
 total: 77072, pass: 62517, fail: 1192, skip: 12148, xfail: 1215,

## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 192 total, 192 passed, 0 failed
* arm64: 26 total, 26 passed, 0 failed
* dragonboard-410c: 1 total, 1 passed, 0 failed
* hi6220-hikey: 1 total, 1 passed, 0 failed
* i386: 15 total, 15 passed, 0 failed
* juno-r2: 1 total, 1 passed, 0 failed
* mips: 45 total, 45 passed, 0 failed
* parisc: 9 total, 9 passed, 0 failed
* powerpc: 27 total, 27 passed, 0 failed
* riscv: 21 total, 21 passed, 0 failed
* s390: 9 total, 9 passed, 0 failed
* sh: 18 total, 18 passed, 0 failed
* sparc: 9 total, 9 passed, 0 failed
* x15: 1 total, 1 passed, 0 failed
* x86: 1 total, 1 passed, 0 failed
* x86_64: 26 total, 26 passed, 0 failed

## Test suites summary
* fwts
* igt-gpu-tools
* install-android-platform-tools-r2600
* kselftest-android
* kselftest-bpf
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-lkdtm
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* kvm-unit-tests
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-controllers-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-tracing-tests
* network-basic-tests
* packetdrill
* perf
* rcutorture
* ssuite
* v4l2-compliance

--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 5.4 00/28] 5.4.127-rc1 review
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2021-06-17 10:42 ` Naresh Kamboju
@ 2021-06-17 10:59 ` Sudip Mukherjee
  2021-06-17 21:39 ` Guenter Roeck
  2021-06-18  0:35 ` Samuel Zou
  33 siblings, 0 replies; 37+ messages in thread
From: Sudip Mukherjee @ 2021-06-17 10:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	pavel, jonathanh, f.fainelli, stable

Hi Greg,

On Wed, Jun 16, 2021 at 05:33:11PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.4.127 release.
> There are 28 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 18 Jun 2021 15:28:19 +0000.
> Anything received after that time might be too late.

Build test:
mips (gcc version 11.1.1 20210615): 65 configs -> no failure
arm (gcc version 11.1.1 20210615): 107 configs -> no new failure
arm64 (gcc version 11.1.1 20210615): 2 configs -> no failure
x86_64 (gcc version 10.2.1 20210110): 2 configs -> no failure

Boot test:
x86_64: Booted on my test laptop. No regression.
x86_64: Booted on qemu. No regression.


Tested-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>

--
Regards
Sudip


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 5.4 00/28] 5.4.127-rc1 review
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2021-06-17 10:59 ` Sudip Mukherjee
@ 2021-06-17 21:39 ` Guenter Roeck
  2021-06-18  0:35 ` Samuel Zou
  33 siblings, 0 replies; 37+ messages in thread
From: Guenter Roeck @ 2021-06-17 21:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, lkft-triage, pavel,
	jonathanh, f.fainelli, stable

On Wed, Jun 16, 2021 at 05:33:11PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.4.127 release.
> There are 28 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 18 Jun 2021 15:28:19 +0000.
> Anything received after that time might be too late.
> 

Build results:
	total: 157 pass: 157 fail: 0
Qemu test results:
	total: 428 pass: 428 fail: 0

Tested-by: Guenter Roeck <linux@roeck-us.net>

Guenter

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 5.4 00/28] 5.4.127-rc1 review
  2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2021-06-17 21:39 ` Guenter Roeck
@ 2021-06-18  0:35 ` Samuel Zou
  33 siblings, 0 replies; 37+ messages in thread
From: Samuel Zou @ 2021-06-18  0:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, lkft-triage, pavel,
	jonathanh, f.fainelli, stable



On 2021/6/16 23:33, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.4.127 release.
> There are 28 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 18 Jun 2021 15:28:19 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.127-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

Tested on arm64 and x86 for 5.4.127-rc1,

Kernel repo:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Branch: linux-5.4.y
Version: 5.4.127-rc1
Commit: 4e778e863160695fca936b0a9452e94fc9824a76
Compiler: gcc version 7.3.0 (GCC)

arm64:
--------------------------------------------------------------------
Testcase Result Summary:
total: 8905
passed: 8905
failed: 0
timeout: 0
--------------------------------------------------------------------

x86:
--------------------------------------------------------------------
Testcase Result Summary:
total: 8905
passed: 8905
failed: 0
timeout: 0
--------------------------------------------------------------------

Tested-by: Hulk Robot <hulkrobot@huawei.com>

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2021-06-18  0:35 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 01/28] net: ieee802154: fix null deref in parse dev addr Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 02/28] HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65 Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 03/28] HID: hid-input: add mapping for emoji picker key Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 04/28] HID: hid-sensor-hub: Return error for hid_set_field() failure Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 05/28] HID: quirks: Add quirk for Lenovo optical mouse Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 06/28] HID: multitouch: set Stylus suffix for Stylus-application devices, too Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 07/28] HID: Add BUS_VIRTUAL to hid_connect logging Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 08/28] HID: usbhid: fix info leak in hid_submit_ctrl Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 09/28] drm/tegra: sor: Do not leak runtime PM reference Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 10/28] ARM: OMAP2+: Fix build warning when mmc_omap is not built Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 11/28] gfs2: Prevent direct-I/O write fallback errors from getting lost Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 12/28] HID: gt683r: add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 13/28] riscv: Use -mno-relax when using lld linker Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 14/28] gfs2: Fix use-after-free in gfs2_glock_shrink_scan Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 15/28] scsi: target: core: Fix warning on realtime kernels Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 16/28] ethernet: myri10ge: Fix missing error code in myri10ge_probe() Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 17/28] scsi: qedf: Do not put host in qedf_vport_create() unconditionally Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 18/28] scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 19/28] nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues() Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 20/28] nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 21/28] nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue() Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 22/28] net: ipconfig: Dont override command-line hostnames or domains Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 23/28] drm/amd/display: Allow bandwidth validation for 0 streams Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 24/28] drm/amd/display: Fix overlay validation by considering cursors Greg Kroah-Hartman
2021-06-16 15:59   ` Harry Wentland
2021-06-16 16:25     ` Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 25/28] rtnetlink: Fix missing error code in rtnl_bridge_notify() Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 26/28] net/x25: Return the correct errno code Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 27/28] net: " Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 28/28] fib: " Greg Kroah-Hartman
2021-06-16 18:49 ` [PATCH 5.4 00/28] 5.4.127-rc1 review Jon Hunter
2021-06-16 22:37 ` Florian Fainelli
2021-06-17 10:42 ` Naresh Kamboju
2021-06-17 10:59 ` Sudip Mukherjee
2021-06-17 21:39 ` Guenter Roeck
2021-06-18  0:35 ` Samuel Zou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.