From fb5aca8a9cef2eee7e7c8805699454dad3dc650d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 21 Jan 2020 20:02:42 +0100 Subject: [PATCH] 4.14-stable patches added patches: arm64-dts-meson-gxl-s905x-khadas-vim-fix-gpio-keys-polled-node.patch cfg80211-check-for-set_wiphy_params.patch cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch revert-arm64-dts-juno-add-dma-ranges-property.patch tcp-refine-rule-to-allow-epollout-generation-under-mem-pressure.patch tick-sched-annotate-lockless-access-to-last_jiffies_update.patch xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch --- ...khadas-vim-fix-gpio-keys-polled-node.patch | 40 ++++++ .../cfg80211-check-for-set_wiphy_params.patch | 37 ++++++ ...gnedness-bug-in-cw1200_load_firmware.patch | 39 ++++++ ...m64-dts-juno-add-dma-ranges-property.patch | 57 +++++++++ queue-4.14/series | 7 + ...ollout-generation-under-mem-pressure.patch | 57 +++++++++ ...ckless-access-to-last_jiffies_update.patch | 120 ++++++++++++++++++ ...t-indentation-in-xlvbd_alloc_gendisk.patch | 54 ++++++++ 8 files changed, 411 insertions(+) create mode 100644 queue-4.14/arm64-dts-meson-gxl-s905x-khadas-vim-fix-gpio-keys-polled-node.patch create mode 100644 queue-4.14/cfg80211-check-for-set_wiphy_params.patch create mode 100644 queue-4.14/cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch create mode 100644 queue-4.14/revert-arm64-dts-juno-add-dma-ranges-property.patch create mode 100644 queue-4.14/tcp-refine-rule-to-allow-epollout-generation-under-mem-pressure.patch create mode 100644 queue-4.14/tick-sched-annotate-lockless-access-to-last_jiffies_update.patch create mode 100644 queue-4.14/xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch diff --git a/queue-4.14/arm64-dts-meson-gxl-s905x-khadas-vim-fix-gpio-keys-polled-node.patch b/queue-4.14/arm64-dts-meson-gxl-s905x-khadas-vim-fix-gpio-keys-polled-node.patch new file mode 100644 index 00000000000..6cd823c9a89 --- /dev/null +++ b/queue-4.14/arm64-dts-meson-gxl-s905x-khadas-vim-fix-gpio-keys-polled-node.patch @@ -0,0 +1,40 @@ +From d5f6fa904ecbadbb8e9fa6302b0fc165bec0559a Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Mon, 9 Sep 2019 19:01:22 +0400 +Subject: arm64: dts: meson-gxl-s905x-khadas-vim: fix gpio-keys-polled node + +From: Christian Hewitt + +commit d5f6fa904ecbadbb8e9fa6302b0fc165bec0559a upstream. + +Fix DTC warnings: + +arch/arm/dts/meson-gxl-s905x-khadas-vim.dtb: Warning (avoid_unnecessary_addr_size): + /gpio-keys-polled: unnecessary #address-cells/#size-cells + without "ranges" or child "reg" property + +Fixes: e15d2774b8c0 ("ARM64: dts: meson-gxl: add support for the Khadas VIM board") +Signed-off-by: Christian Hewitt +Reviewed-by: Kevin Hilman +Signed-off-by: Kevin Hilman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +@@ -33,11 +33,9 @@ + + gpio-keys-polled { + compatible = "gpio-keys-polled"; +- #address-cells = <1>; +- #size-cells = <0>; + poll-interval = <100>; + +- button@0 { ++ power-button { + label = "power"; + linux,code = ; + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; diff --git a/queue-4.14/cfg80211-check-for-set_wiphy_params.patch b/queue-4.14/cfg80211-check-for-set_wiphy_params.patch new file mode 100644 index 00000000000..99ebf189189 --- /dev/null +++ b/queue-4.14/cfg80211-check-for-set_wiphy_params.patch @@ -0,0 +1,37 @@ +From 24953de0a5e31dcca7e82c8a3c79abc2dfe8fb6e Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Mon, 13 Jan 2020 12:53:59 +0100 +Subject: cfg80211: check for set_wiphy_params + +From: Johannes Berg + +commit 24953de0a5e31dcca7e82c8a3c79abc2dfe8fb6e upstream. + +Check if set_wiphy_params is assigned and return an error if not, +some drivers (e.g. virt_wifi where syzbot reported it) don't have +it. + +Reported-by: syzbot+e8a797964a4180eb57d5@syzkaller.appspotmail.com +Reported-by: syzbot+34b582cf32c1db008f8e@syzkaller.appspotmail.com +Signed-off-by: Johannes Berg +Link: https://lore.kernel.org/r/20200113125358.ac07f276efff.Ibd85ee1b12e47b9efb00a2adc5cd3fac50da791a@changeid +Signed-off-by: Johannes Berg +Signed-off-by: Greg Kroah-Hartman + +--- + net/wireless/rdev-ops.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/net/wireless/rdev-ops.h ++++ b/net/wireless/rdev-ops.h +@@ -537,6 +537,10 @@ static inline int + rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed) + { + int ret; ++ ++ if (!rdev->ops->set_wiphy_params) ++ return -EOPNOTSUPP; ++ + trace_rdev_set_wiphy_params(&rdev->wiphy, changed); + ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed); + trace_rdev_return_int(&rdev->wiphy, ret); diff --git a/queue-4.14/cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch b/queue-4.14/cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch new file mode 100644 index 00000000000..32f6ce49d93 --- /dev/null +++ b/queue-4.14/cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch @@ -0,0 +1,39 @@ +From 4a50d454502f1401171ff061a5424583f91266db Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Tue, 1 Oct 2019 14:45:01 +0300 +Subject: cw1200: Fix a signedness bug in cw1200_load_firmware() + +From: Dan Carpenter + +commit 4a50d454502f1401171ff061a5424583f91266db upstream. + +The "priv->hw_type" is an enum and in this context GCC will treat it +as an unsigned int so the error handling will never trigger. + +Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets") +Signed-off-by: Dan Carpenter +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/st/cw1200/fwio.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/st/cw1200/fwio.c ++++ b/drivers/net/wireless/st/cw1200/fwio.c +@@ -323,12 +323,12 @@ int cw1200_load_firmware(struct cw1200_c + goto out; + } + +- priv->hw_type = cw1200_get_hw_type(val32, &major_revision); +- if (priv->hw_type < 0) { ++ ret = cw1200_get_hw_type(val32, &major_revision); ++ if (ret < 0) { + pr_err("Can't deduce hardware type.\n"); +- ret = -ENOTSUPP; + goto out; + } ++ priv->hw_type = ret; + + /* Set DPLL Reg value, and read back to confirm writes work */ + ret = cw1200_reg_write_32(priv, ST90TDS_TSET_GEN_R_W_REG_ID, diff --git a/queue-4.14/revert-arm64-dts-juno-add-dma-ranges-property.patch b/queue-4.14/revert-arm64-dts-juno-add-dma-ranges-property.patch new file mode 100644 index 00000000000..86ef3e10ccf --- /dev/null +++ b/queue-4.14/revert-arm64-dts-juno-add-dma-ranges-property.patch @@ -0,0 +1,57 @@ +From 54fb3fe0f211d4729a2551cf9497bd612189af9d Mon Sep 17 00:00:00 2001 +From: Sudeep Holla +Date: Thu, 28 Nov 2019 15:33:57 +0000 +Subject: Revert "arm64: dts: juno: add dma-ranges property" + +From: Sudeep Holla + +commit 54fb3fe0f211d4729a2551cf9497bd612189af9d upstream. + +This reverts commit 193d00a2b35ee3353813b4006a18131122087205. + +Commit 951d48855d86 ("of: Make of_dma_get_range() work on bus nodes") +reworked the logic such that of_dma_get_range() works correctly +starting from a bus node containing "dma-ranges". + +Since on Juno we don't have a SoC level bus node and "dma-ranges" is +present only in the root node, we get the following error: + +OF: translation of DMA address(0) to CPU address failed node(/sram@2e000000) +OF: translation of DMA address(0) to CPU address failed node(/uart@7ff80000) +... +OF: translation of DMA address(0) to CPU address failed node(/mhu@2b1f0000) +OF: translation of DMA address(0) to CPU address failed node(/iommu@2b600000) +OF: translation of DMA address(0) to CPU address failed node(/iommu@2b600000) +OF: translation of DMA address(0) to CPU address failed node(/iommu@2b600000) + +So let's fix it by dropping the "dma-ranges" property for now. This +should be fine since it doesn't represent any kind of device-visible +restriction; it was only there for completeness, and we've since given +in to the assumption that missing "dma-ranges" implies a 1:1 mapping +anyway. + +We can add it later with a proper SoC bus node and moving all the +devices that belong there along with the "dma-ranges" if required. + +Fixes: 193d00a2b35e ("arm64: dts: juno: add dma-ranges property") +Cc: Rob Herring +Cc: Liviu Dudau +Cc: Lorenzo Pieralisi +Acked-by: Robin Murphy +Signed-off-by: Sudeep Holla +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/arm/juno-base.dtsi | 1 - + 1 file changed, 1 deletion(-) + +--- a/arch/arm64/boot/dts/arm/juno-base.dtsi ++++ b/arch/arm64/boot/dts/arm/juno-base.dtsi +@@ -5,7 +5,6 @@ + /* + * Devices shared by all Juno boards + */ +- dma-ranges = <0 0 0 0 0x100 0>; + + memtimer: timer@2a810000 { + compatible = "arm,armv7-timer-mem"; diff --git a/queue-4.14/series b/queue-4.14/series index 5539f1639b0..f0be1d070d6 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -47,3 +47,10 @@ net-wan-fsl_ucc_hdlc-fix-out-of-bounds-write-on-array-utdm_info.patch ptp-free-ptp-device-pin-descriptors-properly.patch r8152-add-missing-endpoint-sanity-check.patch tcp-fix-marked-lost-packets-not-being-retransmitted.patch +xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch +tcp-refine-rule-to-allow-epollout-generation-under-mem-pressure.patch +cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch +arm64-dts-meson-gxl-s905x-khadas-vim-fix-gpio-keys-polled-node.patch +cfg80211-check-for-set_wiphy_params.patch +tick-sched-annotate-lockless-access-to-last_jiffies_update.patch +revert-arm64-dts-juno-add-dma-ranges-property.patch diff --git a/queue-4.14/tcp-refine-rule-to-allow-epollout-generation-under-mem-pressure.patch b/queue-4.14/tcp-refine-rule-to-allow-epollout-generation-under-mem-pressure.patch new file mode 100644 index 00000000000..064bfaf744e --- /dev/null +++ b/queue-4.14/tcp-refine-rule-to-allow-epollout-generation-under-mem-pressure.patch @@ -0,0 +1,57 @@ +From 216808c6ba6d00169fd2aa928ec3c0e63bef254f Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Thu, 12 Dec 2019 12:55:31 -0800 +Subject: tcp: refine rule to allow EPOLLOUT generation under mem pressure + +From: Eric Dumazet + +commit 216808c6ba6d00169fd2aa928ec3c0e63bef254f upstream. + +At the time commit ce5ec440994b ("tcp: ensure epoll edge trigger +wakeup when write queue is empty") was added to the kernel, +we still had a single write queue, combining rtx and write queues. + +Once we moved the rtx queue into a separate rb-tree, testing +if sk_write_queue is empty has been suboptimal. + +Indeed, if we have packets in the rtx queue, we probably want +to delay the EPOLLOUT generation at the time incoming packets +will free them, making room, but more importantly avoiding +flooding application with EPOLLOUT events. + +Solution is to use tcp_rtx_and_write_queues_empty() helper. + +Fixes: 75c119afe14f ("tcp: implement rb-tree based retransmit queue") +Signed-off-by: Eric Dumazet +Cc: Jason Baron +Cc: Neal Cardwell +Acked-by: Soheil Hassas Yeganeh +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/tcp.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/net/ipv4/tcp.c ++++ b/net/ipv4/tcp.c +@@ -1055,8 +1055,7 @@ do_error: + goto out; + out_err: + /* make sure we wake any epoll edge trigger waiter */ +- if (unlikely(skb_queue_len(&sk->sk_write_queue) == 0 && +- err == -EAGAIN)) { ++ if (unlikely(tcp_rtx_and_write_queues_empty(sk) && err == -EAGAIN)) { + sk->sk_write_space(sk); + tcp_chrono_stop(sk, TCP_CHRONO_SNDBUF_LIMITED); + } +@@ -1440,8 +1439,7 @@ out_err: + sock_zerocopy_put_abort(uarg); + err = sk_stream_error(sk, flags, err); + /* make sure we wake any epoll edge trigger waiter */ +- if (unlikely(skb_queue_len(&sk->sk_write_queue) == 0 && +- err == -EAGAIN)) { ++ if (unlikely(tcp_rtx_and_write_queues_empty(sk) && err == -EAGAIN)) { + sk->sk_write_space(sk); + tcp_chrono_stop(sk, TCP_CHRONO_SNDBUF_LIMITED); + } diff --git a/queue-4.14/tick-sched-annotate-lockless-access-to-last_jiffies_update.patch b/queue-4.14/tick-sched-annotate-lockless-access-to-last_jiffies_update.patch new file mode 100644 index 00000000000..aaa812e4d7c --- /dev/null +++ b/queue-4.14/tick-sched-annotate-lockless-access-to-last_jiffies_update.patch @@ -0,0 +1,120 @@ +From de95a991bb72e009f47e0c4bbc90fc5f594588d5 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Wed, 4 Dec 2019 20:56:19 -0800 +Subject: tick/sched: Annotate lockless access to last_jiffies_update + +From: Eric Dumazet + +commit de95a991bb72e009f47e0c4bbc90fc5f594588d5 upstream. + +syzbot (KCSAN) reported a data-race in tick_do_update_jiffies64(): + +BUG: KCSAN: data-race in tick_do_update_jiffies64 / tick_do_update_jiffies64 + +write to 0xffffffff8603d008 of 8 bytes by interrupt on cpu 1: + tick_do_update_jiffies64+0x100/0x250 kernel/time/tick-sched.c:73 + tick_sched_do_timer+0xd4/0xe0 kernel/time/tick-sched.c:138 + tick_sched_timer+0x43/0xe0 kernel/time/tick-sched.c:1292 + __run_hrtimer kernel/time/hrtimer.c:1514 [inline] + __hrtimer_run_queues+0x274/0x5f0 kernel/time/hrtimer.c:1576 + hrtimer_interrupt+0x22a/0x480 kernel/time/hrtimer.c:1638 + local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1110 [inline] + smp_apic_timer_interrupt+0xdc/0x280 arch/x86/kernel/apic/apic.c:1135 + apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 + arch_local_irq_restore arch/x86/include/asm/paravirt.h:756 [inline] + kcsan_setup_watchpoint+0x1d4/0x460 kernel/kcsan/core.c:436 + check_access kernel/kcsan/core.c:466 [inline] + __tsan_read1 kernel/kcsan/core.c:593 [inline] + __tsan_read1+0xc2/0x100 kernel/kcsan/core.c:593 + kallsyms_expand_symbol.constprop.0+0x70/0x160 kernel/kallsyms.c:79 + kallsyms_lookup_name+0x7f/0x120 kernel/kallsyms.c:170 + insert_report_filterlist kernel/kcsan/debugfs.c:155 [inline] + debugfs_write+0x14b/0x2d0 kernel/kcsan/debugfs.c:256 + full_proxy_write+0xbd/0x100 fs/debugfs/file.c:225 + __vfs_write+0x67/0xc0 fs/read_write.c:494 + vfs_write fs/read_write.c:558 [inline] + vfs_write+0x18a/0x390 fs/read_write.c:542 + ksys_write+0xd5/0x1b0 fs/read_write.c:611 + __do_sys_write fs/read_write.c:623 [inline] + __se_sys_write fs/read_write.c:620 [inline] + __x64_sys_write+0x4c/0x60 fs/read_write.c:620 + do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 + entry_SYSCALL_64_after_hwframe+0x44/0xa9 + +read to 0xffffffff8603d008 of 8 bytes by task 0 on cpu 0: + tick_do_update_jiffies64+0x2b/0x250 kernel/time/tick-sched.c:62 + tick_nohz_update_jiffies kernel/time/tick-sched.c:505 [inline] + tick_nohz_irq_enter kernel/time/tick-sched.c:1257 [inline] + tick_irq_enter+0x139/0x1c0 kernel/time/tick-sched.c:1274 + irq_enter+0x4f/0x60 kernel/softirq.c:354 + entering_irq arch/x86/include/asm/apic.h:517 [inline] + entering_ack_irq arch/x86/include/asm/apic.h:523 [inline] + smp_apic_timer_interrupt+0x55/0x280 arch/x86/kernel/apic/apic.c:1133 + apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 + native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60 + arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:571 + default_idle_call+0x1e/0x40 kernel/sched/idle.c:94 + cpuidle_idle_call kernel/sched/idle.c:154 [inline] + do_idle+0x1af/0x280 kernel/sched/idle.c:263 + cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:355 + rest_init+0xec/0xf6 init/main.c:452 + arch_call_rest_init+0x17/0x37 + start_kernel+0x838/0x85e init/main.c:786 + x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:490 + x86_64_start_kernel+0x72/0x76 arch/x86/kernel/head64.c:471 + secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241 + +Reported by Kernel Concurrency Sanitizer on: +CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.0-rc7+ #0 +Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 + +Use READ_ONCE() and WRITE_ONCE() to annotate this expected race. + +Reported-by: syzbot +Signed-off-by: Eric Dumazet +Signed-off-by: Thomas Gleixner +Link: https://lore.kernel.org/r/20191205045619.204946-1-edumazet@google.com +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/time/tick-sched.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +--- a/kernel/time/tick-sched.c ++++ b/kernel/time/tick-sched.c +@@ -60,8 +60,9 @@ static void tick_do_update_jiffies64(kti + + /* + * Do a quick check without holding jiffies_lock: ++ * The READ_ONCE() pairs with two updates done later in this function. + */ +- delta = ktime_sub(now, last_jiffies_update); ++ delta = ktime_sub(now, READ_ONCE(last_jiffies_update)); + if (delta < tick_period) + return; + +@@ -72,8 +73,9 @@ static void tick_do_update_jiffies64(kti + if (delta >= tick_period) { + + delta = ktime_sub(delta, tick_period); +- last_jiffies_update = ktime_add(last_jiffies_update, +- tick_period); ++ /* Pairs with the lockless read in this function. */ ++ WRITE_ONCE(last_jiffies_update, ++ ktime_add(last_jiffies_update, tick_period)); + + /* Slow path for long timeouts */ + if (unlikely(delta >= tick_period)) { +@@ -81,8 +83,10 @@ static void tick_do_update_jiffies64(kti + + ticks = ktime_divns(delta, incr); + +- last_jiffies_update = ktime_add_ns(last_jiffies_update, +- incr * ticks); ++ /* Pairs with the lockless read in this function. */ ++ WRITE_ONCE(last_jiffies_update, ++ ktime_add_ns(last_jiffies_update, ++ incr * ticks)); + } + do_timer(++ticks); + diff --git a/queue-4.14/xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch b/queue-4.14/xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch new file mode 100644 index 00000000000..319dbd85f39 --- /dev/null +++ b/queue-4.14/xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch @@ -0,0 +1,54 @@ +From 589b72894f53124a39d1bb3c0cecaf9dcabac417 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Mon, 9 Dec 2019 13:14:44 -0700 +Subject: xen/blkfront: Adjust indentation in xlvbd_alloc_gendisk +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Nathan Chancellor + +commit 589b72894f53124a39d1bb3c0cecaf9dcabac417 upstream. + +Clang warns: + +../drivers/block/xen-blkfront.c:1117:4: warning: misleading indentation; +statement is not part of the previous 'if' [-Wmisleading-indentation] + nr_parts = PARTS_PER_DISK; + ^ +../drivers/block/xen-blkfront.c:1115:3: note: previous statement is here + if (err) + ^ + +This is because there is a space at the beginning of this line; remove +it so that the indentation is consistent according to the Linux kernel +coding style and clang no longer warns. + +While we are here, the previous line has some trailing whitespace; clean +that up as well. + +Fixes: c80a420995e7 ("xen-blkfront: handle Xen major numbers other than XENVBD") +Link: https://github.com/ClangBuiltLinux/linux/issues/791 +Signed-off-by: Nathan Chancellor +Reviewed-by: Juergen Gross +Acked-by: Roger Pau Monné +Signed-off-by: Juergen Gross +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/xen-blkfront.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/block/xen-blkfront.c ++++ b/drivers/block/xen-blkfront.c +@@ -1115,8 +1115,8 @@ static int xlvbd_alloc_gendisk(blkif_sec + if (!VDEV_IS_EXTENDED(info->vdevice)) { + err = xen_translate_vdev(info->vdevice, &minor, &offset); + if (err) +- return err; +- nr_parts = PARTS_PER_DISK; ++ return err; ++ nr_parts = PARTS_PER_DISK; + } else { + minor = BLKIF_MINOR_EXT(info->vdevice); + nr_parts = PARTS_PER_EXT_DISK; -- 2.47.3