stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Ben Greear <greearb@candelatech.com>,
	Johannes Berg <johannes.berg@intel.com>
Subject: [ 068/100] mac80211: Fix crash due to un-canceled work-items
Date: Tue, 12 Mar 2013 15:31:53 -0700	[thread overview]
Message-ID: <20130312223130.243283379@linuxfoundation.org> (raw)
In-Reply-To: <20130312223122.884099393@linuxfoundation.org>

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

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

From: Ben Greear <greearb@candelatech.com>

commit 499218595a2e8296b7492af32fcca141b7b8184a upstream.

Some mlme work structs are not cancelled on disassociation
nor interface deletion, which leads to them running after
the memory has been freed

There is not a clean way to cancel these in the disassociation
logic because they must be canceled outside of the ifmgd->mtx
lock, so just cancel them in mgd_stop logic that tears down
the station.

This fixes the crashes we see in 3.7.9+.  The crash stack
trace itself isn't so helpful, but this warning gives
more useful info:

WARNING: at /home/greearb/git/linux-3.7.dev.y/lib/debugobjects.c:261 debug_print_object+0x7c/0x8d()
ODEBUG: free active (active state 0) object type: work_struct hint: ieee80211_sta_monitor_work+0x0/0x14 [mac80211]
Modules linked in: [...]
Pid: 14743, comm: iw Tainted: G         C O 3.7.9+ #11
Call Trace:
 [<ffffffff81087ef8>] warn_slowpath_common+0x80/0x98
 [<ffffffff81087fa4>] warn_slowpath_fmt+0x41/0x43
 [<ffffffff812a2608>] debug_print_object+0x7c/0x8d
 [<ffffffff812a2bca>] debug_check_no_obj_freed+0x95/0x1c3
 [<ffffffff8114cc69>] slab_free_hook+0x70/0x79
 [<ffffffff8114ea3e>] kfree+0x62/0xb7
 [<ffffffff8149f465>] netdev_release+0x39/0x3e
 [<ffffffff8136ad67>] device_release+0x52/0x8a
 [<ffffffff812937db>] kobject_release+0x121/0x158
 [<ffffffff81293612>] kobject_put+0x4c/0x50
 [<ffffffff8148f0d7>] netdev_run_todo+0x25c/0x27e

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/mac80211/mlme.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4072,6 +4072,17 @@ void ieee80211_mgd_stop(struct ieee80211
 {
 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 
+	/*
+	 * Make sure some work items will not run after this,
+	 * they will not do anything but might not have been
+	 * cancelled when disconnecting.
+	 */
+	cancel_work_sync(&ifmgd->monitor_work);
+	cancel_work_sync(&ifmgd->beacon_connection_loss_work);
+	cancel_work_sync(&ifmgd->request_smps_work);
+	cancel_work_sync(&ifmgd->csa_connection_drop_work);
+	cancel_work_sync(&ifmgd->chswitch_work);
+
 	mutex_lock(&ifmgd->mtx);
 	if (ifmgd->assoc_data)
 		ieee80211_destroy_assoc_data(sdata, false);



  parent reply	other threads:[~2013-03-12 22:31 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 22:30 [ 000/100] 3.8.3-stable review Greg Kroah-Hartman
2013-03-12 22:30 ` [ 001/100] ARM: VFP: fix emulation of second VFP instruction Greg Kroah-Hartman
2013-03-12 22:30 ` [ 002/100] ARM: fix scheduling while atomic warning in alignment handling code Greg Kroah-Hartman
2013-03-12 22:30 ` [ 003/100] ARM: 7653/2: do not scale loops_per_jiffy when using a constant delay clock Greg Kroah-Hartman
2013-03-12 22:30 ` [ 004/100] ARM: 7654/1: Preserve L_PTE_VALID in pte_modify() Greg Kroah-Hartman
2013-03-12 22:30 ` [ 005/100] USB: EHCI: revert "remove ASS/PSS polling timeout" Greg Kroah-Hartman
2013-03-12 22:30 ` [ 006/100] xenbus: fix compile failure on ARM with Xen enabled Greg Kroah-Hartman
2013-03-12 22:30 ` [ 007/100] xen/pat: Disable PAT using pat_enabled value Greg Kroah-Hartman
2013-03-12 22:30 ` [ 008/100] xen/pci: We dont do multiple MSIs Greg Kroah-Hartman
2013-03-12 22:30 ` [ 009/100] watchdog: da9055_wdt needs to select WATCHDOG_CORE Greg Kroah-Hartman
2013-03-12 22:30 ` [ 010/100] watchdog: sp5100_tco: Fix wrong indirect I/O access for getting value of reserved bits Greg Kroah-Hartman
2013-03-12 22:30 ` [ 011/100] watchdog: sp5100_tco: Write back the original value to reserved bits, instead of zero Greg Kroah-Hartman
2013-03-12 22:30 ` [ 012/100] sony-laptop: fully enable SNY controlled modems Greg Kroah-Hartman
2013-03-12 22:30 ` [ 013/100] SCSI: dc395x: uninitialized variable in device_alloc() Greg Kroah-Hartman
2013-03-12 22:30 ` [ 014/100] SCSI: storvsc: Initialize the sglist Greg Kroah-Hartman
2013-03-12 22:31 ` [ 015/100] target/pscsi: Fix page increment Greg Kroah-Hartman
2013-03-12 22:31 ` [ 016/100] iscsi-target: Fix immediate queue starvation regression with DATAIN Greg Kroah-Hartman
2013-03-12 22:31 ` [ 017/100] ext4: convert number of blocks to clusters properly Greg Kroah-Hartman
2013-03-12 22:31 ` [ 018/100] btrfs: Init io_lock after cloning btrfs device struct Greg Kroah-Hartman
2013-03-12 22:31 ` [ 019/100] Btrfs: copy everything if weve created an inline extent Greg Kroah-Hartman
2013-03-12 22:31 ` [ 020/100] Btrfs: delete inline extents when we find them during logging Greg Kroah-Hartman
2013-03-12 22:31 ` [ 021/100] cifs: ensure that cifs_get_root() only traverses directories Greg Kroah-Hartman
2013-03-12 22:31 ` [ 022/100] dm: fix truncated status strings Greg Kroah-Hartman
2013-03-12 22:31 ` [ 023/100] dm: do not replace bioset for request based dm Greg Kroah-Hartman
2013-03-12 22:31 ` [ 024/100] dm: fix limits initialization when there are no data devices Greg Kroah-Hartman
2013-03-12 22:31 ` [ 025/100] dm snapshot: add missing module aliases Greg Kroah-Hartman
2013-03-12 22:31 ` [ 026/100] NFS: Dont allow NFS silly-renamed files to be deleted, no signal Greg Kroah-Hartman
2013-03-12 22:31 ` [ 027/100] SUNRPC: Dont start the retransmission timer when out of socket space Greg Kroah-Hartman
2013-03-12 22:31 ` [ 028/100] pnfs: fix resend_to_mds for directio Greg Kroah-Hartman
2013-03-12 22:31 ` [ 029/100] NFSv4.1: Hold reference to layout hdr in layoutget Greg Kroah-Hartman
2013-03-14  1:22   ` Ben Hutchings
2013-03-12 22:31 ` [ 030/100] hw_random: make buffer usable in scatterlist Greg Kroah-Hartman
2013-03-12 22:31 ` [ 031/100] iwlwifi: always copy first 16 bytes of commands Greg Kroah-Hartman
2013-03-14  1:50   ` Ben Hutchings
2013-03-14  2:05     ` Ben Hutchings
2013-03-14  6:31       ` Berg, Johannes
2013-03-14 14:23         ` Ben Hutchings
2013-03-12 22:31 ` [ 032/100] mwifiex: correct sleep delay counter Greg Kroah-Hartman
2013-03-12 22:31 ` [ 033/100] libertas: fix crash for SD8688 Greg Kroah-Hartman
2013-03-12 22:31 ` [ 034/100] ath9k: fix RSSI dummy marker value Greg Kroah-Hartman
2013-03-12 22:31 ` [ 035/100] ath9k_htc: fix signal strength handling issues Greg Kroah-Hartman
2013-03-12 22:31 ` [ 036/100] ath9k_hw: improve reset reliability after errors Greg Kroah-Hartman
2013-03-12 22:31 ` [ 037/100] proc connector: reject unprivileged listener bumps Greg Kroah-Hartman
2013-03-12 22:31 ` [ 038/100] nohz: Make tick_nohz_irq_exit() irq safe Greg Kroah-Hartman
2013-03-12 22:31 ` [ 039/100] md: protect against crash upon fsync on ro array Greg Kroah-Hartman
2013-03-12 22:31 ` [ 040/100] md: fix two bugs when attempting to resize RAID0 array Greg Kroah-Hartman
2013-03-12 22:31 ` [ 041/100] md: raid0: fix error return from create_stripe_zones Greg Kroah-Hartman
2013-03-12 22:31 ` [ 042/100] md/raid1,raid10: fix deadlock with freeze_array() Greg Kroah-Hartman
2013-03-12 22:31 ` [ 043/100] hwmon: (sht15) Check return value of regulator_enable() Greg Kroah-Hartman
2013-03-12 22:31 ` [ 044/100] hwmon: (pmbus/ltc2978) Fix peak attribute handling Greg Kroah-Hartman
2013-03-12 22:31 ` [ 045/100] hwmon: (pmbus/ltc2978) Use detected chip ID to select supported functionality Greg Kroah-Hartman
2013-03-12 22:31 ` [ 046/100] drm/radeon: dont set hpd, afmt interrupts when interrupts are disabled Greg Kroah-Hartman
2013-03-12 22:31 ` [ 047/100] drm/radeon: add primary dac adj quirk for R200 board Greg Kroah-Hartman
2013-03-12 22:31 ` [ 048/100] ARM: 7657/1: head: fix swapper and idmap population with LPAE and big-endian Greg Kroah-Hartman
2013-03-12 22:31 ` [ 049/100] ARM: 7658/1: mm: fix race updating mm->context.id on ASID rollover Greg Kroah-Hartman
2013-03-12 22:31 ` [ 050/100] ARM: 7659/1: mm: make mm->context.id an atomic64_t variable Greg Kroah-Hartman
2013-03-12 22:31 ` [ 051/100] ARM: 7663/1: perf: fix ARMv7 EVTYPE_MASK to include NSH bit Greg Kroah-Hartman
2013-03-12 22:31 ` [ 052/100] drm/i915: Increase the RC6p threshold Greg Kroah-Hartman
2013-03-18  1:11   ` Ben Hutchings
2013-03-18 19:38     ` Greg Kroah-Hartman
     [not found]       ` <CADMs+9bmi2fNMV=9OaL-JvBJxu1=HWMYAVMm81v7rKDPnDyewA@mail.gmail.com>
2013-03-18 19:50         ` Greg Kroah-Hartman
2013-03-12 22:31 ` [ 053/100] drm/i915: Fix Haswell/CRW PCI IDs Greg Kroah-Hartman
2013-03-12 22:31 ` [ 054/100] drm/i915: reorder setup sequence to have irqs for output setup Greg Kroah-Hartman
2013-03-12 22:31 ` [ 055/100] drm/i915: enable irqs earlier when resuming Greg Kroah-Hartman
2013-03-12 22:31 ` [ 056/100] drm/i915: Turn off hsync and vsync on ADPA when disabling crt Greg Kroah-Hartman
2013-03-12 22:31 ` [ 057/100] ipc: fix potential oops when src msg > 4k w/ MSG_COPY Greg Kroah-Hartman
2013-03-12 22:31 ` [ 058/100] ipc: dont allocate a copy larger than max Greg Kroah-Hartman
2013-03-12 22:31 ` [ 059/100] dmi_scan: fix missing check for _DMI_ signature in smbios_present() Greg Kroah-Hartman
2013-03-12 22:31 ` [ 060/100] ALSA: ice1712: Initialize card->private_data properly Greg Kroah-Hartman
2013-03-12 22:31 ` [ 061/100] ALSA: vmaster: Fix slave change notification Greg Kroah-Hartman
2013-03-12 22:31 ` [ 062/100] vfs: dont BUG_ON() if following a /proc fd pseudo-symlink results in a symlink Greg Kroah-Hartman
2013-03-12 22:31 ` [ 063/100] proc: Use nd_jump_link in proc_ns_follow_link Greg Kroah-Hartman
2013-03-12 22:31 ` [ 064/100] tile: work around bug in the generic sys_llseek Greg Kroah-Hartman
2013-03-12 22:31 ` [ 065/100] random: fix locking dependency with the tasklist_lock Greg Kroah-Hartman
2013-03-12 22:31 ` [ 066/100] mm/mempolicy.c: fix wrong sp_node insertion Greg Kroah-Hartman
2013-03-12 22:31 ` [ 067/100] CIFS: Fix missing of oplock_read value in smb30_values structure Greg Kroah-Hartman
2013-03-12 22:31 ` Greg Kroah-Hartman [this message]
2013-03-12 22:31 ` [ 069/100] e1000e: fix pci-device enable-counter balance Greg Kroah-Hartman
2013-03-13  7:52   ` Konstantin Khlebnikov
2013-03-13  8:28     ` Konstantin Khlebnikov
2013-03-12 22:31 ` [ 070/100] tg3: Update link_up flag for phylib devices Greg Kroah-Hartman
2013-03-12 22:31 ` [ 071/100] efivars: efivarfs_valid_name() should handle pstore syntax Greg Kroah-Hartman
2013-03-12 22:31 ` [ 072/100] efivarfs: return accurate error code in efivarfs_fill_super() Greg Kroah-Hartman
2013-03-12 22:31 ` [ 073/100] userns: Stop oopsing in key_change_session_keyring Greg Kroah-Hartman
2013-03-12 22:31 ` [ 074/100] x86: pvclock kvm: align allocation size to page size Greg Kroah-Hartman
2013-03-12 22:32 ` [ 075/100] HID: logitech-dj: do not directly call hid_output_raw_report() during probe Greg Kroah-Hartman
2013-03-12 22:32 ` [ 076/100] Btrfs: account for orphan inodes properly during cleanup Greg Kroah-Hartman
2013-03-12 22:32 ` [ 077/100] Btrfs: cleanup orphan reservation if truncate fails Greg Kroah-Hartman
2013-03-12 22:32 ` [ 078/100] x86/kvm: Fix pvclock vsyscall fixmap Greg Kroah-Hartman
2013-03-12 22:32 ` [ 079/100] mfd: rtsx: Optimize card detect flow Greg Kroah-Hartman
2013-03-12 22:32 ` [ 080/100] mfd: rtsx: Fix issue that booting OS with SD card inserted Greg Kroah-Hartman
2013-03-12 22:32 ` [ 081/100] crypto: user - fix info leaks in report API Greg Kroah-Hartman
2013-03-12 22:32 ` [ 082/100] acer-wmi: avoid the warning of devices may be used uninitialized Greg Kroah-Hartman
2013-03-12 22:32 ` [ 083/100] usbnet: smsc95xx: fix suspend failure Greg Kroah-Hartman
2013-03-12 22:32 ` [ 084/100] keys: fix race with concurrent install_user_keyrings() Greg Kroah-Hartman
2013-03-12 22:32 ` [ 085/100] Fix: compat_rw_copy_check_uvector() misuse in aio, readv, writev, and security keys Greg Kroah-Hartman
2013-03-12 22:32 ` [ 086/100] vfs: fix pipe counter breakage Greg Kroah-Hartman
2013-03-12 22:32 ` [ 087/100] rtc: rtc-mv: Add support for clk to avoid lockups Greg Kroah-Hartman
2013-03-12 22:32 ` [ 088/100] gpio: mvebu: Add clk support to prevent lockup Greg Kroah-Hartman
2013-03-12 22:32 ` [ 089/100] ARM: mxs_defconfig: Make USB host functional again Greg Kroah-Hartman
2013-03-12 22:32 ` [ 090/100] ARM: kirkwood: of_serial: fix clock gating by removing clock-frequency Greg Kroah-Hartman
2013-03-12 22:32 ` [ 091/100] powerpc: Apply early paca fixups to boot_paca and the boot cpus paca Greg Kroah-Hartman
2013-03-12 22:32 ` [ 092/100] ftrace: Update the kconfig for DYNAMIC_FTRACE Greg Kroah-Hartman
2013-03-12 22:32 ` [ 093/100] efivars: Disable external interrupt while holding efivars->lock Greg Kroah-Hartman
2013-03-12 22:32 ` [ 094/100] efi: be more paranoid about available space when creating variables Greg Kroah-Hartman
2013-03-12 22:32 ` [ 095/100] USB: Dont use EHCI port sempahore for USB 3.0 hubs Greg Kroah-Hartman
2013-03-12 22:32 ` [ 096/100] USB: Prepare for refactoring by adding extra udev checks Greg Kroah-Hartman
2013-03-12 22:32 ` [ 097/100] USB: Rip out recursive call on warm port reset Greg Kroah-Hartman
2013-03-12 22:32 ` [ 098/100] USB: Fix connected device switch to Inactive state Greg Kroah-Hartman
2013-03-12 22:32 ` [ 099/100] Revert "xen/blkback: Dont trust the handle from the frontend." Greg Kroah-Hartman
2013-03-12 22:32 ` [ 100/100] w1-gpio: fix section mismatch Greg Kroah-Hartman
2013-03-13  3:56 ` [ 000/100] 3.8.3-stable review Shuah Khan
2013-03-13  4:28   ` Greg Kroah-Hartman
2013-03-13  8:02 ` Andre Heider
2013-03-13  8:33   ` David Miller
2013-03-13  9:13     ` Andre Heider

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=20130312223130.243283379@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=greearb@candelatech.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).