4.19.112-rc1 review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 4.19.112-rc1 review
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-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-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.19.112-rc1
Matteo Croce <[email protected]>
ipv4: ensure rcu_read_lock() in cipso_v4_error()
Waiman Long <[email protected]>
efi: Fix debugobjects warning on 'efi_rts_work'
Chen-Tsung Hsieh <[email protected]>
HID: google: add moonball USB id
Jann Horn <[email protected]>
mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
Kees Cook <[email protected]>
ARM: 8958/1: rename missed uaccess .fixup section
Florian Fainelli <[email protected]>
ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional()
Carl Huang <[email protected]>
net: qrtr: fix len of skb_put_padto in qrtr_node_enqueue
Rafael J. Wysocki <[email protected]>
driver core: Fix creation of device links with PM-runtime flags
Rafael J. Wysocki <[email protected]>
driver core: Remove device link creation limitation
Rafael J. Wysocki <[email protected]>
driver core: Add device link flag DL_FLAG_AUTOPROBE_CONSUMER
Rafael J. Wysocki <[email protected]>
driver core: Make driver core own stateful device links
Rafael J. Wysocki <[email protected]>
driver core: Fix adding device links to probing suppliers
Yong Wu <[email protected]>
driver core: Remove the link if there is no driver with AUTO flag
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20C
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Don't finish_mrq() on a command error during tuning
Navid Emamdoost <[email protected]>
wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle
Navid Emamdoost <[email protected]>
wimax: i2400: fix memory leak
Qian Cai <[email protected]>
jbd2: fix data races at struct journal_head
Alex Maftei (amaftei) <[email protected]>
sfc: fix timestamp reconstruction at 16-bit rollover points
Taehee Yoo <[email protected]>
net: rmnet: fix packet forwarding in rmnet bridge mode
Taehee Yoo <[email protected]>
net: rmnet: fix bridge mode bugs
Taehee Yoo <[email protected]>
net: rmnet: use upper/lower device infrastructure
Taehee Yoo <[email protected]>
net: rmnet: do not allow to change mux id if mux id is duplicated
Taehee Yoo <[email protected]>
net: rmnet: remove rcu_read_lock in rmnet_force_unassociate_device()
Taehee Yoo <[email protected]>
net: rmnet: fix suspicious RCU usage
Taehee Yoo <[email protected]>
net: rmnet: fix NULL pointer dereference in rmnet_changelink()
Taehee Yoo <[email protected]>
net: rmnet: fix NULL pointer dereference in rmnet_newlink()
Luo bin <[email protected]>
hinic: fix a bug of setting hw_ioctxt
Luo bin <[email protected]>
hinic: fix a irq affinity bug
yangerkun <[email protected]>
slip: not call free_netdev before rtnl_unlock in slip_open
Linus Torvalds <[email protected]>
signal: avoid double atomic counter increments for user accounting
Madhuparna Bhowmik <[email protected]>
mac80211: rx: avoid RCU list traversal under mutex
Marek Vasut <[email protected]>
net: ks8851-ml: Fix IRQ handling and locking
Daniele Palmas <[email protected]>
net: usb: qmi_wwan: restore mtu min/max values after raw_ip switch
Igor Druzhinin <[email protected]>
scsi: libfc: free response frame from GPN_ID
Johannes Berg <[email protected]>
cfg80211: check reg_rule for NULL in handle_channel_custom()
Kai-Heng Feng <[email protected]>
HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override
Mansour Behabadi <[email protected]>
HID: apple: Add support for recent firmware on Magic Keyboards
Jean Delvare <[email protected]>
ACPI: watchdog: Allow disabling WDAT at boot
Ulf Hansson <[email protected]>
mmc: core: Allow host controllers to require R1B for CMD6
Ulf Hansson <[email protected]>
mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard
Ulf Hansson <[email protected]>
mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command
Ulf Hansson <[email protected]>
mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
Faiz Abbas <[email protected]>
mmc: host: Fix Kconfig warnings on keystone_defconfig
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures (i929)
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Add platform specific reset callback
Ulf Hansson <[email protected]>
mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()
Kim Phillips <[email protected]>
perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag
-------------
Diffstat:
Documentation/admin-guide/kernel-parameters.txt | 4 + Documentation/driver-api/device_link.rst | 63 +++-- Makefile | 4 +- arch/arm/kernel/vdso.c | 2 + arch/arm/lib/copy_from_user.S | 2 +- arch/x86/events/amd/uncore.c | 14 +- drivers/acpi/acpi_watchdog.c | 12 +- drivers/base/core.c | 293 +++++++++++++++------ drivers/base/dd.c | 2 +- drivers/base/power/runtime.c | 4 +- drivers/firmware/efi/runtime-wrappers.c | 2 +- drivers/hid/hid-apple.c | 3 +- drivers/hid/hid-google-hammer.c | 2 + drivers/hid/hid-ids.h | 1 + drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c | 8 + drivers/mmc/core/core.c | 5 +- drivers/mmc/core/mmc.c | 7 +- drivers/mmc/core/mmc_ops.c | 27 +- drivers/mmc/host/Kconfig | 2 + drivers/mmc/host/sdhci-omap.c | 151 ++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 +- drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_rx.c | 5 +- drivers/net/ethernet/micrel/ks8851_mll.c | 14 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 186 +++++++------ drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 3 +- .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 7 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 8 - drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 1 - drivers/net/ethernet/sfc/ptp.c | 38 ++- drivers/net/slip/slip.c | 3 + drivers/net/usb/qmi_wwan.c | 3 + drivers/net/wimax/i2400m/op-rfkill.c | 1 + drivers/scsi/libfc/fc_disc.c | 2 + fs/jbd2/transaction.c | 8 +- include/linux/device.h | 7 +- include/linux/mmc/host.h | 1 + kernel/signal.c | 23 +- mm/slub.c | 9 + net/ipv4/cipso_ipv4.c | 7 +- net/mac80211/rx.c | 2 +- net/qrtr/qrtr.c | 2 +- net/wireless/reg.c | 2 +- 45 files changed, 672 insertions(+), 273 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/48 perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag
From: Kim Phillips <[email protected]>
[ Upstream commit f967140dfb7442e2db0868b03b961f9c59418a1b ]
Enable the sampling check in kernel/events/core.c::perf_event_open(), which returns the more appropriate -EOPNOTSUPP.
BEFORE:
$ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (l3_request_g1.caching_l3_cache_accesses). /bin/dmesg | grep -i perf may provide additional information.
With nothing relevant in dmesg.
AFTER:
$ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true Error: l3_request_g1.caching_l3_cache_accesses: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'
--- arch/x86/events/amd/uncore.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/x86/events/amd/uncore.c +7 -7
@@ -193,20 +193,18 @@ static int amd_uncore_event_init(struct perf_event *event)/* * NB and Last level cache counters (MSRs) are shared across all cores -* that share the same NB / Last level cache. Interrupts can be directed -* to a single target core, however, event counts generated by processes -* running on other cores cannot be masked out. So we do not support -* sampling and per-thread events. +* that share the same NB / Last level cache. On family 16h and below, +* Interrupts can be directed to a single target core, however, event +* counts generated by processes running on other cores cannot be masked +* out. So we do not support sampling and per-thread events via +* CAP_NO_INTERRUPT, and we do not enable counter overflow interrupts: */ -if (is_sampling_event (event) || event->attach_state &PERF_ATTACH_TASK ) -return -EINVAL ;/* NB and Last level cache counters do not have usr/os/guest/host bits */ if (event->attr.exclude_user || event->attr.exclude_kernel || event->attr.exclude_host || event->attr.exclude_guest)return -EINVAL ; -/* and we do not enable counter overflow interrupts */ hwc->config = event->attr.config &AMD64_RAW_EVENT_MASK_NB ; hwc->idx =-1 ;
@@ -314,6 +312,7 @@ static struct pmu amd_nb_pmu = { .start = amd_uncore_start, .stop = amd_uncore_stop, .read = amd_uncore_read, + .capabilities = PERF_PMU_CAP_NO_INTERRUPT, };static struct pmu amd_llc_pmu = {
@@ -324,6 +323,7 @@ static struct pmu amd_llc_pmu = { .start = amd_uncore_start, .stop = amd_uncore_stop, .read = amd_uncore_read, + .capabilities = PERF_PMU_CAP_NO_INTERRUPT, };static struct amd_uncore *amd_uncore_alloc (unsigned int cpu)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 2/48 mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
[ Upstream commit 533a6cfe08f96a7b5c65e06d20916d552c11b256 ]
All callers of __mmc_switch() should now be specifying a valid timeout for the CMD6 command. However, just to be sure, let's print a warning and default to use the generic_cmd6_time in case the provided timeout_ms argument is zero.
In this context, let's also simplify some of the corresponding code and clarify some related comments.
--- drivers/mmc/core/mmc_ops.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-)
drivers/mmc/core/mmc_ops.c +11 -14
@@ -456,10 +456,6 @@ static int mmc_poll_for_busy(struct mmc_card *card, unsigned int timeout_ms,bool expired = false;bool busy = false; -/* We have an unspecified cmd timeout, use the fallback value. */ -if (!timeout_ms) - timeout_ms =MMC_OPS_TIMEOUT_MS ; -/* * In cases when not allowed to poll by using CMD13 or because we aren't * capable of polling by using ->card_busy(), then rely on waiting the
@@ -532,14 +528,19 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,mmc_retune_hold (host); +if (!timeout_ms) { +pr_warn ("%s: unspecified timeout for CMD6 - use generic\n" , +mmc_hostname (host)); + timeout_ms = card->ext_csd.generic_cmd6_time; + } +/* -* If the cmd timeout and the max_busy_timeout of the host are both -* specified, let's validate them. A failure means we need to prevent -* the host from doing hw busy detection, which is done by converting -* to a R1 response instead of a R1B. +* If the max_busy_timeout of the host is specified, make sure it's +* enough to fit the used timeout_ms. In case it's not, let's instruct +* the host to avoid HW busy detection, by converting to a R1 response +* instead of a R1B. */ -if (timeout_ms && host->max_busy_timeout && - (timeout_ms > host->max_busy_timeout)) +if (host->max_busy_timeout && (timeout_ms > host->max_busy_timeout)) use_r1b_resp = false; cmd.opcode =MMC_SWITCH ;
@@ -550,10 +551,6 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, cmd.flags =MMC_CMD_AC ;if (use_r1b_resp) { cmd.flags |=MMC_RSP_SPI_R1B |MMC_RSP_R1B ; -/* -* A busy_timeout of zero means the host can decide to use -* whatever value it finds suitable. -*/ cmd.busy_timeout = timeout_ms; }else { cmd.flags |=MMC_RSP_SPI_R1 |MMC_RSP_R1 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 3/48 mmc: sdhci-omap: Add platform specific reset callback
In reply to Greg Kroah-HartmanFrom: Faiz Abbas <[email protected]>
[ Upstream commit 5b0d62108b468b13410533c0ceea3821942bf592 ]
The TRM (SPRUIC2C - January 2017 - Revised May 2018 [1]) forbids assertion of data reset while tuning is happening. Implement a platform specific callback that takes care of this condition.
[1] http://www.ti.com/lit/pdf/spruic2 Section 25.5.1.2.4
--- drivers/mmc/host/sdhci-omap.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-omap.c +19 -1
@@ -115,6 +115,7 @@ struct sdhci_omap_host {struct pinctrl *pinctrl;struct pinctrl_state **pinctrl_state; +bool is_tuning; };static void sdhci_omap_start_clock (struct sdhci_omap_host *omap_host);
@@ -326,6 +327,8 @@ static int sdhci_omap_execute_tuning(struct mmc_host *mmc, u32 opcode) dcrc_was_enabled = true; } + omap_host->is_tuning = true; +while (phase_delay <=MAX_PHASE_DELAY ) {sdhci_omap_set_dll (omap_host, phase_delay);
@@ -363,9 +366,12 @@ static int sdhci_omap_execute_tuning(struct mmc_host *mmc, u32 opcode) phase_delay = max_window +4 * (max_len >>1 );sdhci_omap_set_dll (omap_host, phase_delay); + omap_host->is_tuning = false; + goto ret; tuning_error: + omap_host->is_tuning = false;dev_err (dev,"Tuning failed\n" );sdhci_omap_disable_tuning (omap_host);
@@ -695,6 +701,18 @@ static void sdhci_omap_set_uhs_signaling(struct sdhci_host *host,sdhci_omap_start_clock (omap_host); } +void sdhci_omap_reset (struct sdhci_host *host,u8 mask) +{ +struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host); +struct sdhci_omap_host *omap_host =sdhci_pltfm_priv (pltfm_host); + +/* Don't reset data lines during tuning operation */ +if (omap_host->is_tuning) + mask &= ~SDHCI_RESET_DATA ; + +sdhci_reset (host, mask); +} +static struct sdhci_ops sdhci_omap_ops = { .set_clock = sdhci_omap_set_clock, .set_power = sdhci_omap_set_power,
@@ -703,7 +721,7 @@ static struct sdhci_ops sdhci_omap_ops = { .get_min_clock = sdhci_omap_get_min_clock, .set_bus_width = sdhci_omap_set_bus_width, .platform_send_init_74_clocks = sdhci_omap_init_74_clocks, - .reset = sdhci_reset, + .reset = sdhci_omap_reset, .set_uhs_signaling = sdhci_omap_set_uhs_signaling, };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 4/48 mmc: sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures (i929)
In reply to Greg Kroah-HartmanFrom: Faiz Abbas <[email protected]>
[ Upstream commit 961de0a856e3a30c0238d1269c0b17f9b179b6c3 ]
Errata i929 in certain OMAP5/DRA7XX/AM57XX silicon revisions (SPRZ426D - November 2014 - Revised February 2018 [1]) mentions unexpected tuning pattern errors. A small failure band may be present in the tuning range which may be missed by the current algorithm. Furthermore, the failure bands vary with temperature leading to different optimum tuning values for different temperatures.
As suggested in the related Application Report (SPRACA9B - October 2017
- Revised July 2018 [2]), tuning should be done in two stages. In stage 1, assign the optimum ratio in the maximum pass window for the current temperature. In stage 2, if the chosen value is close to the small failure band, move away from it in the appropriate direction.
[1] http://www.ti.com/lit/pdf/sprz426
[2] http://www.ti.com/lit/pdf/SPRACA9
--- drivers/mmc/host/Kconfig | 2 + drivers/mmc/host/sdhci-omap.c | 90 ++++++++++++++++++++++++++++++++++- 2 files changed, 91 insertions(+), 1 deletion(-)
drivers/mmc/host/Kconfig +2 -0
@@ -935,6 +935,8 @@ config MMC_SDHCI_XENON config MMC_SDHCI_OMAP tristate "TI SDHCI Controller Support" depends on MMC_SDHCI_PLTFM && OF + select THERMAL + select TI_SOC_THERMAL help This selects the Secure Digital Host Controller Interface (SDHCI) support present in TI's DRA7 SOCs. The controller supports
drivers/mmc/host/sdhci-omap.c +89 -1
145 lines not on this page · raw message
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 5/48 mmc: host: Fix Kconfig warnings on keystone_defconfig
In reply to Greg Kroah-HartmanFrom: Faiz Abbas <[email protected]>
[ Upstream commit 287b1da6a458a30da2e5be745498d31092ebb001 ]
Commit 961de0a856e3 ("mmc: sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures (i929)") added a select on TI_SOC_THERMAL for the driver to get temperature for tuning.
However, this causes the following warning on keystone_defconfig because keystone does not support TI_SOC_THERMAL:
"WARNING: unmet direct dependencies detected for TI_SOC_THERMAL"
Fix this by changing the select to imply.
SDR104/HS200 tuning failures (i929)")
--- drivers/mmc/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -1
@@ -936,7 +936,7 @@ config MMC_SDHCI_OMAP tristate "TI SDHCI Controller Support" depends on MMC_SDHCI_PLTFM && OF select THERMAL - select TI_SOC_THERMAL + imply TI_SOC_THERMAL help This selects the Secure Digital Host Controller Interface (SDHCI) support present in TI's DRA7 SOCs. The controller supports
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 6/48 mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
[ Upstream commit 055e04830d4544c57f2a5192a26c9e25915c29c0 ]
It has turned out that the sdhci-omap controller requires the R1B response, for commands that has this response associated with them. So, converting from an R1B to an R1 response for a CMD6 for example, leads to problems with the HW busy detection support.
Fix this by informing the mmc core about the requirement, via setting the host cap, MMC_CAP_NEED_RSP_BUSY.
--- drivers/mmc/host/sdhci-omap.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/mmc/host/sdhci-omap.c +3 -0
@@ -1109,6 +1109,9 @@ static int sdhci_omap_probe(struct platform_device *pdev) host->mmc_host_ops.execute_tuning = sdhci_omap_execute_tuning; host->mmc_host_ops.enable_sdio_irq = sdhci_omap_enable_sdio_irq; +/* R1B responses is required to properly manage HW busy detection. */ + mmc->caps |=MMC_CAP_NEED_RSP_BUSY ; + ret =sdhci_setup_host (host);if (ret) goto err_put_sync;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 7/48 mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
[ Upstream commit 18d200460cd73636d4f20674085c39e32b4e0097 ]
The busy timeout for the CMD5 to put the eMMC into sleep state, is specific to the card. Potentially the timeout may exceed the host->max_busy_timeout. If that becomes the case, mmc_sleep() converts from using an R1B response to an R1 response, as to prevent the host from doing HW busy detection.
However, it has turned out that some hosts requires an R1B response no matter what, so let's respect that via checking MMC_CAP_NEED_RSP_BUSY. Note that, if the R1B gets enforced, the host becomes fully responsible of managing the needed busy timeout, in one way or the other.
--- drivers/mmc/core/mmc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/core/mmc.c +5 -2
@@ -1901,9 +1901,12 @@ static int mmc_sleep(struct mmc_host *host)* If the max_busy_timeout of the host is specified, validate it against * the sleep cmd timeout. A failure means we need to prevent the host * from doing hw busy detection, which is done by converting to a R1 -* response instead of a R1B. +* response instead of a R1B. Note, some hosts requires R1B, which also +* means they are on their own when it comes to deal with the busy +* timeout. */ -if (host->max_busy_timeout && (timeout_ms > host->max_busy_timeout)) { +if (!(host->caps &MMC_CAP_NEED_RSP_BUSY ) && host->max_busy_timeout && + (timeout_ms > host->max_busy_timeout)) { cmd.flags =MMC_RSP_R1 |MMC_CMD_AC ; }else { cmd.flags =MMC_RSP_R1B |MMC_CMD_AC ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 8/48 mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
[ Upstream commit 43cc64e5221cc6741252b64bc4531dd1eefb733d ]
The busy timeout that is computed for each erase/trim/discard operation, can become quite long and may thus exceed the host->max_busy_timeout. If that becomes the case, mmc_do_erase() converts from using an R1B response to an R1 response, as to prevent the host from doing HW busy detection.
However, it has turned out that some hosts requires an R1B response no matter what, so let's respect that via checking MMC_CAP_NEED_RSP_BUSY. Note that, if the R1B gets enforced, the host becomes fully responsible of managing the needed busy timeout, in one way or the other.
--- drivers/mmc/core/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mmc/core/core.c +4 -1
@@ -2043,8 +2043,11 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,* the erase operation does not exceed the max_busy_timeout, we should * use R1B response. Or we need to prevent the host from doing hw busy * detection, which is done by converting to a R1 response instead. +* Note, some hosts requires R1B, which also means they are on their own +* when it comes to deal with the busy timeout. */ -if (card->host->max_busy_timeout && +if (!(card->host->caps &MMC_CAP_NEED_RSP_BUSY ) && + card->host->max_busy_timeout && busy_timeout > card->host->max_busy_timeout) { cmd.flags =MMC_RSP_SPI_R1 |MMC_RSP_R1 |MMC_CMD_AC ; }else {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 9/48 mmc: core: Allow host controllers to require R1B for CMD6
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
[ Upstream commit 1292e3efb149ee21d8d33d725eeed4e6b1ade963 ]
It has turned out that some host controllers can't use R1B for CMD6 and other commands that have R1B associated with them. Therefore invent a new host cap, MMC_CAP_NEED_RSP_BUSY to let them specify this.
In __mmc_switch(), let's check the flag and use it to prevent R1B responses from being converted into R1. Note that, this also means that the host are on its own, when it comes to manage the busy timeout.
--- drivers/mmc/core/mmc_ops.c | 6 ++++-- include/linux/mmc/host.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/core/mmc_ops.c +4 -2
@@ -538,9 +538,11 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,* If the max_busy_timeout of the host is specified, make sure it's * enough to fit the used timeout_ms. In case it's not, let's instruct * the host to avoid HW busy detection, by converting to a R1 response -* instead of a R1B. +* instead of a R1B. Note, some hosts requires R1B, which also means +* they are on their own when it comes to deal with the busy timeout. */ -if (host->max_busy_timeout && (timeout_ms > host->max_busy_timeout)) +if (!(host->caps &MMC_CAP_NEED_RSP_BUSY ) && host->max_busy_timeout && + (timeout_ms > host->max_busy_timeout)) use_r1b_resp = false; cmd.opcode =MMC_SWITCH ;
include/linux/mmc/host.h +1 -0
@@ -332,6 +332,7 @@ struct mmc_host { MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 | \ MMC_CAP_UHS_DDR50)/* (1 << 21) is free for reuse */ +#define MMC_CAP_NEED_RSP_BUSY (1 << 22)/* Commands with R1B can't use R1. */ #define MMC_CAP_DRIVER_TYPE_A (1 << 23)/* Host supports Driver Type A */ #define MMC_CAP_DRIVER_TYPE_C (1 << 24)/* Host supports Driver Type C */ #define MMC_CAP_DRIVER_TYPE_D (1 << 25)/* Host supports Driver Type D */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 10/48 ACPI: watchdog: Allow disabling WDAT at boot
In reply to Greg Kroah-HartmanFrom: Jean Delvare <[email protected]>
[ Upstream commit 3f9e12e0df012c4a9a7fd7eb0d3ae69b459d6b2c ]
In case the WDAT interface is broken, give the user an option to ignore it to let a native driver bind to the watchdog device instead.
--- Documentation/admin-guide/kernel-parameters.txt | 4 ++++ drivers/acpi/acpi_watchdog.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-)
Documentation/admin-guide/kernel-parameters.txt +4 -0
@@ -136,6 +136,10 @@ dynamic table installation which will install SSDT tables to /sys/firmware/acpi/tables/dynamic. + acpi_no_watchdog [HW,ACPI,WDT] + Ignore the ACPI-based watchdog interface (WDAT) and let + a native driver control the watchdog device instead. + acpi_rsdp= [ACPI,EFI,KEXEC] Pass the RSDP address to the kernel, mostly used on machines running EFI runtime service to boot the
drivers/acpi/acpi_watchdog.c +11 -1
@@ -58,12 +58,14 @@ static bool acpi_watchdog_uses_rtc(const struct acpi_table_wdat *wdat) }#endif +static bool acpi_no_watchdog; +static const struct acpi_table_wdat *acpi_watchdog_get_wdat (void ) {const struct acpi_table_wdat *wdat =NULL ;acpi_status status; -if (acpi_disabled) +if (acpi_disabled || acpi_no_watchdog)return NULL ; status = acpi_get_table(ACPI_SIG_WDAT, 0,
@@ -91,6 +93,14 @@ bool acpi_has_watchdog(void) }EXPORT_SYMBOL_GPL (acpi_has_watchdog); +/* ACPI watchdog can be disabled on boot command line */ +static int __init disable_acpi_watchdog (char *str) +{ + acpi_no_watchdog = true; +return 1 ; +} +__setup ("acpi_no_watchdog" , disable_acpi_watchdog); +void __init acpi_watchdog_init (void ) {const struct acpi_wdat_entry *entries;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 11/48 HID: apple: Add support for recent firmware on Magic Keyboards
In reply to Greg Kroah-HartmanFrom: Mansour Behabadi <[email protected]>
[ Upstream commit e433be929e63265b7412478eb7ff271467aee2d7 ]
Magic Keyboards with more recent firmware (0x0100) report Fn key differently. Without this patch, Fn key may not behave as expected and may not be configurable via hid_apple fnmode module parameter.
--- drivers/hid/hid-apple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hid/hid-apple.c +2 -1
@@ -343,7 +343,8 @@ static int apple_input_mapping(struct hid_device *hdev, struct hid_input *hi, unsigned long **bit, int *max) {if (usage->hid == (HID_UP_CUSTOM |0x0003 ) || - usage->hid == (HID_UP_MSVENDOR |0x0003 )) { + usage->hid == (HID_UP_MSVENDOR |0x0003 ) || + usage->hid == (HID_UP_HPVENDOR2 |0x0003 )) {/* The fn key on Apple USB keyboards */ set_bit (EV_REP , hi->input->evbit);hid_map_usage_clear (hi, usage, bit, max,EV_KEY ,KEY_FN );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 12/48 HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override
In reply to Greg Kroah-HartmanFrom: Kai-Heng Feng <[email protected]>
[ Upstream commit be0aba826c4a6ba5929def1962a90d6127871969 ]
The Surfbook E11B uses the SIPODEV SP1064 touchpad, which does not supply descriptors, so it has to be added to the override list.
--- drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c +8 -0
@@ -341,6 +341,14 @@ static const struct dmi_system_id i2c_hid_dmi_desc_override_table[] = { }, .driver_data = (void *)&sipodev_desc }, + { + .ident = "Trekstor SURFBOOK E11B", + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"TREKSTOR" ), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "SURFBOOK E11B"), + }, + .driver_data = (void *)&sipodev_desc + }, { .ident ="Direkt-Tek DTLAPY116-2" , .matches = {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 13/48 cfg80211: check reg_rule for NULL in handle_channel_custom()
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit a7ee7d44b57c9ae174088e53a668852b7f4f452d ]
We may end up with a NULL reg_rule after the loop in handle_channel_custom() if the bandwidth didn't fit, check if this is the case and bail out if so.
--- net/wireless/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/reg.c +1 -1
@@ -2269,7 +2269,7 @@ static void handle_channel_custom(struct wiphy *wiphy,break ; } -if (IS_ERR (reg_rule)) { +if (IS_ERR_OR_NULL (reg_rule)) {pr_debug ("Disabling freq %d MHz as custom regd has no rule that fits it\n" , chan->center_freq);if (wiphy->regulatory_flags ®ULATORY_WIPHY_SELF_MANAGED ) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 14/48 scsi: libfc: free response frame from GPN_ID
In reply to Greg Kroah-HartmanFrom: Igor Druzhinin <[email protected]>
[ Upstream commit ff6993bb79b9f99bdac0b5378169052931b65432 ]
fc_disc_gpn_id_resp() should be the last function using it so free it here to avoid memory leak.
--- drivers/scsi/libfc/fc_disc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/scsi/libfc/fc_disc.c +2 -0
@@ -640,6 +640,8 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp, } out:kref_put (&rdata->kref, fc_rport_destroy); +if (!IS_ERR (fp)) +fc_frame_free (fp); }/**
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 15/48 net: usb: qmi_wwan: restore mtu min/max values after raw_ip switch
In reply to Greg Kroah-HartmanFrom: Daniele Palmas <[email protected]>
[ Upstream commit eae7172f8141eb98e64e6e81acc9e9d5b2add127 ]
usbnet creates network interfaces with min_mtu = 0 and max_mtu = ETH_MAX_MTU.
These values are not modified by qmi_wwan when the network interface is created initially, allowing, for example, to set mtu greater than 1500.
When a raw_ip switch is done (raw_ip set to 'Y', then set to 'N') the mtu values for the network interface are set through ether_setup, with min_mtu = ETH_MIN_MTU and max_mtu = ETH_DATA_LEN, not allowing anymore to set mtu greater than 1500 (error: mtu greater than device maximum).
The patch restores the original min/max mtu values set by usbnet after a raw_ip switch.
--- drivers/net/usb/qmi_wwan.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/usb/qmi_wwan.c +3 -0
@@ -274,6 +274,9 @@ static void qmi_wwan_netdev_setup(struct net_device *net)netdev_dbg (net,"mode: raw IP\n" ); }else if (!net->header_ops) {/* don't bother if already set */ ether_setup (net); +/* Restoring min/max mtu values set originally by usbnet */ + net->min_mtu =0 ; + net->max_mtu =ETH_MAX_MTU ;clear_bit (EVENT_NO_IP_ALIGN , &dev->flags);netdev_dbg (net,"mode: Ethernet\n" ); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 16/48 net: ks8851-ml: Fix IRQ handling and locking
In reply to Greg Kroah-HartmanFrom: Marek Vasut <[email protected]>
[ Upstream commit 44343418d0f2f623cb9da6f5000df793131cbe3b ]
The KS8851 requires that packet RX and TX are mutually exclusive. Currently, the driver hopes to achieve this by disabling interrupt from the card by writing the card registers and by disabling the interrupt on the interrupt controller. This however is racy on SMP.
Replace this approach by expanding the spinlock used around the ks_start_xmit() TX path to ks_irq() RX path to assure true mutual exclusion and remove the interrupt enabling/disabling, which is now not needed anymore. Furthermore, disable interrupts also in ks_net_stop(), which was missing before.
Note that a massive improvement here would be to re-use the KS8851 driver approach, which is to move the TX path into a worker thread, interrupt handling to threaded interrupt, and synchronize everything with mutexes, but that would be a much bigger rework, for a separate patch.
--- drivers/net/ethernet/micrel/ks8851_mll.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/net/ethernet/micrel/ks8851_mll.c +8 -6
@@ -832,14 +832,17 @@ static irqreturn_t ks_irq(int irq, void *pw) {struct net_device *netdev = pw;struct ks_net *ks =netdev_priv (netdev); +unsigned long flags;u16 status; +spin_lock_irqsave (&ks->statelock, flags);/*this should be the first in IRQ handler */ ks_save_cmd_reg (ks); status =ks_rdreg16 (ks,KS_ISR );if (unlikely (!status)) {ks_restore_cmd_reg (ks); +spin_unlock_irqrestore (&ks->statelock, flags);return IRQ_NONE ; }
@@ -865,6 +868,7 @@ static irqreturn_t ks_irq(int irq, void *pw) ks->netdev->stats.rx_over_errors++;/* this should be the last in IRQ handler*/ ks_restore_cmd_reg (ks); +spin_unlock_irqrestore (&ks->statelock, flags);return IRQ_HANDLED ; }
@@ -934,6 +938,7 @@ static int ks_net_stop(struct net_device *netdev)/* shutdown RX/TX QMU */ ks_disable_qmu (ks); +ks_disable_int (ks);/* set powermode to soft power down to save power */ ks_set_powermode (ks,PMECR_PM_SOFTDOWN );
@@ -990,10 +995,9 @@ static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev) {netdev_tx_t retv =NETDEV_TX_OK ;struct ks_net *ks =netdev_priv (netdev); +unsigned long flags; -disable_irq (netdev->irq); -ks_disable_int (ks); -spin_lock (&ks->statelock); +spin_lock_irqsave (&ks->statelock, flags);/* Extra space are required: * 4 byte for alignment, 4 for status/length, 4 for CRC
@@ -1007,9 +1011,7 @@ static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)dev_kfree_skb (skb); }else retv =NETDEV_TX_BUSY ; -spin_unlock (&ks->statelock); -ks_enable_int (ks); -enable_irq (netdev->irq); +spin_unlock_irqrestore (&ks->statelock, flags);return retv; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 17/48 mac80211: rx: avoid RCU list traversal under mutex
In reply to Greg Kroah-HartmanFrom: Madhuparna Bhowmik <[email protected]>
[ Upstream commit 253216ffb2a002a682c6f68bd3adff5b98b71de8 ]
local->sta_mtx is held in __ieee80211_check_fast_rx_iface(). No need to use list_for_each_entry_rcu() as it also requires a cond argument to avoid false lockdep warnings when not used in RCU read-side section (with CONFIG_PROVE_RCU_LIST). Therefore use list_for_each_entry();
--- net/mac80211/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/rx.c +1 -1
@@ -4042,7 +4042,7 @@ void __ieee80211_check_fast_rx_iface(struct ieee80211_sub_if_data *sdata)lockdep_assert_held (&local->sta_mtx); -list_for_each_entry_rcu (sta, &local->sta_list, list) { +list_for_each_entry (sta, &local->sta_list, list) {if (sdata != sta->sdata && (!sta->sdata->bss || sta->sdata->bss != sdata->bss))continue ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 18/48 signal: avoid double atomic counter increments for user accounting
In reply to Greg Kroah-HartmanFrom: Linus Torvalds <[email protected]>
[ Upstream commit fda31c50292a5062332fa0343c084bd9f46604d9 ]
When queueing a signal, we increment both the users count of pending signals (for RLIMIT_SIGPENDING tracking) and we increment the refcount of the user struct itself (because we keep a reference to the user in the signal structure in order to correctly account for it when freeing).
That turns out to be fairly expensive, because both of them are atomic updates, and particularly under extreme signal handling pressure on big machines, you can get a lot of cache contention on the user struct. That can then cause horrid cacheline ping-pong when you do these multiple accesses.
So change the reference counting to only pin the user for the _first_ pending signal, and to unpin it when the last pending signal is dequeued. That means that when a user sees a lot of concurrent signal queuing - which is the only situation when this matters - the only atomic access needed is generally the 'sigpending' count update.
This was noticed because of a particularly odd timing artifact on a dual-socket 96C/192T Cascade Lake platform: when you get into bad contention, on that machine for some reason seems to be much worse when the contention happens in the upper 32-byte half of the cacheline.
As a result, the kernel test robot will-it-scale 'signal1' benchmark had an odd performance regression simply due to random alignment of the 'struct user_struct' (and pointed to a completely unrelated and apparently nonsensical commit for the regression).
Avoiding the double increments (and decrements on the dequeueing side, of course) makes for much less contention and hugely improved performance on that will-it-scale microbenchmark.
Quoting Feng Tang:
"It makes a big difference, that the performance score is tripled! bump
from original 17000 to 54000. Also the gap between 5.0-rc6 and 5.0-rc6+Jiri's patch is reduced to around 2%"
[ The "2% gap" is the odd cacheline placement difference on that
platform: under the extreme contention case, the effect of which half of the cacheline was hot was 5%, so with the reduced contention the odd timing artifact is reduced too ]
It does help in the non-contended case too, but is not nearly as noticeable.
--- kernel/signal.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
kernel/signal.c +14 -9
@@ -407,27 +407,32 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi {struct sigqueue *q =NULL ;struct user_struct *user; +int sigpending;/* * Protect access to @t credentials. This can go away when all * callers hold rcu read lock. +* +* NOTE! A pending signal will hold on to the user refcount, +* and we get/put the refcount only when the sigpending count +* changes from/to zero. */ rcu_read_lock (); - user =get_uid (__task_cred (t)->user); -atomic_inc (&user->sigpending); + user =__task_cred (t)->user; + sigpending =atomic_inc_return (&user->sigpending); +if (sigpending ==1 ) +get_uid (user);rcu_read_unlock (); -if (override_rlimit || -atomic_read (&user->sigpending) <= -task_rlimit (t,RLIMIT_SIGPENDING )) { +if (override_rlimit ||likely (sigpending <=task_rlimit (t,RLIMIT_SIGPENDING ))) { q =kmem_cache_alloc (sigqueue_cachep, flags); }else {print_dropped_signal (sig); }if (unlikely (q ==NULL )) { -atomic_dec (&user->sigpending); -free_uid (user); +if (atomic_dec_and_test (&user->sigpending)) +free_uid (user); }else {INIT_LIST_HEAD (&q->list); q->flags =0 ;
@@ -441,8 +446,8 @@ static void __sigqueue_free(struct sigqueue *q) {if (q->flags &SIGQUEUE_PREALLOC )return ; -atomic_dec (&q->user->sigpending); -free_uid (q->user); +if (atomic_dec_and_test (&q->user->sigpending)) +free_uid (q->user);kmem_cache_free (sigqueue_cachep, q); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 19/48 slip: not call free_netdev before rtnl_unlock in slip_open
In reply to Greg Kroah-HartmanFrom: yangerkun <[email protected]>
[ Upstream commit f596c87005f7b1baeb7d62d9a9e25d68c3dfae10 ]
As the description before netdev_run_todo, we cannot call free_netdev before rtnl_unlock, fix it by reorder the code.
--- drivers/net/slip/slip.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/slip/slip.c +3 -0
@@ -863,7 +863,10 @@ static int slip_open(struct tty_struct *tty) tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags);sl_free_netdev (sl->dev); +/* do not call free_netdev before rtnl_unlock */ +rtnl_unlock ();free_netdev (sl->dev); +return err; err_exit:rtnl_unlock ();
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 20/48 hinic: fix a irq affinity bug
In reply to Greg Kroah-HartmanFrom: Luo bin <[email protected]>
[ Upstream commit 0bff777bd0cba73ad4cd0145696ad284d7e6a99f ]
can not use a local variable as an input parameter of irq_set_affinity_hint
--- drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_rx.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h +1 -0
@@ -103,6 +103,7 @@ struct hinic_rq {struct hinic_wq *wq; +struct cpumask affinity_mask;u32 irq;u16 msix_entry;
drivers/net/ethernet/huawei/hinic/hinic_rx.c +2 -3
@@ -414,7 +414,6 @@ static int rx_request_irq(struct hinic_rxq *rxq)struct hinic_hwdev *hwdev = nic_dev->hwdev;struct hinic_rq *rq = rxq->rq;struct hinic_qp *qp; -struct cpumask mask;int err;rx_add_napi (rxq);
@@ -431,8 +430,8 @@ static int rx_request_irq(struct hinic_rxq *rxq) } qp = container_of(rq, struct hinic_qp, rq); -cpumask_set_cpu (qp->q_id %num_online_cpus (), &mask); -return irq_set_affinity_hint (rq->irq, &mask); +cpumask_set_cpu (qp->q_id %num_online_cpus (), &rq->affinity_mask); +return irq_set_affinity_hint (rq->irq, &rq->affinity_mask); }static void rx_free_irq (struct hinic_rxq *rxq)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 21/48 hinic: fix a bug of setting hw_ioctxt
In reply to Greg Kroah-HartmanFrom: Luo bin <[email protected]>
[ Upstream commit d2ed69ce9ed3477e2a9527e6b89fe4689d99510e ]
a reserved field is used to signify prime physical function index in the latest firmware version, so we must assign a value to it correctly
--- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 +- drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c +1 -0
@@ -309,6 +309,7 @@ static int set_hw_ioctxt(struct hinic_hwdev *hwdev, unsigned int rq_depth, } hw_ioctxt.func_idx =HINIC_HWIF_FUNC_IDX (hwif); + hw_ioctxt.ppf_idx =HINIC_HWIF_PPF_IDX (hwif); hw_ioctxt.set_cmdq_depth =HW_IOCTXT_SET_CMDQ_DEPTH_DEFAULT ; hw_ioctxt.cmdq_depth =0 ;
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h +1 -1
@@ -104,8 +104,8 @@ struct hinic_cmd_hw_ioctxt {u8 rsvd2;u8 rsvd3; +u8 ppf_idx;u8 rsvd4; -u8 rsvd5;u16 rq_depth;u16 rx_buf_sz_idx;
drivers/net/ethernet/huawei/hinic/hinic_hw_if.h +1 -0
@@ -146,6 +146,7 @@#define HINIC_HWIF_FUNC_IDX (hwif) ((hwif)->attr.func_idx)#define HINIC_HWIF_PCI_INTF (hwif) ((hwif)->attr.pci_intf_idx)#define HINIC_HWIF_PF_IDX (hwif) ((hwif)->attr.pf_idx) +#define HINIC_HWIF_PPF_IDX (hwif) ((hwif)->attr.ppf_idx)#define HINIC_FUNC_TYPE (hwif) ((hwif)->attr.func_type)#define HINIC_IS_PF (hwif) (HINIC_FUNC_TYPE(hwif) == HINIC_PF)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 22/48 net: rmnet: fix NULL pointer dereference in rmnet_newlink()
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit 93b5cbfa9636d385126f211dca9efa7e3f683202 ]
rmnet registers IFLA_LINK interface as a lower interface. But, IFLA_LINK could be NULL.
In the current code, rmnet doesn't check IFLA_LINK. So, panic would occur.
Test commands:
modprobe rmnet
ip link add rmnet0 type rmnet mux_id 1
Splat looks like:
[ 36.826109][ T1115] general protection fault, probably for non-canonical address 0xdffffc0000000000I [ 36.838817][ T1115] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] [ 36.839908][ T1115] CPU: 1 PID: 1115 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 36.840569][ T1115] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 36.841408][ T1115] RIP: 0010:rmnet_newlink+0x54/0x510 [rmnet] [ 36.841986][ T1115] Code: 83 ec 18 48 c1 e9 03 80 3c 01 00 0f 85 d4 03 00 00 48 8b 6a 28 48 b8 00 00 00 00 00 c [ 36.843923][ T1115] RSP: 0018:ffff8880b7e0f1c0 EFLAGS: 00010247 [ 36.844756][ T1115] RAX: dffffc0000000000 RBX: ffff8880d14cca00 RCX: 1ffff11016fc1e99 [ 36.845859][ T1115] RDX: 0000000000000000 RSI: ffff8880c3d04000 RDI: 0000000000000004 [ 36.846961][ T1115] RBP: 0000000000000000 R08: ffff8880b7e0f8b0 R09: ffff8880b6ac2d90 [ 36.848020][ T1115] R10: ffffffffc0589a40 R11: ffffed1016d585b7 R12: ffffffff88ceaf80 [ 36.848788][ T1115] R13: ffff8880c3d04000 R14: ffff8880b7e0f8b0 R15: ffff8880c3d04000 [ 36.849546][ T1115] FS: 00007f50ab3360c0(0000) GS:ffff8880da000000(0000) knlGS:0000000000000000 [ 36.851784][ T1115] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 36.852422][ T1115] CR2: 000055871afe5ab0 CR3: 00000000ae246001 CR4: 00000000000606e0 [ 36.853181][ T1115] Call Trace: [ 36.853514][ T1115] __rtnl_newlink+0xbdb/0x1270 [ 36.853967][ T1115] ? lock_downgrade+0x6e0/0x6e0 [ 36.854420][ T1115] ? rtnl_link_unregister+0x220/0x220 [ 36.854936][ T1115] ? lock_acquire+0x164/0x3b0 [ 36.855376][ T1115] ? is_bpf_image_address+0xff/0x1d0 [ 36.855884][ T1115] ? rtnl_newlink+0x4c/0x90 [ 36.856304][ T1115] ? kernel_text_address+0x111/0x140 [ 36.856857][ T1115] ? __kernel_text_address+0xe/0x30 [ 36.857440][ T1115] ? unwind_get_return_address+0x5f/0xa0 [ 36.858063][ T1115] ? create_prof_cpu_mask+0x20/0x20 [ 36.858644][ T1115] ? arch_stack_walk+0x83/0xb0 [ 36.859171][ T1115] ? stack_trace_save+0x82/0xb0 [ 36.859710][ T1115] ? stack_trace_consume_entry+0x160/0x160 [ 36.860357][ T1115] ? deactivate_slab.isra.78+0x2c5/0x800 [ 36.860928][ T1115] ? kasan_unpoison_shadow+0x30/0x40 [ 36.861520][ T1115] ? kmem_cache_alloc_trace+0x135/0x350 [ 36.862125][ T1115] ? rtnl_newlink+0x4c/0x90 [ 36.864073][ T1115] rtnl_newlink+0x65/0x90
[ ... ]
--- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +5 -0
@@ -144,6 +144,11 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev,int err =0 ;u16 mux_id; +if (!tb[IFLA_LINK ]) { +NL_SET_ERR_MSG_MOD (extack,"link not specified" ); +return -EINVAL ; + } + real_dev =__dev_get_by_index (src_net,nla_get_u32 (tb[IFLA_LINK ]));if (!real_dev || !dev)return -ENODEV ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 23/48 net: rmnet: fix NULL pointer dereference in rmnet_changelink()
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit 1eb1f43a6e37282348a41e3d68f5e9a6a4359212 ]
In the rmnet_changelink(), it uses IFLA_LINK without checking NULL pointer.
tb[IFLA_LINK] could be NULL pointer.
So, NULL-ptr-deref could occur.
rmnet already has a lower interface (real_dev).
So, after this patch, rmnet_changelink() does not use IFLA_LINK anymore.
Test commands:
modprobe rmnet
ip link add dummy0 type dummy
ip link add rmnet0 link dummy0 type rmnet mux_id 1 ip link set rmnet0 type rmnet mux_id 2
Splat looks like:
[ 90.578726][ T1131] general protection fault, probably for non-canonical address 0xdffffc0000000000I [ 90.581121][ T1131] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] [ 90.582380][ T1131] CPU: 2 PID: 1131 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 90.584285][ T1131] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 90.587506][ T1131] RIP: 0010:rmnet_changelink+0x5a/0x8a0 [rmnet] [ 90.588546][ T1131] Code: 83 ec 20 48 c1 ea 03 80 3c 02 00 0f 85 6f 07 00 00 48 8b 5e 28 48 b8 00 00 00 00 00 0 [ 90.591447][ T1131] RSP: 0018:ffff8880ce78f1b8 EFLAGS: 00010247 [ 90.592329][ T1131] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffff8880ce78f8b0 [ 90.593253][ T1131] RDX: 0000000000000000 RSI: ffff8880ce78f4a0 RDI: 0000000000000004 [ 90.594058][ T1131] RBP: ffff8880cf543e00 R08: 0000000000000002 R09: 0000000000000002 [ 90.594859][ T1131] R10: ffffffffc0586a40 R11: 0000000000000000 R12: ffff8880ca47c000 [ 90.595690][ T1131] R13: ffff8880ca47c000 R14: ffff8880cf545000 R15: 0000000000000000 [ 90.596553][ T1131] FS: 00007f21f6c7e0c0(0000) GS:ffff8880da400000(0000) knlGS:0000000000000000 [ 90.597504][ T1131] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 90.599418][ T1131] CR2: 0000556e413db458 CR3: 00000000c917a002 CR4: 00000000000606e0 [ 90.600289][ T1131] Call Trace: [ 90.600631][ T1131] __rtnl_newlink+0x922/0x1270 [ 90.601194][ T1131] ? lock_downgrade+0x6e0/0x6e0 [ 90.601724][ T1131] ? rtnl_link_unregister+0x220/0x220 [ 90.602309][ T1131] ? lock_acquire+0x164/0x3b0 [ 90.602784][ T1131] ? is_bpf_image_address+0xff/0x1d0 [ 90.603331][ T1131] ? rtnl_newlink+0x4c/0x90 [ 90.603810][ T1131] ? kernel_text_address+0x111/0x140 [ 90.604419][ T1131] ? __kernel_text_address+0xe/0x30 [ 90.604981][ T1131] ? unwind_get_return_address+0x5f/0xa0 [ 90.605616][ T1131] ? create_prof_cpu_mask+0x20/0x20 [ 90.606304][ T1131] ? arch_stack_walk+0x83/0xb0 [ 90.606985][ T1131] ? stack_trace_save+0x82/0xb0 [ 90.607656][ T1131] ? stack_trace_consume_entry+0x160/0x160 [ 90.608503][ T1131] ? deactivate_slab.isra.78+0x2c5/0x800 [ 90.609336][ T1131] ? kasan_unpoison_shadow+0x30/0x40 [ 90.610096][ T1131] ? kmem_cache_alloc_trace+0x135/0x350 [ 90.610889][ T1131] ? rtnl_newlink+0x4c/0x90 [ 90.611512][ T1131] rtnl_newlink+0x65/0x90
[ ... ]
--- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +2 -4
@@ -309,10 +309,8 @@ static int rmnet_changelink(struct net_device *dev, struct nlattr *tb[],if (!dev)return -ENODEV ; - real_dev =__dev_get_by_index (dev_net (dev), -nla_get_u32 (tb[IFLA_LINK ])); - -if (!real_dev || !rmnet_is_real_dev_registered (real_dev)) + real_dev = priv->real_dev; +if (!rmnet_is_real_dev_registered (real_dev))return -ENODEV ; port =rmnet_get_port_rtnl (real_dev);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 24/48 net: rmnet: fix suspicious RCU usage
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit 102210f7664442d8c0ce332c006ea90626df745b ]
rmnet_get_port() internally calls rcu_dereference_rtnl(), which checks RTNL.
But rmnet_get_port() could be called by packet path. The packet path is not protected by RTNL.
So, the suspicious RCU usage problem occurs.
Test commands:
modprobe rmnet
ip netns add nst
ip link add veth0 type veth peer name veth1
ip link set veth1 netns nst
ip link add rmnet0 link veth0 type rmnet mux_id 1
ip netns exec nst ip link add rmnet1 link veth1 type rmnet mux_id 1 ip netns exec nst ip link set veth1 up
ip netns exec nst ip link set rmnet1 up
ip netns exec nst ip a a 192.168.100.2/24 dev rmnet1
ip link set veth0 up
ip link set rmnet0 up
ip a a 192.168.100.1/24 dev rmnet0
ping 192.168.100.2
Splat looks like:
[ 146.630958][ T1174] WARNING: suspicious RCU usage
[ 146.631735][ T1174] 5.6.0-rc1+ #447 Not tainted
[ 146.632387][ T1174] -----------------------------
[ 146.633151][ T1174] drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c:386 suspicious rcu_dereference_check() !
[ 146.634742][ T1174]
[ 146.634742][ T1174] other info that might help us debug this:
[ 146.634742][ T1174]
[ 146.645992][ T1174]
[ 146.645992][ T1174] rcu_scheduler_active = 2, debug_locks = 1
[ 146.646937][ T1174] 5 locks held by ping/1174:
[ 146.647609][ T1174] #0: ffff8880c31dea70 (sk_lock-AF_INET){+.+.}, at: raw_sendmsg+0xab8/0x2980
[ 146.662463][ T1174] #1: ffffffff93925660 (rcu_read_lock_bh){....}, at: ip_finish_output2+0x243/0x2150
[ 146.671696][ T1174] #2: ffffffff93925660 (rcu_read_lock_bh){....}, at: __dev_queue_xmit+0x213/0x2940
[ 146.673064][ T1174] #3: ffff8880c19ecd58 (&dev->qdisc_running_key#7){+...}, at: ip_finish_output2+0x714/0x2150
[ 146.690358][ T1174] #4: ffff8880c5796898 (&dev->qdisc_xmit_lock_key#3){+.-.}, at: sch_direct_xmit+0x1e2/0x1020
[ 146.699875][ T1174]
[ 146.699875][ T1174] stack backtrace:
[ 146.701091][ T1174] CPU: 0 PID: 1174 Comm: ping Not tainted 5.6.0-rc1+ #447
[ 146.705215][ T1174] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[ 146.706565][ T1174] Call Trace:
[ 146.707102][ T1174] dump_stack+0x96/0xdb
[ 146.708007][ T1174] rmnet_get_port.part.9+0x76/0x80 [rmnet]
[ 146.709233][ T1174] rmnet_egress_handler+0x107/0x420 [rmnet]
[ 146.710492][ T1174] ? sch_direct_xmit+0x1e2/0x1020
[ 146.716193][ T1174] rmnet_vnd_start_xmit+0x3d/0xa0 [rmnet]
[ 146.717012][ T1174] dev_hard_start_xmit+0x160/0x740
[ 146.717854][ T1174] sch_direct_xmit+0x265/0x1020
[ 146.718577][ T1174] ? register_lock_class+0x14d0/0x14d0
[ 146.719429][ T1174] ? dev_watchdog+0xac0/0xac0
[ 146.723738][ T1174] ? __dev_queue_xmit+0x15fd/0x2940
[ 146.724469][ T1174] ? lock_acquire+0x164/0x3b0
[ 146.725172][ T1174] __dev_queue_xmit+0x20c7/0x2940[ ... ]
--- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 13 ++++++------- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 2 +- .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-)
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +6 -7
@@ -391,11 +391,10 @@ struct rtnl_link_ops rmnet_link_ops __read_mostly = { .fill_info = rmnet_fill_info, }; -/* Needs either rcu_read_lock() or rtnl lock */ -struct rmnet_port *rmnet_get_port (struct net_device *real_dev) +struct rmnet_port *rmnet_get_port_rcu (struct net_device *real_dev) {if (rmnet_is_real_dev_registered (real_dev)) -return rcu_dereference_rtnl (real_dev->rx_handler_data); +return rcu_dereference_bh (real_dev->rx_handler_data);else return NULL ; }
@@ -421,7 +420,7 @@ int rmnet_add_bridge(struct net_device *rmnet_dev,struct rmnet_port *port, *slave_port;int err; - port =rmnet_get_port (real_dev); + port =rmnet_get_port_rtnl (real_dev);/* If there is more than one rmnet dev attached, its probably being * used for muxing. Skip the briding in that case
@@ -436,7 +435,7 @@ int rmnet_add_bridge(struct net_device *rmnet_dev,if (err)return -EBUSY ; - slave_port =rmnet_get_port (slave_dev); + slave_port =rmnet_get_port_rtnl (slave_dev); slave_port->rmnet_mode =RMNET_EPMODE_BRIDGE ; slave_port->bridge_ep = real_dev;
@@ -454,11 +453,11 @@ int rmnet_del_bridge(struct net_device *rmnet_dev,struct net_device *real_dev = priv->real_dev;struct rmnet_port *port, *slave_port; - port =rmnet_get_port (real_dev); + port =rmnet_get_port_rtnl (real_dev); port->rmnet_mode =RMNET_EPMODE_VND ; port->bridge_ep =NULL ; - slave_port =rmnet_get_port (slave_dev); + slave_port =rmnet_get_port_rtnl (slave_dev);rmnet_unregister_real_device (slave_dev, slave_port);netdev_dbg (slave_dev,"removed from rmnet as slave\n" );
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h +1 -1
@@ -74,7 +74,7 @@ struct rmnet_priv {struct rmnet_priv_stats stats; }; -struct rmnet_port *rmnet_get_port (struct net_device *real_dev); +struct rmnet_port *rmnet_get_port_rcu (struct net_device *real_dev);struct rmnet_endpoint *rmnet_get_endpoint (struct rmnet_port *port,u8 mux_id); int rmnet_add_bridge(struct net_device *rmnet_dev, struct net_device *slave_dev,
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c +2 -2
@@ -193,7 +193,7 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb)return RX_HANDLER_PASS ; dev = skb->dev; - port =rmnet_get_port (dev); + port =rmnet_get_port_rcu (dev);switch (port->rmnet_mode) {case RMNET_EPMODE_VND :
@@ -226,7 +226,7 @@ void rmnet_egress_handler(struct sk_buff *skb) skb->dev = priv->real_dev; mux_id = priv->mux_id; - port =rmnet_get_port (skb->dev); + port =rmnet_get_port_rcu (skb->dev);if (!port) goto drop;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 25/48 net: rmnet: remove rcu_read_lock in rmnet_force_unassociate_device()
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit c026d970102e9af9958edefb4a015702c6aab636 ]
The notifier_call() of the slave interface removes rmnet interface with unregister_netdevice_queue().
But, before calling unregister_netdevice_queue(), it acquires rcu readlock.
In the RCU critical section, sleeping isn't be allowed.
But, unregister_netdevice_queue() internally calls synchronize_net(), which would sleep.
So, suspicious RCU usage warning occurs.
Test commands:
modprobe rmnet
ip link add dummy0 type dummy
ip link add dummy1 type dummy
ip link add rmnet0 link dummy0 type rmnet mux_id 1 ip link set dummy1 master rmnet0
ip link del dummy0
Splat looks like:
[ 79.639245][ T1195] =============================
[ 79.640134][ T1195] WARNING: suspicious RCU usage
[ 79.640852][ T1195] 5.6.0-rc1+ #447 Not tainted
[ 79.641657][ T1195] -----------------------------
[ 79.642472][ T1195] ./include/linux/rcupdate.h:273 Illegal context switch in RCU read-side critical section!
[ 79.644043][ T1195]
[ 79.644043][ T1195] other info that might help us debug this:
[ 79.644043][ T1195]
[ 79.645682][ T1195]
[ 79.645682][ T1195] rcu_scheduler_active = 2, debug_locks = 1
[ 79.646980][ T1195] 2 locks held by ip/1195:
[ 79.647629][ T1195] #0: ffffffffa3cf64f0 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x457/0x890
[ 79.649312][ T1195] #1: ffffffffa39256c0 (rcu_read_lock){....}, at: rmnet_config_notify_cb+0xf0/0x590 [rmnet]
[ 79.651717][ T1195]
[ 79.651717][ T1195] stack backtrace:
[ 79.652650][ T1195] CPU: 3 PID: 1195 Comm: ip Not tainted 5.6.0-rc1+ #447
[ 79.653702][ T1195] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[ 79.655037][ T1195] Call Trace:
[ 79.655560][ T1195] dump_stack+0x96/0xdb
[ 79.656252][ T1195] ___might_sleep+0x345/0x440
[ 79.656994][ T1195] synchronize_net+0x18/0x30
[ 79.661132][ T1195] netdev_rx_handler_unregister+0x40/0xb0
[ 79.666266][ T1195] rmnet_unregister_real_device+0x42/0xb0 [rmnet]
[ 79.667211][ T1195] rmnet_config_notify_cb+0x1f7/0x590 [rmnet]
[ 79.668121][ T1195] ? rmnet_unregister_bridge.isra.6+0xf0/0xf0 [rmnet]
[ 79.669166][ T1195] ? rmnet_unregister_bridge.isra.6+0xf0/0xf0 [rmnet]
[ 79.670286][ T1195] ? __module_text_address+0x13/0x140
[ 79.671139][ T1195] notifier_call_chain+0x90/0x160
[ 79.671973][ T1195] rollback_registered_many+0x660/0xcf0
[ 79.672893][ T1195] ? netif_set_real_num_tx_queues+0x780/0x780
[ 79.675091][ T1195] ? __lock_acquire+0xdfe/0x3de0
[ 79.675825][ T1195] ? memset+0x1f/0x40
[ 79.676367][ T1195] ? __nla_validate_parse+0x98/0x1ab0
[ 79.677290][ T1195] unregister_netdevice_many.part.133+0x13/0x1b0
[ 79.678163][ T1195] rtnl_delete_link+0xbc/0x100[ ... ]
--- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +0 -2
@@ -239,7 +239,6 @@ static void rmnet_force_unassociate_device(struct net_device *dev) port =rmnet_get_port_rtnl (dev); -rcu_read_lock ();rmnet_unregister_bridge (dev, port);hash_for_each_safe (port->muxed_ep, bkt_ep, tmp_ep, ep, hlnode) {
@@ -250,7 +249,6 @@ static void rmnet_force_unassociate_device(struct net_device *dev)kfree (ep); } -rcu_read_unlock ();unregister_netdevice_many (&list);rmnet_unregister_real_device (real_dev, port);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 26/48 net: rmnet: do not allow to change mux id if mux id is duplicated
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit 1dc49e9d164cd7e11c81279c83db84a147e14740 ]
Basically, duplicate mux id isn't be allowed.
So, the creation of rmnet will be failed if there is duplicate mux id is existing.
But, changelink routine doesn't check duplicate mux id.
Test commands:
modprobe rmnet
ip link add dummy0 type dummy
ip link add rmnet0 link dummy0 type rmnet mux_id 1 ip link add rmnet1 link dummy0 type rmnet mux_id 2 ip link set rmnet1 type rmnet mux_id 1
--- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +4 -0
@@ -315,6 +315,10 @@ static int rmnet_changelink(struct net_device *dev, struct nlattr *tb[],if (data[IFLA_RMNET_MUX_ID ]) { mux_id =nla_get_u16 (data[IFLA_RMNET_MUX_ID ]); +if (rmnet_get_endpoint (port, mux_id)) { +NL_SET_ERR_MSG_MOD (extack,"MUX ID already exists" ); +return -EINVAL ; + } ep =rmnet_get_endpoint (port, priv->mux_id);if (!ep)return -ENODEV ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 27/48 net: rmnet: use upper/lower device infrastructure
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit 037f9cdf72fb8a7ff9ec2b5dd05336ec1492bdf1 ]
netdev_upper_dev_link() is useful to manage lower/upper interfaces. And this function internally validates looping, maximum depth. All or most virtual interfaces that could have a real interface (e.g. macsec, macvlan, ipvlan etc.) use lower/upper infrastructure.
Test commands:
modprobe rmnet
ip link add dummy0 type dummy
ip link add rmnet1 link dummy0 type rmnet mux_id 1 for i in {2..100}
do
let A=$i-1
ip link add rmnet$i link rmnet$A type rmnet mux_id $i
done
ip link del dummy0
The purpose of the test commands is to make stack overflow.
Splat looks like:
[ 52.411438][ T1395] BUG: KASAN: slab-out-of-bounds in find_busiest_group+0x27e/0x2c00 [ 52.413218][ T1395] Write of size 64 at addr ffff8880c774bde0 by task ip/1395 [ 52.414841][ T1395] [ 52.430720][ T1395] CPU: 1 PID: 1395 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 52.496511][ T1395] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 52.513597][ T1395] Call Trace: [ 52.546516][ T1395] [ 52.558773][ T1395] Allocated by task 3171537984: [ 52.588290][ T1395] BUG: unable to handle page fault for address: ffffffffb999e260 [ 52.589311][ T1395] #PF: supervisor read access in kernel mode [ 52.590529][ T1395] #PF: error_code(0x0000) - not-present page [ 52.591374][ T1395] PGD d6818067 P4D d6818067 PUD d6819063 PMD 0 [ 52.592288][ T1395] Thread overran stack, or stack corrupted [ 52.604980][ T1395] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 52.605856][ T1395] CPU: 1 PID: 1395 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 52.611764][ T1395] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 52.621520][ T1395] RIP: 0010:stack_depot_fetch+0x10/0x30 [ 52.622296][ T1395] Code: ff e9 f9 fe ff ff 48 89 df e8 9c 1d 91 ff e9 ca fe ff ff cc cc cc cc cc cc cc 89 f8 0 [ 52.627887][ T1395] RSP: 0018:ffff8880c774bb60 EFLAGS: 00010006 [ 52.628735][ T1395] RAX: 00000000001f8880 RBX: ffff8880c774d140 RCX: 0000000000000000 [ 52.631773][ T1395] RDX: 000000000000001d RSI: ffff8880c774bb68 RDI: 0000000000003ff0 [ 52.649584][ T1395] RBP: ffffea00031dd200 R08: ffffed101b43e403 R09: ffffed101b43e403 [ 52.674857][ T1395] R10: 0000000000000001 R11: ffffed101b43e402 R12: ffff8880d900e5c0 [ 52.678257][ T1395] R13: ffff8880c774c000 R14: 0000000000000000 R15: dffffc0000000000 [ 52.694541][ T1395] FS: 00007fe867f6e0c0(0000) GS:ffff8880da000000(0000) knlGS:0000000000000000 [ 52.764039][ T1395] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 52.815008][ T1395] CR2: ffffffffb999e260 CR3: 00000000c26aa005 CR4: 00000000000606e0 [ 52.862312][ T1395] Call Trace: [ 52.887133][ T1395] Modules linked in: dummy rmnet veth openvswitch nsh nf_conncount nf_nat nf_conntrack nf_dex [ 52.936749][ T1395] CR2: ffffffffb999e260 [ 52.965695][ T1395] ---[ end trace 7e32ca99482dbb31 ]--- [ 52.966556][ T1395] RIP: 0010:stack_depot_fetch+0x10/0x30 [ 52.971083][ T1395] Code: ff e9 f9 fe ff ff 48 89 df e8 9c 1d 91 ff e9 ca fe ff ff cc cc cc cc cc cc cc 89 f8 0 [ 53.003650][ T1395] RSP: 0018:ffff8880c774bb60 EFLAGS: 00010006 [ 53.043183][ T1395] RAX: 00000000001f8880 RBX: ffff8880c774d140 RCX: 0000000000000000 [ 53.076480][ T1395] RDX: 000000000000001d RSI: ffff8880c774bb68 RDI: 0000000000003ff0 [ 53.093858][ T1395] RBP: ffffea00031dd200 R08: ffffed101b43e403 R09: ffffed101b43e403 [ 53.112795][ T1395] R10: 0000000000000001 R11: ffffed101b43e402 R12: ffff8880d900e5c0 [ 53.139837][ T1395] R13: ffff8880c774c000 R14: 0000000000000000 R15: dffffc0000000000 [ 53.141500][ T1395] FS: 00007fe867f6e0c0(0000) GS:ffff8880da000000(0000) knlGS:0000000000000000 [ 53.143343][ T1395] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 53.152007][ T1395] CR2: ffffffffb999e260 CR3: 00000000c26aa005 CR4: 00000000000606e0 [ 53.156459][ T1395] Kernel panic - not syncing: Fatal exception [ 54.213570][ T1395] Shutting down cpus with NMI [ 54.354112][ T1395] Kernel Offset: 0x33000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0x) [ 54.355687][ T1395] Rebooting in 5 seconds..
--- .../ethernet/qualcomm/rmnet/rmnet_config.c | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-)
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +16 -19
@@ -70,9 +70,6 @@ static int rmnet_unregister_real_device(struct net_device *real_dev,kfree (port); -/* release reference on real_dev */ -dev_put (real_dev); -netdev_dbg (real_dev,"Removed from rmnet\n" );return 0 ; }
@@ -98,9 +95,6 @@ static int rmnet_register_real_device(struct net_device *real_dev)return -EBUSY ; } -/* hold on to real dev for MAP data */ -dev_hold (real_dev); -for (entry =0 ; entry <RMNET_MAX_LOGICAL_EP ; entry++)INIT_HLIST_HEAD (&port->muxed_ep[entry]);
@@ -171,6 +165,10 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev,if (err) goto err1; + err =netdev_upper_dev_link (real_dev, dev, extack); +if (err <0 ) + goto err2; + port->rmnet_mode = mode;hlist_add_head_rcu (&ep->hlnode, &port->muxed_ep[mux_id]);
@@ -187,6 +185,8 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev,return 0 ; +err2: +unregister_netdevice (dev); err1:rmnet_unregister_real_device (real_dev, port); err0:
@@ -218,33 +218,30 @@ static void rmnet_dellink(struct net_device *dev, struct list_head *head)rmnet_vnd_dellink (mux_id, port, ep);kfree (ep); } +netdev_upper_dev_unlink (real_dev, dev);rmnet_unregister_real_device (real_dev, port);unregister_netdevice_queue (dev, head); } -static void rmnet_force_unassociate_device (struct net_device *dev) +static void rmnet_force_unassociate_device (struct net_device *real_dev) { -struct net_device *real_dev = dev;struct hlist_node *tmp_ep;struct rmnet_endpoint *ep;struct rmnet_port *port;unsigned long bkt_ep;LIST_HEAD (list); -if (!rmnet_is_real_dev_registered (real_dev)) -return ; -ASSERT_RTNL (); - port =rmnet_get_port_rtnl (dev); + port =rmnet_get_port_rtnl (real_dev); -rmnet_unregister_bridge (dev, port); +rmnet_unregister_bridge (real_dev, port);hash_for_each_safe (port->muxed_ep, bkt_ep, tmp_ep, ep, hlnode) { +netdev_upper_dev_unlink (real_dev, ep->egress_dev);unregister_netdevice_queue (ep->egress_dev, &list);rmnet_vnd_dellink (ep->mux_id, port, ep); -hlist_del_init_rcu (&ep->hlnode);kfree (ep); }
@@ -257,15 +254,15 @@ static void rmnet_force_unassociate_device(struct net_device *dev)static int rmnet_config_notify_cb (struct notifier_block *nb,unsigned long event,void *data) { -struct net_device *dev =netdev_notifier_info_to_dev (data); +struct net_device *real_dev =netdev_notifier_info_to_dev (data); -if (!dev) +if (!rmnet_is_real_dev_registered (real_dev))return NOTIFY_DONE ;switch (event) {case NETDEV_UNREGISTER : -netdev_dbg (dev,"Kernel unregister\n" ); -rmnet_force_unassociate_device (dev); +netdev_dbg (real_dev,"Kernel unregister\n" ); +rmnet_force_unassociate_device (real_dev);break ;default :
@@ -486,8 +483,8 @@ static int __init rmnet_init(void) static void __exit rmnet_exit(void) { -unregister_netdevice_notifier (&rmnet_dev_notifier);rtnl_link_unregister (&rmnet_link_ops); +unregister_netdevice_notifier (&rmnet_dev_notifier); }module_init (rmnet_init)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 28/48 net: rmnet: fix bridge mode bugs
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit d939b6d30bea1a2322bc536b12be0a7c4c2bccd7 ]
In order to attach a bridge interface to the rmnet interface, "master" operation is used.
(e.g. ip link set dummy1 master rmnet0)
But, in the rmnet_add_bridge(), which is a callback of ->ndo_add_slave() doesn't register lower interface.
So, ->ndo_del_slave() doesn't work.
There are other problems too.
1. It couldn't detect circular upper/lower interface relationship.
2. It couldn't prevent stack overflow because of too deep depth of upper/lower interface
3. It doesn't check the number of lower interfaces.
4. Panics because of several reasons.
The root problem of these issues is actually the same. So, in this patch, these all problems will be fixed.
Test commands:
modprobe rmnet
ip link add dummy0 type dummy
ip link add rmnet0 link dummy0 type rmnet mux_id 1 ip link add dummy1 master rmnet0 type dummy ip link add dummy2 master rmnet0 type dummy ip link del rmnet0
ip link del dummy2
ip link del dummy1
Splat looks like:
[ 41.867595][ T1164] general protection fault, probably for non-canonical address 0xdffffc0000000101I [ 41.869993][ T1164] KASAN: null-ptr-deref in range [0x0000000000000808-0x000000000000080f] [ 41.872950][ T1164] CPU: 0 PID: 1164 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 41.873915][ T1164] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 41.875161][ T1164] RIP: 0010:rmnet_unregister_bridge.isra.6+0x71/0xf0 [rmnet] [ 41.876178][ T1164] Code: 48 89 ef 48 89 c6 5b 5d e9 fc fe ff ff e8 f7 f3 ff ff 48 8d b8 08 08 00 00 48 ba 00 7 [ 41.878925][ T1164] RSP: 0018:ffff8880c4d0f188 EFLAGS: 00010202 [ 41.879774][ T1164] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000101 [ 41.887689][ T1164] RDX: dffffc0000000000 RSI: ffffffffb8cf64f0 RDI: 0000000000000808 [ 41.888727][ T1164] RBP: ffff8880c40e4000 R08: ffffed101b3c0e3c R09: 0000000000000001 [ 41.889749][ T1164] R10: 0000000000000001 R11: ffffed101b3c0e3b R12: 1ffff110189a1e3c [ 41.890783][ T1164] R13: ffff8880c4d0f200 R14: ffffffffb8d56160 R15: ffff8880ccc2c000 [ 41.891794][ T1164] FS: 00007f4300edc0c0(0000) GS:ffff8880d9c00000(0000) knlGS:0000000000000000 [ 41.892953][ T1164] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 41.893800][ T1164] CR2: 00007f43003bc8c0 CR3: 00000000ca53e001 CR4: 00000000000606f0 [ 41.894824][ T1164] Call Trace: [ 41.895274][ T1164] ? rcu_is_watching+0x2c/0x80 [ 41.895895][ T1164] rmnet_config_notify_cb+0x1f7/0x590 [rmnet] [ 41.896687][ T1164] ? rmnet_unregister_bridge.isra.6+0xf0/0xf0 [rmnet] [ 41.897611][ T1164] ? rmnet_unregister_bridge.isra.6+0xf0/0xf0 [rmnet] [ 41.898508][ T1164] ? __module_text_address+0x13/0x140 [ 41.899162][ T1164] notifier_call_chain+0x90/0x160 [ 41.899814][ T1164] rollback_registered_many+0x660/0xcf0 [ 41.900544][ T1164] ? netif_set_real_num_tx_queues+0x780/0x780 [ 41.901316][ T1164] ? __lock_acquire+0xdfe/0x3de0 [ 41.901958][ T1164] ? memset+0x1f/0x40 [ 41.902468][ T1164] ? __nla_validate_parse+0x98/0x1ab0 [ 41.903166][ T1164] unregister_netdevice_many.part.133+0x13/0x1b0 [ 41.903988][ T1164] rtnl_delete_link+0xbc/0x100
[ ... ]
--- .../ethernet/qualcomm/rmnet/rmnet_config.c | 131 +++++++++--------- .../ethernet/qualcomm/rmnet/rmnet_config.h | 1 + .../net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 8 -- .../net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 1 - 4 files changed, 64 insertions(+), 77 deletions(-)
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +63 -68
@@ -22,25 +22,6 @@#include "rmnet_vnd.h" #include "rmnet_private.h" -/* Locking scheme - -* The shared resource which needs to be protected is realdev->rx_handler_data. -* For the writer path, this is using rtnl_lock(). The writer paths are -* rmnet_newlink(), rmnet_dellink() and rmnet_force_unassociate_device(). These -* paths are already called with rtnl_lock() acquired in. There is also an -* ASSERT_RTNL() to ensure that we are calling with rtnl acquired. For -* dereference here, we will need to use rtnl_dereference(). Dev list writing -* needs to happen with rtnl_lock() acquired for netdev_master_upper_dev_link(). -* For the reader path, the real_dev->rx_handler_data is called in the TX / RX -* path. We only need rcu_read_lock() for these scenarios. In these cases, -* the rcu_read_lock() is held in __dev_queue_xmit() and -* netif_receive_skb_internal(), so readers need to use rcu_dereference_rtnl() -* to get the relevant information. For dev list reading, we again acquire -* rcu_read_lock() in rmnet_dellink() for netdev_master_upper_dev_get_rcu(). -* We also use unregister_netdevice_many() to free all rmnet devices in -* rmnet_force_unassociate_device() so we dont lose the rtnl_lock() and free in -* same context. -*/ -/* Local Definitions and Declarations */ static const struct nla_policy rmnet_policy[IFLA_RMNET_MAX +1 ] = {
@@ -60,9 +41,10 @@ rmnet_get_port_rtnl(const struct net_device *real_dev)return rtnl_dereference (real_dev->rx_handler_data); } -static int rmnet_unregister_real_device (struct net_device *real_dev, -struct rmnet_port *port) +static int rmnet_unregister_real_device (struct net_device *real_dev) { +struct rmnet_port *port =rmnet_get_port_rtnl (real_dev); +if (port->nr_rmnet_devs)return -EINVAL ;
@@ -102,28 +84,33 @@ static int rmnet_register_real_device(struct net_device *real_dev)return 0 ; } -static void rmnet_unregister_bridge (struct net_device *dev, -struct rmnet_port *port) +static void rmnet_unregister_bridge (struct rmnet_port *port) { -struct rmnet_port *bridge_port; -struct net_device *bridge_dev; +struct net_device *bridge_dev, *real_dev, *rmnet_dev; +struct rmnet_port *real_port;if (port->rmnet_mode !=RMNET_EPMODE_BRIDGE )return ; -/* bridge slave handling */ + rmnet_dev = port->rmnet_dev;if (!port->nr_rmnet_devs) { - bridge_dev = port->bridge_ep; +/* bridge device */ + real_dev = port->bridge_ep; + bridge_dev = port->dev; - bridge_port =rmnet_get_port_rtnl (bridge_dev); - bridge_port->bridge_ep =NULL ; - bridge_port->rmnet_mode =RMNET_EPMODE_VND ; + real_port =rmnet_get_port_rtnl (real_dev); + real_port->bridge_ep =NULL ; + real_port->rmnet_mode =RMNET_EPMODE_VND ; }else { +/* real device */ bridge_dev = port->bridge_ep; - bridge_port =rmnet_get_port_rtnl (bridge_dev); -rmnet_unregister_real_device (bridge_dev, bridge_port); + port->bridge_ep =NULL ; + port->rmnet_mode =RMNET_EPMODE_VND ; } + +netdev_upper_dev_unlink (bridge_dev, rmnet_dev); +rmnet_unregister_real_device (bridge_dev); } static int rmnet_newlink(struct net *src_net, struct net_device *dev,
@@ -170,6 +157,7 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev, goto err2; port->rmnet_mode = mode; + port->rmnet_dev = dev;hlist_add_head_rcu (&ep->hlnode, &port->muxed_ep[mux_id]);
@@ -187,8 +175,9 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev, err2:unregister_netdevice (dev); +rmnet_vnd_dellink (mux_id, port, ep); err1: -rmnet_unregister_real_device (real_dev, port); +rmnet_unregister_real_device (real_dev); err0:kfree (ep);return err;
@@ -197,30 +186,32 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev,static void rmnet_dellink (struct net_device *dev,struct list_head *head) {struct rmnet_priv *priv =netdev_priv (dev); -struct net_device *real_dev; +struct net_device *real_dev, *bridge_dev; +struct rmnet_port *real_port, *bridge_port;struct rmnet_endpoint *ep; -struct rmnet_port *port; -u8 mux_id; +u8 mux_id = priv->mux_id; real_dev = priv->real_dev; -if (!real_dev || !rmnet_is_real_dev_registered (real_dev)) +if (!rmnet_is_real_dev_registered (real_dev))return ; - port =rmnet_get_port_rtnl (real_dev); - - mux_id =rmnet_vnd_get_mux (dev); + real_port =rmnet_get_port_rtnl (real_dev); + bridge_dev = real_port->bridge_ep; +if (bridge_dev) { + bridge_port =rmnet_get_port_rtnl (bridge_dev); +rmnet_unregister_bridge (bridge_port); + } - ep =rmnet_get_endpoint (port, mux_id); + ep =rmnet_get_endpoint (real_port, mux_id);if (ep) {hlist_del_init_rcu (&ep->hlnode); -rmnet_unregister_bridge (dev, port); -rmnet_vnd_dellink (mux_id, port, ep); +rmnet_vnd_dellink (mux_id, real_port, ep);kfree (ep); } -netdev_upper_dev_unlink (real_dev, dev); -rmnet_unregister_real_device (real_dev, port); +netdev_upper_dev_unlink (real_dev, dev); +rmnet_unregister_real_device (real_dev);unregister_netdevice_queue (dev, head); }
@@ -232,23 +223,23 @@ static void rmnet_force_unassociate_device(struct net_device *real_dev)unsigned long bkt_ep;LIST_HEAD (list); -ASSERT_RTNL (); - port =rmnet_get_port_rtnl (real_dev); -rmnet_unregister_bridge (real_dev, port); - -hash_for_each_safe (port->muxed_ep, bkt_ep, tmp_ep, ep, hlnode) { -netdev_upper_dev_unlink (real_dev, ep->egress_dev); -unregister_netdevice_queue (ep->egress_dev, &list); -rmnet_vnd_dellink (ep->mux_id, port, ep); -hlist_del_init_rcu (&ep->hlnode); -kfree (ep); +if (port->nr_rmnet_devs) { +/* real device */ +rmnet_unregister_bridge (port); +hash_for_each_safe (port->muxed_ep, bkt_ep, tmp_ep, ep, hlnode) { +unregister_netdevice_queue (ep->egress_dev, &list); +netdev_upper_dev_unlink (real_dev, ep->egress_dev); +rmnet_vnd_dellink (ep->mux_id, port, ep); +hlist_del_init_rcu (&ep->hlnode); +kfree (ep); + } +rmnet_unregister_real_device (real_dev); +unregister_netdevice_many (&list); + }else { +rmnet_unregister_bridge (port); } - -unregister_netdevice_many (&list); - -rmnet_unregister_real_device (real_dev, port); } static int rmnet_config_notify_cb(struct notifier_block *nb,
@@ -427,6 +418,9 @@ int rmnet_add_bridge(struct net_device *rmnet_dev,if (port->nr_rmnet_devs >1 )return -EINVAL ; +if (port->rmnet_mode !=RMNET_EPMODE_VND ) +return -EINVAL ; +if (rmnet_is_real_dev_registered (slave_dev))return -EBUSY ;
@@ -434,9 +428,17 @@ int rmnet_add_bridge(struct net_device *rmnet_dev,if (err)return -EBUSY ; + err =netdev_master_upper_dev_link (slave_dev, rmnet_dev,NULL ,NULL , + extack); +if (err) { +rmnet_unregister_real_device (slave_dev); +return err; + } + slave_port =rmnet_get_port_rtnl (slave_dev); slave_port->rmnet_mode =RMNET_EPMODE_BRIDGE ; slave_port->bridge_ep = real_dev; + slave_port->rmnet_dev = rmnet_dev; port->rmnet_mode =RMNET_EPMODE_BRIDGE ; port->bridge_ep = slave_dev;
@@ -448,16 +450,9 @@ int rmnet_add_bridge(struct net_device *rmnet_dev,int rmnet_del_bridge (struct net_device *rmnet_dev,struct net_device *slave_dev) { -struct rmnet_priv *priv =netdev_priv (rmnet_dev); -struct net_device *real_dev = priv->real_dev; -struct rmnet_port *port, *slave_port; - - port =rmnet_get_port_rtnl (real_dev); - port->rmnet_mode =RMNET_EPMODE_VND ; - port->bridge_ep =NULL ; +struct rmnet_port *port =rmnet_get_port_rtnl (slave_dev); - slave_port =rmnet_get_port_rtnl (slave_dev); -rmnet_unregister_real_device (slave_dev, slave_port); +rmnet_unregister_bridge (port);netdev_dbg (slave_dev,"removed from rmnet as slave\n" );return 0 ;
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h +1 -0
@@ -37,6 +37,7 @@ struct rmnet_port {u8 rmnet_mode;struct hlist_head muxed_ep[RMNET_MAX_LOGICAL_EP ];struct net_device *bridge_ep; +struct net_device *rmnet_dev; };extern struct rtnl_link_ops rmnet_link_ops;
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +0 -8
@@ -276,14 +276,6 @@ int rmnet_vnd_dellink(u8 id, struct rmnet_port *port,return 0 ; } -u8 rmnet_vnd_get_mux (struct net_device *rmnet_dev) -{ -struct rmnet_priv *priv; - - priv =netdev_priv (rmnet_dev); -return priv->mux_id; -} -int rmnet_vnd_do_flow_control (struct net_device *rmnet_dev,int enable) {netdev_dbg (rmnet_dev,"Setting VND TX queue state to %d\n" , enable);
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h +0 -1
@@ -25,6 +25,5 @@ int rmnet_vnd_dellink(u8 id, struct rmnet_port *port, struct rmnet_endpoint *ep);void rmnet_vnd_rx_fixup (struct sk_buff *skb,struct net_device *dev);void rmnet_vnd_tx_fixup (struct sk_buff *skb,struct net_device *dev); -u8 rmnet_vnd_get_mux (struct net_device *rmnet_dev);void rmnet_vnd_setup (struct net_device *dev);#endif /* _RMNET_VND_H_ */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 29/48 net: rmnet: fix packet forwarding in rmnet bridge mode
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit ad3cc31b599ea80f06b29ebdc18b3a39878a48d6 ]
Packet forwarding is not working in rmnet bridge mode. Because when a packet is forwarded, skb_push() for an ethernet header is needed. But it doesn't call skb_push().
So, the ethernet header will be lost.
Test commands:
modprobe rmnet
ip netns add nst
ip netns add nst2
ip link add veth0 type veth peer name veth1
ip link add veth2 type veth peer name veth3
ip link set veth1 netns nst
ip link set veth3 netns nst2
ip link add rmnet0 link veth0 type rmnet mux_id 1 ip link set veth2 master rmnet0
ip link set veth0 up
ip link set veth2 up
ip link set rmnet0 up
ip a a 192.168.100.1/24 dev rmnet0
ip netns exec nst ip link set veth1 up
ip netns exec nst ip a a 192.168.100.2/24 dev veth1 ip netns exec nst2 ip link set veth3 up
ip netns exec nst2 ip a a 192.168.100.3/24 dev veth3 ip netns exec nst2 ping 192.168.100.2
--- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c +3 -0
@@ -168,6 +168,9 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,static void rmnet_bridge_handler (struct sk_buff *skb,struct net_device *bridge_dev) { +if (skb_mac_header_was_set (skb)) +skb_push (skb, skb->mac_len); +if (bridge_dev) { skb->dev = bridge_dev;dev_queue_xmit (skb);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 30/48 sfc: fix timestamp reconstruction at 16-bit rollover points
In reply to Greg Kroah-HartmanFrom: Alex Maftei (amaftei) <[email protected]>
[ Upstream commit 23797b98909f34b75fd130369bde86f760db69d0 ]
We can't just use the top bits of the last sync event as they could be off-by-one every 65,536 seconds, giving an error in reconstruction of 65,536 seconds.
This patch uses the difference in the bottom 16 bits (mod 2^16) to calculate an offset that needs to be applied to the last sync event to get to the current time.
--- drivers/net/ethernet/sfc/ptp.c | 38 +++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)
drivers/net/ethernet/sfc/ptp.c +35 -3
@@ -563,13 +563,45 @@ efx_ptp_mac_nic_to_ktime_correction(struct efx_nic *efx, u32 nic_major, u32 nic_minor, s32 correction) { + u32 sync_timestamp;ktime_t kt = {0 }; +s16 delta;if (!(nic_major &0x80000000 )) {WARN_ON_ONCE (nic_major >>16 ); -/* Use the top bits from the latest sync event. */ - nic_major &=0xffff ; - nic_major |= (last_sync_timestamp_major (efx) &0xffff0000 ); + +/* Medford provides 48 bits of timestamp, so we must get the top +* 16 bits from the timesync event state. +* +* We only have the lower 16 bits of the time now, but we do +* have a full resolution timestamp at some point in past. As +* long as the difference between the (real) now and the sync +* is less than 2^15, then we can reconstruct the difference +* between those two numbers using only the lower 16 bits of +* each. +* +* Put another way +* +* a - b = ((a mod k) - b) mod k +* +* when -k/2 < (a-b) < k/2. In our case k is 2^16. We know +* (a mod k) and b, so can calculate the delta, a - b. +* +*/ + sync_timestamp =last_sync_timestamp_major (efx); + +/* Because delta is s16 this does an implicit mask down to +* 16 bits which is what we need, assuming +* MEDFORD_TX_SECS_EVENT_BITS is 16. delta is signed so that +* we can deal with the (unlikely) case of sync timestamps +* arriving from the future. +*/ + delta = nic_major - sync_timestamp; + +/* Recover the fully specified time now, by applying the offset +* to the (fully specified) sync time. +*/ + nic_major = sync_timestamp + delta; kt = ptp->nic_to_kernel_time (nic_major, nic_minor, correction);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 31/48 jbd2: fix data races at struct journal_head
In reply to Greg Kroah-HartmanFrom: Qian Cai <[email protected]>
[ Upstream commit 6c5d911249290f41f7b50b43344a7520605b1acb ]
journal_head::b_transaction and journal_head::b_next_transaction could be accessed concurrently as noticed by KCSAN,
LTP: starting fsync04
/dev/zero: Can't open blockdev
EXT4-fs (loop0): mounting ext3 file system using the ext4 subsystem EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null)
==================================================================
BUG: KCSAN: data-race in __jbd2_journal_refile_buffer [jbd2] / jbd2_write_access_granted [jbd2]
write to 0xffff99f9b1bd0e30 of 8 bytes by task 25721 on cpu 70:
__jbd2_journal_refile_buffer+0xdd/0x210 [jbd2] __jbd2_journal_refile_buffer at fs/jbd2/transaction.c:2569 jbd2_journal_commit_transaction+0x2d15/0x3f20 [jbd2] (inlined by) jbd2_journal_commit_transaction at fs/jbd2/commit.c:1034 kjournald2+0x13b/0x450 [jbd2] kthread+0x1cd/0x1f0 ret_from_fork+0x27/0x50
read to 0xffff99f9b1bd0e30 of 8 bytes by task 25724 on cpu 68:
jbd2_write_access_granted+0x1b2/0x250 [jbd2] jbd2_write_access_granted at fs/jbd2/transaction.c:1155 jbd2_journal_get_write_access+0x2c/0x60 [jbd2] __ext4_journal_get_write_access+0x50/0x90 [ext4] ext4_mb_mark_diskspace_used+0x158/0x620 [ext4] ext4_mb_new_blocks+0x54f/0xca0 [ext4] ext4_ind_map_blocks+0xc79/0x1b40 [ext4] ext4_map_blocks+0x3b4/0x950 [ext4] _ext4_get_block+0xfc/0x270 [ext4] ext4_get_block+0x3b/0x50 [ext4] __block_write_begin_int+0x22e/0xae0 __block_write_begin+0x39/0x50 ext4_write_begin+0x388/0xb50 [ext4] generic_perform_write+0x15d/0x290 ext4_buffered_write_iter+0x11f/0x210 [ext4] ext4_file_write_iter+0xce/0x9e0 [ext4] new_sync_write+0x29c/0x3b0 __vfs_write+0x92/0xa0 vfs_write+0x103/0x260 ksys_write+0x9d/0x130 __x64_sys_write+0x4c/0x60 do_syscall_64+0x91/0xb05 entry_SYSCALL_64_after_hwframe+0x49/0xbe
5 locks held by fsync04/25724:
#0: ffff99f9911093f8 (sb_writers#13){.+.+}, at: vfs_write+0x21c/0x260
#1: ffff99f9db4c0348 (&sb->s_type->i_mutex_key#15){+.+.}, at: ext4_buffered_write_iter+0x65/0x210 [ext4] #2: ffff99f5e7dfcf58 (jbd2_handle){++++}, at: start_this_handle+0x1c1/0x9d0 [jbd2]
#3: ffff99f9db4c0168 (&ei->i_data_sem){++++}, at: ext4_map_blocks+0x176/0x950 [ext4] #4: ffffffff99086b40 (rcu_read_lock){....}, at: jbd2_write_access_granted+0x4e/0x250 [jbd2]
irq event stamp: 1407125 hardirqs last enabled at (1407125): [<ffffffff980da9b7>] __find_get_block+0x107/0x790 hardirqs last disabled at (1407124): [<ffffffff980da8f9>] __find_get_block+0x49/0x790 softirqs last enabled at (1405528): [<ffffffff98a0034c>] __do_softirq+0x34c/0x57c softirqs last disabled at (1405521): [<ffffffff97cc67a2>] irq_exit+0xa2/0xc0
Reported by Kernel Concurrency Sanitizer on:
CPU: 68 PID: 25724 Comm: fsync04 Tainted: G L 5.6.0-rc2-next-20200221+ #7 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019
The plain reads are outside of jh->b_state_lock critical section which result in data races. Fix them by adding pairs of READ|WRITE_ONCE().
--- fs/jbd2/transaction.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
fs/jbd2/transaction.c +4 -4
@@ -1045,8 +1045,8 @@ static bool jbd2_write_access_granted(handle_t *handle, struct buffer_head *bh,/* For undo access buffer must have data copied */ if (undo && !jh->b_committed_data) goto out; -if (jh->b_transaction != handle->h_transaction && - jh->b_next_transaction != handle->h_transaction) +if (READ_ONCE (jh->b_transaction) != handle->h_transaction && +READ_ONCE (jh->b_next_transaction) != handle->h_transaction) goto out;/* * There are two reasons for the barrier here:
@@ -2467,8 +2467,8 @@ void __jbd2_journal_refile_buffer(struct journal_head *jh)* our jh reference and thus __jbd2_journal_file_buffer() must not * take a new one. */ - jh->b_transaction = jh->b_next_transaction; - jh->b_next_transaction =NULL ; +WRITE_ONCE (jh->b_transaction, jh->b_next_transaction); +WRITE_ONCE (jh->b_next_transaction,NULL );if (buffer_freed (bh)) jlist = BJ_Forget;else if (jh->b_modified)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 32/48 wimax: i2400: fix memory leak
In reply to Greg Kroah-HartmanFrom: Navid Emamdoost <[email protected]>
[ Upstream commit 2507e6ab7a9a440773be476141a255934468c5ef ]
In i2400m_op_rfkill_sw_toggle cmd buffer should be released along with skb response.
--- drivers/net/wimax/i2400m/op-rfkill.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wimax/i2400m/op-rfkill.c +1 -0
@@ -142,6 +142,7 @@ int i2400m_op_rfkill_sw_toggle(struct wimax_dev *wimax_dev, "%d\n", result); result =0 ; error_cmd: +kfree (cmd);kfree_skb (ack_skb); error_msg_to_dev: error_alloc:
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 33/48 wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle
In reply to Greg Kroah-HartmanFrom: Navid Emamdoost <[email protected]>
[ Upstream commit 6f3ef5c25cc762687a7341c18cbea5af54461407 ]
In the implementation of i2400m_op_rfkill_sw_toggle() the allocated buffer for cmd should be released before returning. The documentation for i2400m_msg_to_dev() says when it returns the buffer can be reused. Meaning cmd should be released in either case. Move kfree(cmd) before return to be reached by all execution paths.
--- drivers/net/wimax/i2400m/op-rfkill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wimax/i2400m/op-rfkill.c +1 -1
@@ -142,12 +142,12 @@ int i2400m_op_rfkill_sw_toggle(struct wimax_dev *wimax_dev, "%d\n", result); result =0 ; error_cmd: -kfree (cmd);kfree_skb (ack_skb); error_msg_to_dev: error_alloc:d_fnend (4 , dev,"(wimax_dev %p state %d) = %d\n" , wimax_dev, state, result); +kfree (cmd);return result; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 34/48 mmc: sdhci-omap: Dont finish_mrq() on a command error during tuning
In reply to Greg Kroah-HartmanFrom: Faiz Abbas <[email protected]>
[ Upstream commit 5c41ea6d52003b5bc77c2a82fd5ca7d480237d89 ]
commit 5b0d62108b46 ("mmc: sdhci-omap: Add platform specific reset callback") skips data resets during tuning operation. Because of this, a data error or data finish interrupt might still arrive after a command error has been handled and the mrq ended. This ends up with a "mmc0: Got data interrupt 0x00000002 even though no data operation was in progress" error message.
Fix this by adding a platform specific callback for sdhci_irq. Mark the mrq as a failure but wait for a data interrupt instead of calling finish_mrq().
callback")
--- drivers/mmc/host/sdhci-omap.c | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
drivers/mmc/host/sdhci-omap.c +38 -0
@@ -801,6 +801,43 @@ void sdhci_omap_reset(struct sdhci_host *host, u8 mask)sdhci_reset (host, mask); } +#define CMD_ERR_MASK (SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX |\ + SDHCI_INT_TIMEOUT) +#define CMD_MASK (CMD_ERR_MASK | SDHCI_INT_RESPONSE) + +static u32 sdhci_omap_irq (struct sdhci_host *host,u32 intmask) +{ +struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host); +struct sdhci_omap_host *omap_host =sdhci_pltfm_priv (pltfm_host); + +if (omap_host->is_tuning && host->cmd && !host->data_early && + (intmask &CMD_ERR_MASK )) { + +/* +* Since we are not resetting data lines during tuning +* operation, data error or data complete interrupts +* might still arrive. Mark this request as a failure +* but still wait for the data interrupt +*/ +if (intmask &SDHCI_INT_TIMEOUT ) + host->cmd->error = -ETIMEDOUT ; +else + host->cmd->error = -EILSEQ ; + + host->cmd =NULL ; + +/* +* Sometimes command error interrupts and command complete +* interrupt will arrive together. Clear all command related +* interrupts here. +*/ +sdhci_writel (host, intmask &CMD_MASK ,SDHCI_INT_STATUS ); + intmask &= ~CMD_MASK ; + } + +return intmask; +} +static struct sdhci_ops sdhci_omap_ops = { .set_clock = sdhci_omap_set_clock, .set_power = sdhci_omap_set_power,
@@ -811,6 +848,7 @@ static struct sdhci_ops sdhci_omap_ops = { .platform_send_init_74_clocks = sdhci_omap_init_74_clocks, .reset = sdhci_omap_reset, .set_uhs_signaling = sdhci_omap_set_uhs_signaling, + .irq = sdhci_omap_irq, };static int sdhci_omap_set_capabilities (struct sdhci_omap_host *omap_host)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 35/48 mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20C
In reply to Greg Kroah-HartmanFrom: Faiz Abbas <[email protected]>
[ Upstream commit feb40824d78eac5e48f56498dca941754dff33d7 ]
According to the App note[1] detailing the tuning algorithm, for temperatures < -20C, the initial tuning value should be min(largest value in LPW - 24, ceil(13/16 ratio of LPW)). The largest value in LPW is (max_window + 4 * (max_len - 1)) and not (max_window + 4 * max_len) itself. Fix this implementation.
[1] http://www.ti.com/lit/an/spraca9b/spraca9b.pdf
--- drivers/mmc/host/sdhci-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-omap.c +1 -1
@@ -387,7 +387,7 @@ static int sdhci_omap_execute_tuning(struct mmc_host *mmc, u32 opcode)* on temperature */ if (temperature <-20000 ) - phase_delay =min (max_window +4 * max_len -24 , + phase_delay =min (max_window +4 * (max_len -1 ) -24 , max_window +DIV_ROUND_UP (13 * max_len,16 ) *4 );else if (temperature <20000 )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 36/48 driver core: Remove the link if there is no driver with AUTO flag
In reply to Greg Kroah-HartmanFrom: Yong Wu <[email protected]>
commit 0fe6f7874d467456da6f6a221dd92499a3ab1780 upstream.
DL_FLAG_AUTOREMOVE_CONSUMER/SUPPLIER means "Remove the link automatically on consumer/supplier driver unbind", that means we should remove whole the device_link when there is no this driver no matter what the ref_count of the link is.
--- drivers/base/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/core.c +2 -2
@@ -546,7 +546,7 @@ static void __device_links_no_driver(strcontinue ;if (link->flags &DL_FLAG_AUTOREMOVE_CONSUMER ) -kref_put (&link->kref, __device_link_del); +__device_link_del (&link->kref);else if (link->status !=DL_STATE_SUPPLIER_UNBIND )WRITE_ONCE (link->status,DL_STATE_AVAILABLE ); }
@@ -591,7 +591,7 @@ void device_links_driver_cleanup(struct*/ if (link->status ==DL_STATE_SUPPLIER_UNBIND && link->flags &DL_FLAG_AUTOREMOVE_SUPPLIER ) -kref_put (&link->kref, __device_link_del); +__device_link_del (&link->kref);WRITE_ONCE (link->status,DL_STATE_DORMANT ); }
Greg Kroah-Hartman
maintainerPATCH 37/48 driver core: Fix adding device links to probing suppliers
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
commit 15cfb094160385cc0b303c4cda483caa102af654 upstream.
Currently, it is not valid to add a device link from a consumer driver ->probe callback to a supplier that is still probing too, but generally this is a valid use case. For example, if the consumer has just acquired a resource that can only be available if the supplier is functional, adding a device link to that supplier right away should be safe (and even desirable arguably), but device_link_add() doesn't handle that case correctly and the initial state of the link created by it is wrong then.
To address this problem, change the initial state of device links added between a probing supplier and a probing consumer to DL_STATE_CONSUMER_PROBE and update device_links_driver_bound() to skip such links on the supplier side.
With this change, if the supplier probe completes first, device_links_driver_bound() called for it will skip the link state update and when it is called for the consumer, the link state will be updated to "active". In turn, if the consumer probe completes first, device_links_driver_bound() called for it will change the state of the link to "active" and when it is called for the supplier, the link status update will be skipped.
However, in principle the supplier or consumer probe may still fail after the link has been added, so modify device_links_no_driver() to change device links in the "active" or "consumer probe" state to "dormant" on the supplier side and update __device_links_no_driver() to change the link state to "available" only if it is "consumer probe" or "active".
Then, if the supplier probe fails first, the leftover link to the probing consumer will become "dormant" and device_links_no_driver() called for the consumer (when its probe fails) will clean it up. In turn, if the consumer probe fails first, it will either drop the link, or change its state to "available" and, in the latter case, when device_links_no_driver() is called for the supplier, it will update the link state to "dormant". [If the supplier probe fails, but the consumer probe succeeds, which should not happen as long as the consumer driver is correct, the link still will be around, but it will be "dormant" until the supplier is probed again.]
--- Documentation/driver-api/device_link.rst | 10 ++-- drivers/base/core.c | 74 +++++++++++++++++++++++++++---- 2 files changed, 73 insertions(+), 11 deletions(-)
Documentation/driver-api/device_link.rst +7 -3
@@ -59,11 +59,15 @@ device ``->probe`` callback or a boot-ti Another example for an inconsistent state would be a device link that represents a driver presence dependency, yet is added from the consumer's -``->probe`` callback while the supplier hasn't probed yet: Had the driver -core known about the device link earlier, it wouldn't have probed the +``->probe`` callback while the supplier hasn't started to probe yet: Had the +driver core known about the device link earlier, it wouldn't have probed the consumer in the first place. The onus is thus on the consumer to check presence of the supplier after adding the link, and defer probing on -non-presence. +non-presence. [Note that it is valid to create a link from the consumer's +``->probe`` callback while the supplier is still probing, but the consumer must +know that the supplier is functional already at the link creation time (that is +the case, for instance, if the consumer has just acquired some resources that +would not have been available had the supplier not been functional then).] If a device link is added in the ``->probe`` callback of the supplier or consumer driver, it is typically deleted in its ``->remove`` callback for
drivers/base/core.c +66 -8
112 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 38/48 driver core: Make driver core own stateful device links
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
commit 72175d4ea4c442d95cf690c3e968eeee90fd43ca upstream.
Even though stateful device links are managed by the driver core in principle, their creators are allowed and sometimes even expected to drop references to them via device_link_del() or device_link_remove(), but that doesn't really play well with the "persistent" link concept.
If "persistent" managed device links are created from driver probe callbacks, device_link_add() called to do that will take a new reference on the link each time the callback runs and those references will never be dropped, which kind of isn't nice.
This issues arises because of the link reference counting carried out by device_link_add() for existing links, but that is only done to avoid deleting device links that may still be necessary, which shouldn't be a concern for managed (stateful) links. These device links are managed by the driver core and whoever creates one of them will need it at least as long as until the consumer driver is detached from its device and deleting it may be left to the driver core just fine.
For this reason, rework device_link_add() to apply the reference counting to stateless links only and make device_link_del() and device_link_remove() drop references to stateless links only too. After this change, if called to add a stateful device link for a consumer-supplier pair for which a stateful device link is present already, device_link_add() will return the existing link without incrementing its reference counter. Accordingly, device_link_del() and device_link_remove() will WARN() and do nothing when called to drop a reference to a stateful link. Thus, effectively, all stateful device links will be owned by the driver core.
In addition, clean up the handling of the link management flags, DL_FLAG_AUTOREMOVE_CONSUMER and DL_FLAG_AUTOREMOVE_SUPPLIER, so that
(a) they are never set at the same time and (b) if device_link_add() is called for a consumer-supplier pair with an existing stateful link between them, the flags of that link will be combined with the flags passed to device_link_add() to ensure that the life time of the link is sufficient for all of the callers of device_link_add() for the same consumer-supplier pair.
Update the device_link_add() kerneldoc comment to reflect the above changes.
--- Documentation/driver-api/device_link.rst | 42 +++++++++++------- drivers/base/core.c | 69 ++++++++++++++++++++++++------- 2 files changed, 79 insertions(+), 32 deletions(-)
Documentation/driver-api/device_link.rst +25 -17
@@ -25,8 +25,8 @@ suspend/resume and shutdown ordering. Device links allow representation of such dependencies in the driver core. -In its standard form, a device link combines *both* dependency types: -It guarantees correct suspend/resume and shutdown ordering between a +In its standard or *managed* form, a device link combines *both* dependency +types: It guarantees correct suspend/resume and shutdown ordering between a "supplier" device and its "consumer" devices, and it guarantees driver presence on the supplier. The consumer devices are not probed before the supplier is bound to a driver, and they're unbound before the supplier
@@ -69,12 +69,14 @@ know that the supplier is functional alr the case, for instance, if the consumer has just acquired some resources that would not have been available had the supplier not been functional then).] -If a device link is added in the ``->probe`` callback of the supplier or -consumer driver, it is typically deleted in its ``->remove`` callback for -symmetry. That way, if the driver is compiled as a module, the device -link is added on module load and orderly deleted on unload. The same -restrictions that apply to device link addition (e.g. exclusion of a -parallel suspend/resume transition) apply equally to deletion. +If a device link with ``DL_FLAG_STATELESS`` set (i.e. a stateless device link) +is added in the ``->probe`` callback of the supplier or consumer driver, it is +typically deleted in its ``->remove`` callback for symmetry. That way, if the +driver is compiled as a module, the device link is added on module load and +orderly deleted on unload. The same restrictions that apply to device link +addition (e.g. exclusion of a parallel suspend/resume transition) apply equally +to deletion. Device links with ``DL_FLAG_STATELESS`` unset (i.e. managed +device links) are deleted automatically by the driver core. Several flags may be specified on device link addition, two of which have already been mentioned above: ``DL_FLAG_STATELESS`` to express that no
@@ -87,8 +89,6 @@ link is added from the consumer's ``->pr can be specified to runtime resume the supplier upon addition of the device link. ``DL_FLAG_AUTOREMOVE_CONSUMER`` causes the device link to be automatically purged when the consumer fails to probe or later unbinds. -This obviates the need to explicitly delete the link in the ``->remove`` -callback or in the error path of the ``->probe`` callback. Similarly, when the device link is added from supplier's ``->probe`` callback, ``DL_FLAG_AUTOREMOVE_SUPPLIER`` causes the device link to be automatically
@@ -97,12 +97,20 @@ purged when the supplier fails to probe Limitations =========== -Driver authors should be aware that a driver presence dependency (i.e. when -``DL_FLAG_STATELESS`` is not specified on link addition) may cause probing of -the consumer to be deferred indefinitely. This can become a problem if the -consumer is required to probe before a certain initcall level is reached. -Worse, if the supplier driver is blacklisted or missing, the consumer will -never be probed. +Driver authors should be aware that a driver presence dependency for managed +device links (i.e. when ``DL_FLAG_STATELESS`` is not specified on link addition) +may cause probing of the consumer to be deferred indefinitely. This can become +a problem if the consumer is required to probe before a certain initcall level +is reached. Worse, if the supplier driver is blacklisted or missing, the +consumer will never be probed. + +Moreover, managed device links cannot be deleted directly. They are deleted +by the driver core when they are not necessary any more in accordance with the +``DL_FLAG_AUTOREMOVE_CONSUMER`` and ``DL_FLAG_AUTOREMOVE_SUPPLIER`` flags. +However, stateless device links (i.e. device links with ``DL_FLAG_STATELESS`` +set) are expected to be removed by whoever called :c:func:`device_link_add()` +to add them with the help of either :c:func:`device_link_del()` or +:c:func:`device_link_remove()`. Sometimes drivers depend on optional resources. They are able to operate in a degraded mode (reduced feature set or performance) when those resources
@@ -286,4 +294,4 @@ API === .. kernel-doc:: drivers/base/core.c - :functions: device_link_add device_link_del + :functions: device_link_add device_link_del device_link_remove
drivers/base/core.c +54 -15
118 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 39/48 driver core: Add device link flag DL_FLAG_AUTOPROBE_CONSUMER
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
commit e7dd40105aac9ba051e44ad711123bc53a5e4c71 upstream.
Add a new device link flag, DL_FLAG_AUTOPROBE_CONSUMER, to request the driver core to probe for a consumer driver automatically after binding a driver to the supplier device on a persistent managed device link.
As unbinding the supplier driver on a managed device link causes the consumer driver to be detached from its device automatically, this flag provides a complementary mechanism which is needed to address some "composite device" use cases.
--- Documentation/driver-api/device_link.rst | 9 +++++++++ drivers/base/core.c | 16 +++++++++++++++- drivers/base/dd.c | 2 +- include/linux/device.h | 3 +++ 4 files changed, 28 insertions(+), 2 deletions(-)
Documentation/driver-api/device_link.rst +9 -0
@@ -94,6 +94,15 @@ Similarly, when the device link is added ``DL_FLAG_AUTOREMOVE_SUPPLIER`` causes the device link to be automatically purged when the supplier fails to probe or later unbinds. +If neither ``DL_FLAG_AUTOREMOVE_CONSUMER`` nor ``DL_FLAG_AUTOREMOVE_SUPPLIER`` +is set, ``DL_FLAG_AUTOPROBE_CONSUMER`` can be used to request the driver core +to probe for a driver for the consumer driver on the link automatically after +a driver has been bound to the supplier device. + +Note, however, that any combinations of ``DL_FLAG_AUTOREMOVE_CONSUMER``, +``DL_FLAG_AUTOREMOVE_SUPPLIER`` or ``DL_FLAG_AUTOPROBE_CONSUMER`` with +``DL_FLAG_STATELESS`` are invalid and cannot be used. + Limitations ===========
drivers/base/core.c +15 -1
@@ -195,6 +195,12 @@ void device_pm_move_to_tail(struct devic* the link will be maintained until one of the devices pointed to by it (either * the consumer or the supplier) is unregistered. * +* Also, if DL_FLAG_STATELESS, DL_FLAG_AUTOREMOVE_CONSUMER and +* DL_FLAG_AUTOREMOVE_SUPPLIER are not set in @flags (that is, a persistent +* managed device link is being added), the DL_FLAG_AUTOPROBE_CONSUMER flag can +* be used to request the driver core to automaticall probe for a consmer +* driver after successfully binding a driver to the supplier device. +* * The combination of DL_FLAG_STATELESS and either DL_FLAG_AUTOREMOVE_CONSUMER * or DL_FLAG_AUTOREMOVE_SUPPLIER set in @flags at the same time is invalid and * will cause NULL to be returned upfront.
@@ -215,7 +221,12 @@ struct device_link *device_link_add(struif (!consumer || !supplier || (flags &DL_FLAG_STATELESS && - flags & (DL_FLAG_AUTOREMOVE_CONSUMER |DL_FLAG_AUTOREMOVE_SUPPLIER ))) + flags & (DL_FLAG_AUTOREMOVE_CONSUMER | +DL_FLAG_AUTOREMOVE_SUPPLIER | +DL_FLAG_AUTOPROBE_CONSUMER )) || + (flags &DL_FLAG_AUTOPROBE_CONSUMER && + flags & (DL_FLAG_AUTOREMOVE_CONSUMER | +DL_FLAG_AUTOREMOVE_SUPPLIER )))return NULL ;if (flags &DL_FLAG_PM_RUNTIME && flags &DL_FLAG_RPM_ACTIVE ) {
@@ -576,6 +587,9 @@ void device_links_driver_bound(struct deWARN_ON (link->status !=DL_STATE_DORMANT );WRITE_ONCE (link->status,DL_STATE_AVAILABLE ); + +if (link->flags &DL_FLAG_AUTOPROBE_CONSUMER ) +driver_deferred_probe_add (link->consumer); }list_for_each_entry (link, &dev->links.suppliers, c_node) {
drivers/base/dd.c +1 -1
@@ -116,7 +116,7 @@ static void deferred_probe_work_func(str } static DECLARE_WORK(deferred_probe_work, deferred_probe_work_func); -static void driver_deferred_probe_add (struct device *dev) +void driver_deferred_probe_add (struct device *dev) {mutex_lock (&deferred_probe_mutex);if (list_empty (&dev->p->deferred_probe)) {
include/linux/device.h +3 -0
@@ -339,6 +339,7 @@ struct device *driver_find_device(struct struct device *start, void *data, int (*match)(struct device *dev, void *data)); +void driver_deferred_probe_add (struct device *dev);int driver_deferred_probe_check_state (struct device *dev);/**
@@ -824,12 +825,14 @@ enum device_link_state {* PM_RUNTIME: If set, the runtime PM framework will use this link. * RPM_ACTIVE: Run pm_runtime_get_sync() on the supplier during link creation. * AUTOREMOVE_SUPPLIER: Remove the link automatically on supplier driver unbind. +* AUTOPROBE_CONSUMER: Probe consumer driver automatically after supplier binds. */ #define DL_FLAG_STATELESS BIT(0)#define DL_FLAG_AUTOREMOVE_CONSUMER BIT(1)#define DL_FLAG_PM_RUNTIME BIT(2)#define DL_FLAG_RPM_ACTIVE BIT(3)#define DL_FLAG_AUTOREMOVE_SUPPLIER BIT(4) +#define DL_FLAG_AUTOPROBE_CONSUMER BIT(5)/** * struct device_link - Device link representation.
Greg Kroah-Hartman
maintainerPATCH 40/48 driver core: Remove device link creation limitation
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
commit 515db266a9dace92b0cbaed9a6044dd5304b8ca9 upstream.
If device_link_add() is called for a consumer/supplier pair with an existing device link between them and the existing link's type is not in agreement with the flags passed to that function by its caller, NULL will be returned. That is seriously inconvenient, because it forces the callers of device_link_add() to worry about what others may or may not do even if that is not relevant to them for any other reasons.
It turns out, however, that this limitation can be made go away relatively easily.
The underlying observation is that if DL_FLAG_STATELESS has been passed to device_link_add() in flags for the given consumer/supplier pair at least once, calling either device_link_del() or device_link_remove() to release the link returned by it should work, but there are no other requirements associated with that flag. In turn, if at least one of the callers of device_link_add() for the given consumer/supplier pair has not passed DL_FLAG_STATELESS to it in flags, the driver core should track the status of the link and act on it as appropriate (ie. the link should be treated as "managed"). This means that DL_FLAG_STATELESS needs to be set for managed device links and it should be valid to call device_link_del() or device_link_remove() to drop references to them in certain sutiations.
To allow that to happen, introduce a new (internal) device link flag called DL_FLAG_MANAGED and make device_link_add() set it automatically whenever DL_FLAG_STATELESS is not passed to it. Also make it take additional references to existing device links that were previously stateless (that is, with DL_FLAG_STATELESS set and DL_FLAG_MANAGED unset) and will need to be managed going forward and initialize their status (which has been DL_STATE_NONE so far).
Accordingly, when a managed device link is dropped automatically by the driver core, make it clear DL_FLAG_MANAGED, reset the link's status back to DL_STATE_NONE and drop the reference to it associated with DL_FLAG_MANAGED instead of just deleting it right away (to allow it to stay around in case it still needs to be released explicitly by someone).
With that, since setting DL_FLAG_STATELESS doesn't mean that the device link in question is not managed any more, replace all of the status-tracking checks against DL_FLAG_STATELESS with analogous checks against DL_FLAG_MANAGED and update the documentation to reflect these changes.
While at it, make device_link_add() reject flags that it does not recognize, including DL_FLAG_MANAGED.
--- Documentation/driver-api/device_link.rst | 4 drivers/base/core.c | 176 +++++++++++++++++-------------- drivers/base/power/runtime.c | 4 include/linux/device.h | 4 4 files changed, 106 insertions(+), 82 deletions(-)
Documentation/driver-api/device_link.rst +2 -2
@@ -75,8 +75,8 @@ typically deleted in its ``->remove`` ca driver is compiled as a module, the device link is added on module load and orderly deleted on unload. The same restrictions that apply to device link addition (e.g. exclusion of a parallel suspend/resume transition) apply equally -to deletion. Device links with ``DL_FLAG_STATELESS`` unset (i.e. managed -device links) are deleted automatically by the driver core. +to deletion. Device links managed by the driver core are deleted automatically +by it. Several flags may be specified on device link addition, two of which have already been mentioned above: ``DL_FLAG_STATELESS`` to express that no
drivers/base/core.c +99 -77
342 lines not on this page · raw message
drivers/base/power/runtime.c +2 -2
@@ -1531,7 +1531,7 @@ void pm_runtime_remove(struct device *de* runtime PM references to the device, drop the usage counter of the device * (as many times as needed). * -* Links with the DL_FLAG_STATELESS flag set are ignored. +* Links with the DL_FLAG_MANAGED flag unset are ignored. * * Since the device is guaranteed to be runtime-active at the point this is * called, nothing else needs to be done here.
@@ -1548,7 +1548,7 @@ void pm_runtime_clean_up_links(struct de idx =device_links_read_lock ();list_for_each_entry_rcu (link, &dev->links.consumers, s_node) { -if (link->flags &DL_FLAG_STATELESS ) +if (!(link->flags &DL_FLAG_MANAGED ))continue ;while (refcount_dec_not_one (&link->rpm_active))
include/linux/device.h +3 -1
@@ -820,12 +820,13 @@ enum device_link_state {/* * Device link flags. * -* STATELESS: The core won't track the presence of supplier/consumer drivers. +* STATELESS: The core will not remove this link automatically. * AUTOREMOVE_CONSUMER: Remove the link automatically on consumer driver unbind. * PM_RUNTIME: If set, the runtime PM framework will use this link. * RPM_ACTIVE: Run pm_runtime_get_sync() on the supplier during link creation. * AUTOREMOVE_SUPPLIER: Remove the link automatically on supplier driver unbind. * AUTOPROBE_CONSUMER: Probe consumer driver automatically after supplier binds. +* MANAGED: The core tracks presence of supplier/consumer drivers (internal). */ #define DL_FLAG_STATELESS BIT(0)#define DL_FLAG_AUTOREMOVE_CONSUMER BIT(1)
@@ -833,6 +834,7 @@ enum device_link_state {#define DL_FLAG_RPM_ACTIVE BIT(3)#define DL_FLAG_AUTOREMOVE_SUPPLIER BIT(4)#define DL_FLAG_AUTOPROBE_CONSUMER BIT(5) +#define DL_FLAG_MANAGED BIT(6)/** * struct device_link - Device link representation.
Greg Kroah-Hartman
maintainerPATCH 41/48 driver core: Fix creation of device links with PM-runtime flags
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
commit fb583c8eeeb1fd57e24ef41ed94c9112067aeac9 upstream.
After commit 515db266a9da ("driver core: Remove device link creation limitation"), if PM-runtime flags are passed to device_link_add(), it will fail (returning NULL) due to an overly restrictive flags check introduced by that commit.
Fix this issue by extending the check in question to cover the PM-runtime flags too.
--- drivers/base/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/base/core.c +4 -2
@@ -213,6 +213,9 @@ void device_pm_move_to_tail(struct devic DL_FLAG_AUTOREMOVE_SUPPLIER | \ DL_FLAG_AUTOPROBE_CONSUMER) +#define DL_ADD_VALID_FLAGS (DL_MANAGED_LINK_FLAGS | DL_FLAG_STATELESS | \ + DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE) +/** * device_link_add - Create a link between two devices. * @consumer: Consumer end of the link.
@@ -274,8 +277,7 @@ struct device_link *device_link_add(stru { struct device_link *link; - if (!consumer || !supplier || - (flags & ~(DL_FLAG_STATELESS | DL_MANAGED_LINK_FLAGS)) || + if (!consumer || !supplier || flags & ~DL_ADD_VALID_FLAGS || (flags & DL_FLAG_STATELESS && flags & DL_MANAGED_LINK_FLAGS) || (flags & DL_FLAG_AUTOPROBE_CONSUMER && flags & (DL_FLAG_AUTOREMOVE_CONSUMER |
Greg Kroah-Hartman
maintainerPATCH 42/48 net: qrtr: fix len of skb_put_padto in qrtr_node_enqueue
In reply to Greg Kroah-HartmanFrom: Carl Huang <[email protected]>
commit ce57785bf91b1ceaef4f4bffed8a47dc0919c8da upstream.
The len used for skb_put_padto is wrong, it need to add len of hdr.
In qrtr_node_enqueue, local variable size_t len is assign with skb->len, then skb_push(skb, sizeof(*hdr)) will add skb->len with sizeof(*hdr), so local variable size_t len is not same with skb->len after skb_push(skb, sizeof(*hdr)).
Then the purpose of skb_put_padto(skb, ALIGN(len, 4)) is to add add pad to the end of the skb's data if skb->len is not aligned to 4, but unfortunately it use len instead of skb->len, at this line, skb->len is 32 bytes(sizeof(*hdr)) more than len, for example, len is 3 bytes, then skb->len is 35 bytes(3 + 32), and ALIGN(len, 4) is 4 bytes, so __skb_put_padto will do nothing after check size(35) < len(4), the correct value should be 36(sizeof(*hdr) + ALIGN(len, 4) = 32 + 4), then __skb_put_padto will pass check size(35) < len(36) and add 1 byte to the end of skb's data, then logic is correct.
function of skb_push:
void *skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data -= len;
skb->len += len;
if (unlikely(skb->data < skb->head))
skb_under_panic(skb, len, __builtin_return_address(0));
return skb->data;
}function of skb_put_padto
static inline int skb_put_padto(struct sk_buff *skb, unsigned int len)
{
return __skb_put_padto(skb, len, true);
}function of __skb_put_padto
static inline int __skb_put_padto(struct sk_buff *skb, unsigned int len,
bool free_on_error)
{
unsigned int size = skb->len;
if (unlikely(size < len)) {
len -= size;
if (__skb_pad(skb, len, free_on_error))
return -ENOMEM;
__skb_put(skb, len);
}
return 0;
}--- net/qrtr/qrtr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/qrtr/qrtr.c +1 -1
@@ -203,7 +203,7 @@ static int qrtr_node_enqueue(struct qrtr hdr->size =cpu_to_le32 (len); hdr->confirm_rx =0 ; -skb_put_padto (skb,ALIGN (len,4 )); +skb_put_padto (skb,ALIGN (len,4 ) +sizeof (*hdr));mutex_lock (&node->ep_lock);if (node->ep)
Greg Kroah-Hartman
maintainerPATCH 43/48 ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional()
In reply to Greg Kroah-HartmanFrom: Florian Fainelli <[email protected]>
commit 45939ce292b4b11159719faaf60aba7d58d5fe33 upstream.
It is possible for a system with an ARMv8 timer to run a 32-bit kernel. When this happens we will unconditionally have the vDSO code remove the __vdso_gettimeofday and __vdso_clock_gettime symbols because cntvct_functional() returns false since it does not match that compatibility string.
--- arch/arm/kernel/vdso.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/kernel/vdso.c +2 -0
@@ -104,6 +104,8 @@ static bool __init cntvct_functional(voi*/ np =of_find_compatible_node (NULL ,NULL ,"arm,armv7-timer" );if (!np) + np =of_find_compatible_node (NULL ,NULL ,"arm,armv8-timer" ); +if (!np) goto out_put;if (of_property_read_bool (np,"arm,cpu-registers-not-fw-configured" ))
Greg Kroah-Hartman
maintainerPATCH 44/48 ARM: 8958/1: rename missed uaccess .fixup section
In reply to Greg Kroah-HartmanFrom: Kees Cook <[email protected]>
commit f87b1c49bc675da30d8e1e8f4b60b800312c7b90 upstream.
When the uaccess .fixup section was renamed to .text.fixup, one case was missed. Under ld.bfd, the orphaned section was moved close to .text (since they share the "ax" bits), so things would work normally on uaccess faults. Under ld.lld, the orphaned section was placed outside the .text section, making it unreachable.
--- arch/arm/lib/copy_from_user.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/lib/copy_from_user.S +1 -1
@@ -100,7 +100,7 @@ ENTRY(arm_copy_from_user) ENDPROC(arm_copy_from_user) - .pushsection .fixup,"ax" + .pushsection .text.fixup,"ax" .align 0 copy_abort_preamble ldmfd sp!, {r1, r2, r3}
Greg Kroah-Hartman
maintainerPATCH 45/48 mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
In reply to Greg Kroah-HartmanFrom: Jann Horn <[email protected]>
commit fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 upstream.
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelist. ___slab_alloc() can re-enable IRQs via allocate_slab(), so the TID must be bumped before ___slab_alloc() to properly commit the freelist head change.
Fix it by unconditionally bumping c->tid when entering the slowpath.
--- mm/slub.c | 9 +++++++++ 1 file changed, 9 insertions(+)
mm/slub.c +9 -0
@@ -3104,6 +3104,15 @@ int kmem_cache_alloc_bulk(struct kmem_caif (unlikely (!object)) {/* +* We may have removed an object from c->freelist using +* the fastpath in the previous iteration; in that case, +* c->tid has not been bumped yet. +* Since ___slab_alloc() may reenable interrupts while +* allocating memory, we should bump c->tid now. +*/ + c->tid =next_tid (c->tid); + +/* * Invoking slow path likely have side-effect * of re-populating per CPU c->freelist */
Greg Kroah-Hartman
maintainerPATCH 46/48 HID: google: add moonball USB id
In reply to Greg Kroah-HartmanFrom: Chen-Tsung Hsieh <[email protected]>
commit 58322a1590fc189a8e1e349d309637d4a4942840 upstream.
Add 1 additional hammer-like device.
--- drivers/hid/hid-google-hammer.c | 2 ++ drivers/hid/hid-ids.h | 1 + 2 files changed, 3 insertions(+)
drivers/hid/hid-google-hammer.c +2 -0
@@ -125,6 +125,8 @@ static const struct hid_device_id hammer {HID_DEVICE (BUS_USB ,HID_GROUP_GENERIC , USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_MASTERBALL) }, { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, + USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_MOONBALL) }, + { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_STAFF) }, { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_WAND) },
drivers/hid/hid-ids.h +1 -0
@@ -468,6 +468,7 @@#define USB_DEVICE_ID_GOOGLE_WHISKERS 0x5030#define USB_DEVICE_ID_GOOGLE_MASTERBALL 0x503c#define USB_DEVICE_ID_GOOGLE_MAGNEMITE 0x503d +#define USB_DEVICE_ID_GOOGLE_MOONBALL 0x5044#define USB_VENDOR_ID_GOTOP 0x08f2#define USB_DEVICE_ID_SUPER_Q2 0x007f
Greg Kroah-Hartman
maintainerPATCH 47/48 efi: Fix debugobjects warning on efi_rts_work
In reply to Greg Kroah-HartmanFrom: Waiman Long <[email protected]>
commit ef1491e791308317bb9851a0ad380c4a68b58d54 upstream.
The following commit:
9dbbedaa6171 ("efi: Make efi_rts_work accessible to efi page fault handler")
converted 'efi_rts_work' from an auto variable to a global variable. However, when submitting the work, INIT_WORK_ONSTACK() was still used, causing the following complaint from debugobjects:
ODEBUG: object 00000000ed27b500 is NOT on stack 00000000c7d38760, but annotated.
Change the macro to just INIT_WORK() to eliminate the warning.
--- drivers/firmware/efi/runtime-wrappers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/runtime-wrappers.c +1 -1
@@ -62,7 +62,7 @@ struct efi_runtime_work efi_rts_work; efi_rts_work.status =EFI_ABORTED ; \ \init_completion (&efi_rts_work.efi_rts_comp); \ -INIT_WORK_ONSTACK (&efi_rts_work.work, efi_call_rts); \ +INIT_WORK (&efi_rts_work.work, efi_call_rts); \ efi_rts_work.arg1 = _arg1; \ efi_rts_work.arg2 = _arg2; \ efi_rts_work.arg3 = _arg3; \
Greg Kroah-Hartman
maintainerPATCH 48/48 ipv4: ensure rcu_read_lock() in cipso_v4_error()
In reply to Greg Kroah-HartmanFrom: Matteo Croce <[email protected]>
commit 3e72dfdf8227b052393f71d820ec7599909dddc2 upstream.
Similarly to commit c543cb4a5f07 ("ipv4: ensure rcu_read_lock() in ipv4_link_failure()"), __ip_options_compile() must be called under rcu protection.
--- net/ipv4/cipso_ipv4.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
net/ipv4/cipso_ipv4.c +6 -1
@@ -1738,6 +1738,7 @@ void cipso_v4_error(struct sk_buff *skb, {unsigned char optbuf[sizeof (struct ip_options ) +40 ];struct ip_options *opt = (struct ip_options *)optbuf; +int res;if (ip_hdr (skb)->protocol ==IPPROTO_ICMP || error != -EACCES )return ;
@@ -1749,7 +1750,11 @@ void cipso_v4_error(struct sk_buff *skb,memset (opt,0 ,sizeof (struct ip_options )); opt->optlen =ip_hdr (skb)->ihl*4 -sizeof (struct iphdr ); -if (__ip_options_compile (dev_net (skb->dev), opt, skb,NULL )) +rcu_read_lock (); + res =__ip_options_compile (dev_net (skb->dev), opt, skb,NULL ); +rcu_read_unlock (); + +if (res)return ;if (gateway)
Quoted 17 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuning
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
NOTE:
The arm beagleboard x15 device running stable rc 4.19.112-rc1, 5.4.27-rc1 and 5.5.11-rc2 kernel pops up the following messages on console log, Is this a problem ?
[ 15.737765] mmc1: unspecified timeout for CMD6 - use generic [ 16.754248] mmc1: unspecified timeout for CMD6 - use generic [ 16.842071] mmc1: unspecified timeout for CMD6 - use generic ... [ 977.126652] mmc1: unspecified timeout for CMD6 - use generic [ 985.449798] mmc1: unspecified timeout for CMD6 - use generic
Summary
------------------------------------------------------------------------
kernel: 4.19.112-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: 8977fd00fd705a4e9273d09171ee66344cdc879e
git describe: v4.19.111-49-g8977fd00fd70
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.111-49-g8977fd00fd70
No regressions (compared to build v4.19.110-90-gad35ac79caef)
No fixes (compared to build v4.19.110-90-gad35ac79caef)
Ran 18421 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- nxp-ls2088- arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* linux-log-parser
* perf
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-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-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* network-basic-tests
* v4l2-compliance
* ltp-cve-tests
* spectre-meltdown-checker-test
* ltp-open-posix-tests
ref:
https://lkft.validation.linaro.org/scheduler/job/1298207#L4037
https://lkft.validation.linaro.org/scheduler/job/1298945#L4132
https://lkft.validation.linaro.org/scheduler/job/1299973#L4232
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Quoted 34 lines · Naresh Kamboju
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuningResults from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.NOTE:
The arm beagleboard x15 device running stable rc 4.19.112-rc1, 5.4.27-rc1 and 5.5.11-rc2 kernel pops up the following messages on console log, Is this a problem ?
Quoted 6 lines
[ 15.737765] mmc1: unspecified timeout for CMD6 - use generic [ 16.754248] mmc1: unspecified timeout for CMD6 - use generic [ 16.842071] mmc1: unspecified timeout for CMD6 - use generic ... [ 977.126652] mmc1: unspecified timeout for CMD6 - use generic [ 985.449798] mmc1: unspecified timeout for CMD6 - use generic
[...]
This warning was introduced by commit 533a6cfe08f9 "mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()". That should not be applied to stable branches; it is not valid without (at least) these preparatory changes:
0c204979c691 mmc: core: Cleanup BKOPS support24ed3bd01d6a mmc: core: Specify timeouts for BKOPS and CACHE_FLUSH for eMMC ad91619aa9d7 mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD
Ben.
Signature · 3 lines
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United KingdomGreg Kroah-Hartman
maintainerQuoted 43 lines · Ben Hutchings
Quoted 40 lines · Naresh Kamboju
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuningResults from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.NOTE:
The arm beagleboard x15 device running stable rc 4.19.112-rc1, 5.4.27-rc1 and 5.5.11-rc2 kernel pops up the following messages on console log, Is this a problem ?[ 15.737765] mmc1: unspecified timeout for CMD6 - use generic [ 16.754248] mmc1: unspecified timeout for CMD6 - use generic [ 16.842071] mmc1: unspecified timeout for CMD6 - use generic ... [ 977.126652] mmc1: unspecified timeout for CMD6 - use generic [ 985.449798] mmc1: unspecified timeout for CMD6 - use generic[...]
Quoted 8 lines
This warning was introduced by commit
533a6cfe08f9"mmc: core: Default togeneric_cmd6_timeas timeout in__mmc_switch()". That should not be applied to stable branches; it is not valid without (at least) these preparatory changes:
0c204979c691mmc: core: Cleanup BKOPS support24ed3bd01d6ammc: core: Specify timeouts for BKOPS andCACHE_FLUSHfor eMMCad91619aa9d7mmc: block: Usegeneric_cmd6_timewhen modifyingINAND_CMD38_ARG_EXT_CSD
Ok, I've now dropped that patch, which also required me to drop 1292e3efb149 ("mmc: core: Allow host controllers to require R1B for CMD6"). I've done so for 5.5.y, 5.4.y, and 4.19.y.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 49 lines · Greg Kroah-Hartman
Quoted 48 lines · Ben Hutchings
Quoted 34 lines · Naresh Kamboju
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuningResults from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.NOTE:
The arm beagleboard x15 device running stable rc 4.19.112-rc1, 5.4.27-rc1 and 5.5.11-rc2 kernel pops up the following messages on console log, Is this a problem ?Quoted 6 lines
[ 15.737765] mmc1: unspecified timeout for CMD6 - use generic [ 16.754248] mmc1: unspecified timeout for CMD6 - use generic [ 16.842071] mmc1: unspecified timeout for CMD6 - use generic ... [ 977.126652] mmc1: unspecified timeout for CMD6 - use generic [ 985.449798] mmc1: unspecified timeout for CMD6 - use generic[...]
This warning was introduced by commit
533a6cfe08f9"mmc: core: Default togeneric_cmd6_timeas timeout in__mmc_switch()". That should not be applied to stable branches; it is not valid without (at least) these preparatory changes:
Quoted 7 lines
Quoted 3 lines
0c204979c691mmc: core: Cleanup BKOPS support24ed3bd01d6ammc: core: Specify timeouts for BKOPS andCACHE_FLUSHfor eMMCad91619aa9d7mmc: block: Usegeneric_cmd6_timewhen modifyingINAND_CMD38_ARG_EXT_CSDOk, I've now dropped that patch, which also required me to drop
1292e3efb149("mmc: core: Allow host controllers to require R1B for CMD6"). I've done so for 5.5.y, 5.4.y, and 4.19.y.
Ugh, I forgot, that broke other things. I'm going to go rip out a bunch of mmc patches now...
Quoted 55 lines · Greg Kroah-Hartman
Quoted 53 lines · Greg Kroah-Hartman
Quoted 51 lines · Ben Hutchings
Quoted 34 lines · Naresh Kamboju
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuningResults from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.NOTE:
The arm beagleboard x15 device running stable rc 4.19.112-rc1, 5.4.27-rc1 and 5.5.11-rc2 kernel pops up the following messages on console log, Is this a problem ?Quoted 6 lines
[ 15.737765] mmc1: unspecified timeout for CMD6 - use generic [ 16.754248] mmc1: unspecified timeout for CMD6 - use generic [ 16.842071] mmc1: unspecified timeout for CMD6 - use generic ... [ 977.126652] mmc1: unspecified timeout for CMD6 - use generic [ 985.449798] mmc1: unspecified timeout for CMD6 - use generic[...]
This warning was introduced by commit
533a6cfe08f9"mmc: core: Default togeneric_cmd6_timeas timeout in__mmc_switch()". That should not be applied to stable branches; it is not valid without (at least) these preparatory changes:
0c204979c691mmc: core: Cleanup BKOPS support24ed3bd01d6ammc: core: Specify timeouts for BKOPS andCACHE_FLUSHfor eMMCad91619aa9d7mmc: block: Usegeneric_cmd6_timewhen modifyingINAND_CMD38_ARG_EXT_CSD
Quoted 6 lines
Quoted 3 lines
Ok, I've now dropped that patch, which also required me to drop
1292e3efb149("mmc: core: Allow host controllers to require R1B for CMD6"). I've done so for 5.5.y, 5.4.y, and 4.19.y.Ugh, I forgot, that broke other things. I'm going to go rip out a bunch of mmc patches now...
[Am i missing rc2 tag ?]
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 4.19.112-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: d078cac7a42286ba7c97801a763fc42ad7baf5c1
git describe: v4.19.109-136-gd078cac7a422
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.109-136-gd078cac7a422
No regressions (compared to build v4.19.109)
No fixes (compared to build v4.19.109)
Ran 23963 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey
- i386
- juno-r2 - arm64
- juno-r2-compat
- juno-r2-kasan
- nxp-ls2088
- x15
- x86_64
- x86-kasan
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
Test Suites
-----------
* install-android-platform-tools-r2800
* linux-log-parser
* ltp-ipc-tests
* v4l2-compliance
* kvm-unit-tests
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-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-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 57 lines · Naresh Kamboju
Quoted 55 lines · Greg Kroah-Hartman
Quoted 53 lines · Greg Kroah-Hartman
Quoted 51 lines · Ben Hutchings
Quoted 34 lines · Naresh Kamboju
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuningResults from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.NOTE:
The arm beagleboard x15 device running stable rc 4.19.112-rc1, 5.4.27-rc1 and 5.5.11-rc2 kernel pops up the following messages on console log, Is this a problem ?Quoted 6 lines
[ 15.737765] mmc1: unspecified timeout for CMD6 - use generic [ 16.754248] mmc1: unspecified timeout for CMD6 - use generic [ 16.842071] mmc1: unspecified timeout for CMD6 - use generic ... [ 977.126652] mmc1: unspecified timeout for CMD6 - use generic [ 985.449798] mmc1: unspecified timeout for CMD6 - use generic[...]
This warning was introduced by commit
533a6cfe08f9"mmc: core: Default togeneric_cmd6_timeas timeout in__mmc_switch()". That should not be applied to stable branches; it is not valid without (at least) these preparatory changes:
0c204979c691mmc: core: Cleanup BKOPS support24ed3bd01d6ammc: core: Specify timeouts for BKOPS andCACHE_FLUSHfor eMMCad91619aa9d7mmc: block: Usegeneric_cmd6_timewhen modifyingINAND_CMD38_ARG_EXT_CSD
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Ok, I've now dropped that patch, which also required me to drop
1292e3efb149("mmc: core: Allow host controllers to require R1B for CMD6"). I've done so for 5.5.y, 5.4.y, and 4.19.y.Ugh, I forgot, that broke other things. I'm going to go rip out a bunch of mmc patches now...
[Am i missing rc2 tag ?]
Nope, didn't do one.
Quoted 2 lines
Results from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.
Wonderful, thanks!
greg k-h
Quoted 54 lines · Greg Kroah-Hartman
Quoted 53 lines · Greg Kroah-Hartman
Quoted 51 lines · Ben Hutchings
Quoted 34 lines · Naresh Kamboju
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuningResults from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.NOTE:
The arm beagleboard x15 device running stable rc 4.19.112-rc1, 5.4.27-rc1 and 5.5.11-rc2 kernel pops up the following messages on console log, Is this a problem ?Quoted 6 lines
[ 15.737765] mmc1: unspecified timeout for CMD6 - use generic [ 16.754248] mmc1: unspecified timeout for CMD6 - use generic [ 16.842071] mmc1: unspecified timeout for CMD6 - use generic ... [ 977.126652] mmc1: unspecified timeout for CMD6 - use generic [ 985.449798] mmc1: unspecified timeout for CMD6 - use generic[...]
This warning was introduced by commit
533a6cfe08f9"mmc: core: Default togeneric_cmd6_timeas timeout in__mmc_switch()". That should not be applied to stable branches; it is not valid without (at least) these preparatory changes:
0c204979c691mmc: core: Cleanup BKOPS support24ed3bd01d6ammc: core: Specify timeouts for BKOPS andCACHE_FLUSHfor eMMCad91619aa9d7mmc: block: Usegeneric_cmd6_timewhen modifyingINAND_CMD38_ARG_EXT_CSD
Quoted 7 lines
Quoted 3 lines
Ok, I've now dropped that patch, which also required me to drop
1292e3efb149("mmc: core: Allow host controllers to require R1B for CMD6"). I've done so for 5.5.y, 5.4.y, and 4.19.y.Ugh, I forgot, that broke other things. I'm going to go rip out a bunch of mmc patches now...
For v4.19.111-44-gd078cac:
Build results:
total: 156 pass: 156 fail: 0 Qemu test results: total: 418 pass: 418 fail: 0
Guenter
Greg Kroah-Hartman
maintainerQuoted 62 lines · Guenter Roeck
Quoted 54 lines · Greg Kroah-Hartman
Quoted 53 lines · Greg Kroah-Hartman
Quoted 51 lines · Ben Hutchings
Quoted 34 lines · Naresh Kamboju
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuningResults from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.NOTE:
The arm beagleboard x15 device running stable rc 4.19.112-rc1, 5.4.27-rc1 and 5.5.11-rc2 kernel pops up the following messages on console log, Is this a problem ?Quoted 6 lines
[ 15.737765] mmc1: unspecified timeout for CMD6 - use generic [ 16.754248] mmc1: unspecified timeout for CMD6 - use generic [ 16.842071] mmc1: unspecified timeout for CMD6 - use generic ... [ 977.126652] mmc1: unspecified timeout for CMD6 - use generic [ 985.449798] mmc1: unspecified timeout for CMD6 - use generic[...]
This warning was introduced by commit
533a6cfe08f9"mmc: core: Default togeneric_cmd6_timeas timeout in__mmc_switch()". That should not be applied to stable branches; it is not valid without (at least) these preparatory changes:
0c204979c691mmc: core: Cleanup BKOPS support24ed3bd01d6ammc: core: Specify timeouts for BKOPS andCACHE_FLUSHfor eMMCad91619aa9d7mmc: block: Usegeneric_cmd6_timewhen modifyingINAND_CMD38_ARG_EXT_CSDQuoted 7 lines
Quoted 3 lines
Ok, I've now dropped that patch, which also required me to drop
1292e3efb149("mmc: core: Allow host controllers to require R1B for CMD6"). I've done so for 5.5.y, 5.4.y, and 4.19.y.Ugh, I forgot, that broke other things. I'm going to go rip out a bunch of mmc patches now...
Quoted 6 lines
For v4.19.111-44-gd078cac:
Build results:
total: 156 pass: 156 fail: 0 Qemu test results: total: 418 pass: 418 fail: 0
Wonderful, thanks for testing.
greg k-h
Sasha Levin
maintainerQuoted 49 lines · Greg Kroah-Hartman
Quoted 48 lines · Ben Hutchings
Quoted 34 lines · Naresh Kamboju
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
Faiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuningResults from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.NOTE:
The arm beagleboard x15 device running stable rc 4.19.112-rc1, 5.4.27-rc1 and 5.5.11-rc2 kernel pops up the following messages on console log, Is this a problem ?Quoted 6 lines
[ 15.737765] mmc1: unspecified timeout for CMD6 - use generic [ 16.754248] mmc1: unspecified timeout for CMD6 - use generic [ 16.842071] mmc1: unspecified timeout for CMD6 - use generic ... [ 977.126652] mmc1: unspecified timeout for CMD6 - use generic [ 985.449798] mmc1: unspecified timeout for CMD6 - use generic[...]
This warning was introduced by commit
533a6cfe08f9"mmc: core: Default togeneric_cmd6_timeas timeout in__mmc_switch()". That should not be applied to stable branches; it is not valid without (at least) these preparatory changes:
Quoted 7 lines
Quoted 3 lines
0c204979c691mmc: core: Cleanup BKOPS support24ed3bd01d6ammc: core: Specify timeouts for BKOPS andCACHE_FLUSHfor eMMCad91619aa9d7mmc: block: Usegeneric_cmd6_timewhen modifyingINAND_CMD38_ARG_EXT_CSDOk, I've now dropped that patch, which also required me to drop
1292e3efb149("mmc: core: Allow host controllers to require R1B for CMD6"). I've done so for 5.5.y, 5.4.y, and 4.19.y.
Should we instead take those preparatory changes, and 1292e3efb149?
Signature · 2 lines
Thanks, Sasha
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +0000. Anything received after that time might be too late.
Build results:
total: 156 pass: 156 fail: 0 Qemu test results: total: 418 pass: 418 fail: 0
Guenter
Hello Greg,
Quoted 8 lines
From: [email protected] <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 19 March 2020 13:04This is the start of the stable review cycle for the 4.19.112 release. There are 48 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.
No build/test issues seen for CIP configs for Linux 4.19.112-rc1 (d078cac7a422).
Build/test pipeline/logs: https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/pipelines/128111695
GitLab CI pipeline: https://gitlab.com/cip-project/cip-testing/linux-cip-pipelines/-/blob/master/trees/linux-4.19.y.yml
Kind regards, Chris
Quoted 221 lines
Responses should be made by Sat, 21 Mar 2020 12:37:04 +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/v4.x/stable-review/patch-
4.19.112-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-4.19.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 4.19.112-rc1Matteo Croce <[email protected]>
ipv4: ensurercu_read_lock()incipso_v4_error()Waiman Long <[email protected]>
efi: Fix debugobjects warning on 'efi_rts_work'Chen-Tsung Hsieh <[email protected]>
HID: google: add moonball USB idJann Horn <[email protected]>
mm: slub: add missing TID bump inkmem_cache_alloc_bulk()Kees Cook <[email protected]>
ARM: 8958/1: rename missed uaccess .fixup sectionFlorian Fainelli <[email protected]>
ARM: 8957/1: VDSO: Match ARMv8 timer incntvct_functional()Carl Huang <[email protected]>
net: qrtr: fix len ofskb_put_padtoinqrtr_node_enqueueRafael J. Wysocki <[email protected]>
driver core: Fix creation of device links with PM-runtime flagsRafael J. Wysocki <[email protected]>
driver core: Remove device link creation limitationRafael J. Wysocki <[email protected]>
driver core: Add device link flagDL_FLAG_AUTOPROBE_CONSUMERRafael J. Wysocki <[email protected]>
driver core: Make driver core own stateful device linksRafael J. Wysocki <[email protected]>
driver core: Fix adding device links to probing suppliersYong Wu <[email protected]>
driver core: Remove the link if there is no driver with AUTO flagFaiz Abbas <[email protected]>
mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20CFaiz Abbas <[email protected]>
mmc: sdhci-omap: Don'tfinish_mrq()on a command error during tuningNavid Emamdoost <[email protected]>
wimax: i2400: Fix memory leak ini2400m_op_rfkill_sw_toggleNavid Emamdoost <[email protected]>
wimax: i2400: fix memory leakQian Cai <[email protected]>
jbd2: fix data races at structjournal_headAlex Maftei (amaftei) <[email protected]>
sfc: fix timestamp reconstruction at 16-bit rollover pointsTaehee Yoo <[email protected]>
net: rmnet: fix packet forwarding in rmnet bridge modeTaehee Yoo <[email protected]>
net: rmnet: fix bridge mode bugsTaehee Yoo <[email protected]>
net: rmnet: use upper/lower device infrastructureTaehee Yoo <[email protected]>
net: rmnet: do not allow to change mux id if mux id is duplicatedTaehee Yoo <[email protected]>
net: rmnet: removercu_read_lockinrmnet_force_unassociate_device()Taehee Yoo <[email protected]>
net: rmnet: fix suspicious RCU usageTaehee Yoo <[email protected]>
net: rmnet: fix NULL pointer dereference inrmnet_changelink()Taehee Yoo <[email protected]>
net: rmnet: fix NULL pointer dereference inrmnet_newlink()Luo bin <[email protected]>
hinic: fix a bug of settinghw_ioctxtLuo bin <[email protected]>
hinic: fix a irq affinity bugyangerkun <[email protected]>
slip: not callfree_netdevbeforertnl_unlockinslip_openLinus Torvalds <[email protected]>
signal: avoid double atomic counter increments for user accountingMadhuparna Bhowmik <[email protected]>
mac80211: rx: avoid RCU list traversal under mutexMarek Vasut <[email protected]>
net: ks8851-ml: Fix IRQ handling and lockingDaniele Palmas <[email protected]>
net: usb:qmi_wwan: restore mtu min/max values afterraw_ipswitchIgor Druzhinin <[email protected]>
scsi: libfc: free response frame fromGPN_IDJohannes Berg <[email protected]>
cfg80211: checkreg_rulefor NULL inhandle_channel_custom()Kai-Heng Feng <[email protected]>
HID: i2c-hid: add Trekstor Surfbook E11B to descriptor overrideMansour Behabadi <[email protected]>
HID: apple: Add support for recent firmware on Magic KeyboardsJean Delvare <[email protected]>
ACPI: watchdog: Allow disabling WDAT at bootUlf Hansson <[email protected]>
mmc: core: Allow host controllers to require R1B for CMD6Ulf Hansson <[email protected]>
mmc: core: RespectMMC_CAP_NEED_RSP_BUSYfor erase/trim/discardUlf Hansson <[email protected]>
mmc: core: RespectMMC_CAP_NEED_RSP_BUSYfor eMMC sleep commandUlf Hansson <[email protected]>
mmc: sdhci-omap: Fix busy detection by enablingMMC_CAP_NEED_RSP_BUSYFaiz Abbas <[email protected]>
mmc: host: FixKconfigwarnings onkeystone_defconfigFaiz Abbas <[email protected]>
mmc: sdhci-omap: Workaround errata regarding SDR104/HS200 tuning
failures (i929)Faiz Abbas <[email protected]>
mmc: sdhci-omap: Add platform specific reset callbackUlf Hansson <[email protected]>
mmc: core: Default togeneric_cmd6_timeas timeout in__mmc_switch()Kim Phillips <[email protected]>
perf/amd/uncore: Replace manual sampling check withCAP_NO_INTERRUPT
flag-------------
Diffstat:
Documentation/admin-guide/kernel-parameters.txt | 4 + Documentation/driver-api/device_link.rst | 63 +++-- Makefile | 4 +- arch/arm/kernel/vdso.c | 2 + arch/arm/lib/copy_from_user.S | 2 +- arch/x86/events/amd/uncore.c | 14 +- drivers/acpi/acpi_watchdog.c | 12 +- drivers/base/core.c | 293 +++++++++++++++------ drivers/base/dd.c | 2 +- drivers/base/power/runtime.c | 4 +- drivers/firmware/efi/runtime-wrappers.c | 2 +- drivers/hid/hid-apple.c | 3 +- drivers/hid/hid-google-hammer.c | 2 + drivers/hid/hid-ids.h | 1 + drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c | 8 + drivers/mmc/core/core.c | 5 +- drivers/mmc/core/mmc.c | 7 +- drivers/mmc/core/mmc_ops.c | 27 +- drivers/mmc/host/Kconfig | 2 + drivers/mmc/host/sdhci-omap.c | 151 ++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 +- drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_rx.c | 5 +- drivers/net/ethernet/micrel/ks8851_mll.c | 14 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 186 +++++++------ drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 3 +- .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 7 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 8 - drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 1 - drivers/net/ethernet/sfc/ptp.c | 38 ++- drivers/net/slip/slip.c | 3 + drivers/net/usb/qmi_wwan.c | 3 + drivers/net/wimax/i2400m/op-rfkill.c | 1 + drivers/scsi/libfc/fc_disc.c | 2 + fs/jbd2/transaction.c | 8 +- include/linux/device.h | 7 +- include/linux/mmc/host.h | 1 + kernel/signal.c | 23 +- mm/slub.c | 9 + net/ipv4/cipso_ipv4.c | 7 +- net/mac80211/rx.c | 2 +- net/qrtr/qrtr.c | 2 +- net/wireless/reg.c | 2 +- 45 files changed, 672 insertions(+), 273 deletions(-)
Greg Kroah-Hartman
maintainerQuoted 11 lines · Chris Paterson
Hello Greg,
Quoted 8 lines
From: [email protected] <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 19 March 2020 13:04This is the start of the stable review cycle for the 4.19.112 release. There are 48 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.
Quoted 4 lines
No build/test issues seen for CIP configs for Linux 4.19.112-rc1 (
d078cac7a422).Build/test pipeline/logs: https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/pipelines/128111695
GitLab CI pipeline: https://gitlab.com/cip-project/cip-testing/linux-cip-pipelines/-/blob/master/trees/linux-4.19.y.yml
Great, thanks for testing two of these and letting me know.
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.112 release. There are 48 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 Sat, 21 Mar 2020 12:37:04 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.112-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah