mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luis Henriques <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kernel-team@lists.ubuntu.com
Cc: Daeseok Youn <daeseok.youn@gmail.com>, Tejun Heo <tj@kernel.org>,
	Luis Henriques <luis.henriques@canonical.com>
Subject: [PATCH 3.11 044/138] workqueue: fix bugs in wq_update_unbound_numa() failure path
Date: Tue,  3 Jun 2014 12:38:10 +0100	[thread overview]
Message-ID: <1401795584-22664-45-git-send-email-luis.henriques@canonical.com> (raw)
In-Reply-To: <1401795584-22664-1-git-send-email-luis.henriques@canonical.com>

3.11.10.11 -stable review patch.  If anyone has any objections, please let me know.

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

From: Daeseok Youn <daeseok.youn@gmail.com>

commit 77f300b198f93328c26191b52655ce1b62e202cf upstream.

wq_update_unbound_numa() failure path has the following two bugs.

- alloc_unbound_pwq() is called without holding wq->mutex; however, if
  the allocation fails, it jumps to out_unlock which tries to unlock
  wq->mutex.

- The function should switch to dfl_pwq on failure but didn't do so
  after alloc_unbound_pwq() failure.

Fix it by regrabbing wq->mutex and jumping to use_dfl_pwq on
alloc_unbound_pwq() failure.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Acked-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 4c16bd327c74 ("workqueue: implement NUMA affinity for unbound workqueues")
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 kernel/workqueue.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index d06e6e15ac02..a8b0147f3a89 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4061,7 +4061,8 @@ static void wq_update_unbound_numa(struct workqueue_struct *wq, int cpu,
 	if (!pwq) {
 		pr_warning("workqueue: allocation failed while updating NUMA affinity of \"%s\"\n",
 			   wq->name);
-		goto out_unlock;
+		mutex_lock(&wq->mutex);
+		goto use_dfl_pwq;
 	}
 
 	/*
-- 
1.9.1


  parent reply	other threads:[~2014-06-03 11:41 UTC|newest]

Thread overview: 139+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 11:37 [3.11.y.z extended stable] Linux 3.11.10.11 stable review Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 001/138] rt2x00: fix beaconing on USB Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 002/138] rtlwifi: rtl8188ee: initialize packet_beacon Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 003/138] Input: synaptics - add min/max quirk for ThinkPad Edge E431 Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 004/138] Input: atkbd - fix keyboard not working on some LG laptops Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 005/138] Bluetooth: Fix triggering BR/EDR L2CAP Connect too early Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 006/138] Bluetooth: Fix redundant encryption request for reauthentication Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 007/138] Bluetooth: Add support for Lite-on [04ca:3007] Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 008/138] drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc() Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 009/138] iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 010/138] rtl8192cu: Fix unbalanced irq enable in error path of rtl92cu_hw_init() Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 011/138] usb: gadget: at91-udc: fix irq and iomem resource retrieval Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 012/138] drm/radeon: use pflip irq on R600+ v2 Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 013/138] drm/radeon: check buffer relocation offset Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 014/138] drm/nouveau/acpi: allow non-optimus setups to load vbios from acpi Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 015/138] drm/nouveau: fix another lock unbalance in nouveau_crtc_page_flip Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 016/138] ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback data Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 017/138] USB: OHCI: fix problem with global suspend on ATI controllers Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 018/138] usb: qcserial: add a number of Dell devices Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 019/138] usb: storage: shuttle_usbat: fix discs being detected twice Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 020/138] fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6 Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 021/138] tty: serial: 8250_core.c Bug fix for Exar chips Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 022/138] drivers/tty/hvc: don't free hvc_console_setup after init Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 023/138] USB: Nokia 305 should be treated as unusual dev Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 024/138] USB: Nokia 5300 " Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 025/138] HID: usbhid: quirk for Synaptics HD touchscreen Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 026/138] HID: usbhid: quirk for Synaptics Quad " Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 027/138] HID: add NO_INIT_REPORTS quirk for Synaptics Touch Pad V 103S Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 028/138] Input: elantech - fix touchpad initialization on Gigabyte U2442 Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 029/138] posix_acl: handle NULL ACL in posix_acl_equiv_mode Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 030/138] mm/compaction: make isolate_freepages start at pageblock boundary Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 031/138] trace: module: Maintain a valid user count Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 032/138] mtd: nuc900_nand: NULL dereference in nuc900_nand_enable() Luis Henriques
2014-06-03 11:37 ` [PATCH 3.11 033/138] mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes() Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 034/138] ACPI / EC: Clear stale EC events on Samsung systems Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 035/138] ACPI / EC: Process rather than discard events in acpi_ec_clear Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 036/138] powerpc/tm: Disable IRQ in tm_recheckpoint Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 037/138] rtlwifi: rtl8192se: Fix regression due to commit 1bf4bbb Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 038/138] drm: cirrus: add power management support Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 039/138] powerpc: Add vr save/restore functions Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 040/138] x86/efi: Correct EFI boot stub use of code32_start Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 041/138] tracepoint: Do not waste memory on mods with no tracepoints Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 042/138] rbd: fix error paths in rbd_img_request_fill() Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 043/138] percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree() Luis Henriques
2014-06-03 11:38 ` Luis Henriques [this message]
2014-06-03 11:38 ` [PATCH 3.11 045/138] [media] fc2580: fix tuning failure on 32-bit arch Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 046/138] memory: mvebu-devbus: fix the conversion of the bus width Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 047/138] workqueue: make rescuer_thread() empty wq->maydays list before exiting Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 048/138] workqueue: fix a possible race condition between rescuer and pwq-release Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 049/138] PCI: mvebu: fix off-by-one in the computed size of the mbus windows Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 050/138] bus: mvebu-mbus: allow several windows with the same target/attribute Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 051/138] ARM: mvebu: fix NOR bus-width in Armada XP GP Device Tree Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 052/138] ARM: mvebu: fix NOR bus-width in Armada XP DB " Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 053/138] ARM: mvebu: fix NOR bus-width in Armada XP OpenBlocks AX3 " Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 054/138] crypto: caam - add allocation failure handling in SPRINTFCAT macro Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 055/138] [media] media-device: fix infoleak in ioctl media_enum_entities() Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 056/138] md: avoid possible spinning md thread at shutdown Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 057/138] NFSd: Move default initialisers from create_client() to alloc_client() Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 058/138] NFSd: call rpc_destroy_wait_queue() from free_client() Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 059/138] libata: clean up ZPODD when a port is detached Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 060/138] ACPI / blacklist: Add dmi_enable_osi_linux quirk for Asus EEE PC 1015PX Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 061/138] ACPI / processor: do not mark present at boot but not onlined CPU as onlined Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 062/138] NFSD: Call ->set_acl with a NULL ACL structure if no entries Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 063/138] gpio: mcp23s08: trivial: fixed coding style issues Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 064/138] gpio: mcp23s08: Bug fix of SPI device tree registration Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 065/138] ARM: dts: i.MX53: Fix ipu register space size Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 066/138] mm, thp: close race between mremap() and split_huge_page() Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 067/138] powerpc/powernv: Reset root port in firmware Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 068/138] hrtimer: Set expiry time before switch_hrtimer_base() Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 069/138] hwmon: (emc1403) fix inverted store_hyst() Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 070/138] hwmon: (emc1403) Support full range of known chip revision numbers Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 071/138] iommu/amd: Fix interrupt remapping for aliased devices Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 072/138] ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 073/138] [media] V4L2: ov7670: fix a wrong index, potentially Oopsing the kernel from user-space Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 074/138] [media] V4L2: fix VIDIOC_CREATE_BUFS in 64- / 32-bit compatibility mode Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 075/138] x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow() Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 076/138] i2c: s3c2410: resume race fix Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 077/138] i2c: rcar: bail out on zero length transfers Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 078/138] dm crypt: fix cpu hotplug crash by removing per-cpu structure Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 079/138] metag: fix memory barriers Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 080/138] metag: Reduce maximum stack size to 256MB Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 081/138] x86-64, modify_ldt: Make support for 16-bit segments a runtime option Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 082/138] drm/i915: restore backlight precision when converting from ACPI Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 083/138] PCI: shpchp: Check bridge's secondary (not primary) bus speed Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 084/138] Target/iser: Fix wrong connection requests list addition Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 085/138] Target/iser: Fix iscsit_accept_np and rdma_cm racy flow Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 086/138] iscsi-target: Change BUG_ON to REJECT in iscsit_process_nop_out Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 087/138] target: Don't allow setting WC emulation if device doesn't support Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 088/138] mips: dts: Fix missing device_type="memory" property in memory nodes Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 089/138] arm64: fix pud_huge() for 2-level pagetables Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 090/138] libceph: fix corruption when using page_count 0 page in rbd Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 091/138] clk: tegra: Fix wrong value written to PLLE_AUX Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 092/138] ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr Luis Henriques
2014-06-03 11:38 ` [PATCH 3.11 093/138] ARM: perf: hook up perf_sample_event_took around pmu irq handling Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 094/138] list: introduce list_next_entry() and list_prev_entry() Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 095/138] net: sctp: wake up all assocs if sndbuf policy is per socket Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 096/138] net: sctp: test if association is dead in sctp_wake_up_waiters Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 097/138] l2tp: take PMTU from tunnel UDP socket Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 098/138] net: core: don't account for udp header size when computing seglen Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 099/138] bonding: Remove debug_fs files when module init fails Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 100/138] bridge: Fix double free and memory leak around br_allowed_ingress Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 101/138] ipv6: Limit mtu to 65575 bytes Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 102/138] gre: don't allow to add the same tunnel twice Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 103/138] net: ipv4: current group_info should be put after using Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 104/138] ipv4: return valid RTA_IIF on ip route get Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 105/138] filter: prevent nla extensions to peek beyond the end of the message Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 106/138] ip6_gre: don't allow to remove the fb_tunnel_dev Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 107/138] vlan: Fix lockdep warning when vlan dev handle notification Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 108/138] tg3: update rx_jumbo_pending ring param only when jumbo frames are enabled Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 109/138] net: sctp: cache auth_enable per endpoint Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 110/138] net: Fix ns_capable check in sock_diag_put_filterinfo Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 111/138] rtnetlink: Warn when interface's information won't fit in our packet Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 112/138] rtnetlink: Only supply IFLA_VF_PORTS information when RTEXT_FILTER_VF is set Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 113/138] ipv6: fib: fix fib dump restart Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 114/138] bridge: Handle IFLA_ADDRESS correctly when creating bridge device Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 115/138] sctp: reset flowi4_oif parameter on route lookup Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 116/138] Revert "macvlan : fix checksums error when we are in bridge mode" Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 117/138] tcp_cubic: fix the range of delayed_ack Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 118/138] net: ipv4: ip_forward: fix inverted local_df test Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 119/138] net: ipv6: send pkttoobig immediately if orig frag size > mtu Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 120/138] ipv4: fib_semantics: increment fib_info_cnt after fib_info allocation Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 121/138] net: cdc_mbim: handle unaccelerated VLAN tagged frames Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 122/138] macvlan: Don't propagate IFF_ALLMULTI changes on down interfaces Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 123/138] ip6_tunnel: fix potential NULL pointer dereference Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 124/138] ipv4: initialise the itag variable in __mkroute_input Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 125/138] net-gro: reset skb->truesize in napi_reuse_skb() Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 126/138] net: qmi_wwan: add Telit LE920 newer firmware support Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 127/138] net: qmi_wwan: fix Cinterion PLXX product ID Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 128/138] net: qmi_wwan: Olivetti Olicard 200 support Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 129/138] net: qmi_wwan: add ZTE MF667 Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 130/138] net: qmi_wwan: add support for Cinterion PXS8 and PHS8 Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 131/138] net: qmi_wwan: add Sierra Wireless EM7355 Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 132/138] net: qmi_wwan: add Sierra Wireless MC73xx Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 133/138] net: qmi_wwan: add Sierra Wireless MC7305/MC7355 Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 134/138] net: qmi_wwan: add Olivetti Olicard 500 Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 135/138] net: qmi_wwan: add Alcatel L800MA Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 136/138] net: qmi_wwan: add a number of CMOTech devices Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 137/138] net: qmi_wwan: add a number of Dell devices Luis Henriques
2014-06-03 11:39 ` [PATCH 3.11 138/138] netfilter: Fix potential use after free in ip6_route_me_harder() Luis Henriques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401795584-22664-45-git-send-email-luis.henriques@canonical.com \
    --to=luis.henriques@canonical.com \
    --cc=daeseok.youn@gmail.com \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®