mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk,
	Stanislav Yakovlev <stas.yakovlev@gmail.com>,
	Stefan Lippers-Hollmann <s.l-h@gmx.de>,
	"John W. Linville" <linville@tuxdriver.com>,
	Cesare Leonardi <celeonar@gmail.com>,
	Ben Hutchings <ben@decadent.org.uk>
Subject: Re: [ 07/91] net/wireless: ipw2200: Fix WARN_ON occurring in wiphy_register called by ipw_pci_probe
Date: Sun, 27 May 2012 16:24:20 -0300	[thread overview]
Message-ID: <20120527192419.GA2638@herton-Z68MA-D2H-B3> (raw)
In-Reply-To: <20120527002508.441168361@linuxfoundation.org>

On Sun, May 27, 2012 at 09:25:13AM +0900, Greg KH wrote:
> 3.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------

As I see, this is not needed on 3.4.x or 3.3.x, since the commit
"ipw2200: Fix order of device registration", wasn't included in 3.4 or
any earlier kernels.

This is fixing an issue introduced on that commit ("ipw2200: Fix order of
device registration"), that moved register_netdev after ipw_wdev_init,
but ipw_wdev_init needs initialization made on ndo_init callback.

Unless there is any plan to include any of the "... Fix order of device
registration" commits on 3.4 stable, I don't see any reason to include
the fix for them.

Besides that, I noted that ipw2100 seems to need a similar fix as below
after the change "ipw2100: Fix order of device registration". ipw2100
will have the same issue I expect: because ipw2100_wdev_init was moved
before register_netdev, the ndo_init callback that runs ipw2100_up will
only execute later with required initialization, after wiphy_register
inside ipw2100_wdev_init runs.

> 
> From: Stanislav Yakovlev <stas.yakovlev@gmail.com>
> 
> commit 7ed85b65ab611ba841d508ae4ff8c45fa0c48c80 upstream.
> 
> The problem was found by Stefan Lippers-Hollmann
> http://marc.info/?l=linux-wireless&m=132720334512946&w=2
> 
> WARNING: at /tmp/buildd/linux-aptosid-3.2/debian/build/source_i386_none/net/wireless/core.c:562 wiphy_register+0x45/0x38d [cfg80211]()
> Hardware name: TravelMate 290 \xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff
> Modules linked in: ipw2200(+) iTCO_wdt libipw joydev drm snd_seq snd_timer snd_seq_device iTCO_vendor_support yenta_socket snd intel_agp i2c_i801 pcmcia_rsrc cfg80211 soundcore parport_pc psmouse parport rng_core snd_page_alloc serio_raw pcspkr i2c_algo_bit intel_gtt pcmcia_core evdev irda crc_ccitt rfkill lib80211 processor container ac battery shpchp pci_hotplug button ext4 mbcache jbd2 crc16 dm_mod sd_mod sr_mod crc_t10dif cdrom ata_generic pata_acpi ata_piix libata scsi_mod firewire_ohci firewire_core crc_itu_t 8139too 8139cp mii uhci_hcd ehci_hcd usbcore usb_common [last unloaded: scsi_wait_scan]
> Pid: 328, comm: modprobe Not tainted 3.2-1.slh.4-aptosid-686 #1
> Call Trace:
> [<c012eaf4>] ? warn_slowpath_common+0x7c/0x8f
> [<e0ff0b3e>] ? wiphy_register+0x45/0x38d [cfg80211]
> [<e0ff0b3e>] ? wiphy_register+0x45/0x38d [cfg80211]
> [<c012eb22>] ? warn_slowpath_null+0x1b/0x1f
> [<e0ff0b3e>] ? wiphy_register+0x45/0x38d [cfg80211]
> [<c01f89d7>] ? internal_create_group+0xf5/0xff
> [<e0a2de1c>] ? ipw_pci_probe+0xa9a/0xbd0 [ipw2200]
> [<c01519f4>] ? arch_local_irq_save+0xf/0x14
> [<c0252986>] ? pci_device_probe+0x53/0x9a
> [<c02c2820>] ? driver_probe_device+0x94/0x124
> [<c0252871>] ? pci_match_id+0x15/0x34
> [<c02c28f0>] ? __driver_attach+0x40/0x5b
> [<c02c1d81>] ? bus_for_each_dev+0x37/0x60
> [<c02c25aa>] ? driver_attach+0x17/0x1a
> [<c02c28b0>] ? driver_probe_device+0x124/0x124
> [<c02c22c4>] ? bus_add_driver+0x92/0x1d1
> [<e099d000>] ? 0xe099cfff
> [<c02c2cb8>] ? driver_register+0x7d/0xd4
> [<c017cd50>] ? jump_label_module_notify+0xec/0x167
> [<e099d000>] ? 0xe099cfff
> [<c0253017>] ? __pci_register_driver+0x32/0x87
> [<e099d000>] ? 0xe099cfff
> [<e099d02e>] ? ipw_init+0x2e/0x72 [ipw2200]
> [<c0101173>] ? do_one_initcall+0x7d/0x132
> [<c0145016>] ? __blocking_notifier_call_chain+0x47/0x4f
> [<c0154a73>] ? sys_init_module+0x13a4/0x159c
> [<c03a639f>] ? sysenter_do_call+0x12/0x28
> 
> This warning appears only if we apply Ben Hutchings' fix
> http://marc.info/?l=linux-wireless&m=132720195012653&w=2
> for the bug reported by Cesare Leonardi
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656813
> with cfg80211 warning during device registration
> ("cfg80211: failed to add phy80211 symlink to netdev!").
> 
> We separate device bring up and registration with network stack
> to avoid the problem.
> 
> After that Ben Hutchings' fix can be applied to fix the bug.
> 
> Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
> Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> ---
>  drivers/net/wireless/ipw2x00/ipw2200.c |   21 ++++++---------------
>  1 file changed, 6 insertions(+), 15 deletions(-)
> 
> --- a/drivers/net/wireless/ipw2x00/ipw2200.c
> +++ b/drivers/net/wireless/ipw2x00/ipw2200.c
> @@ -11443,20 +11443,6 @@ static void ipw_bg_down(struct work_stru
>  	mutex_unlock(&priv->mutex);
>  }
>  
> -/* Called by register_netdev() */
> -static int ipw_net_init(struct net_device *dev)
> -{
> -	int rc = 0;
> -	struct ipw_priv *priv = libipw_priv(dev);
> -
> -	mutex_lock(&priv->mutex);
> -	if (ipw_up(priv))
> -		rc = -EIO;
> -	mutex_unlock(&priv->mutex);
> -
> -	return rc;
> -}
> -
>  static int ipw_wdev_init(struct net_device *dev)
>  {
>  	int i, rc = 0;
> @@ -11722,7 +11708,6 @@ static void ipw_prom_free(struct ipw_pri
>  #endif
>  
>  static const struct net_device_ops ipw_netdev_ops = {
> -	.ndo_init		= ipw_net_init,
>  	.ndo_open		= ipw_net_open,
>  	.ndo_stop		= ipw_net_stop,
>  	.ndo_set_rx_mode	= ipw_net_set_multicast_list,
> @@ -11849,6 +11834,12 @@ static int __devinit ipw_pci_probe(struc
>  		goto out_release_irq;
>  	}
>  
> +	if (ipw_up(priv)) {
> +		mutex_unlock(&priv->mutex);
> +		err = -EIO;
> +		goto out_remove_sysfs;
> +	}
> +
>  	mutex_unlock(&priv->mutex);
>  	err = register_netdev(net_dev);
>  	if (err) {
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
[]'s
Herton

  reply	other threads:[~2012-05-27 19:24 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-27  1:09 [ 00/91] 3.4.1-stable review Greg KH
2012-05-27  0:25 ` [ 01/91] isdn/gigaset: ratelimit CAPI message dumps Greg KH
2012-05-27  0:25 ` [ 02/91] isdn/gigaset: fix CAPI disconnect B3 handling Greg KH
2012-05-27  0:25 ` [ 03/91] isdn/gigaset: improve error handling querying firmware version Greg KH
2012-05-27  0:25 ` [ 04/91] vfs: make AIO use the proper rw_verify_area() area helpers Greg KH
2012-05-27  0:25 ` [ 05/91] iwlwifi: use 6000G2B for 6030 device series Greg KH
2012-05-27 13:34   ` Ben Hutchings
2012-06-01  7:03     ` Greg KH
2012-05-27  0:25 ` [ 06/91] iwlwifi: use correct released ucode version Greg KH
2012-05-27  0:25 ` [ 07/91] net/wireless: ipw2200: Fix WARN_ON occurring in wiphy_register called by ipw_pci_probe Greg KH
2012-05-27 19:24   ` Herton Ronaldo Krzesinski [this message]
2012-05-27 19:50     ` Ben Hutchings
2012-05-27  0:25 ` [ 08/91] cfg80211: warn if db.txt is empty with CONFIG_CFG80211_INTERNAL_REGDB Greg KH
2012-05-27  0:25 ` [ 09/91] regulator: core: Release regulator-regulator supplies on error Greg KH
2012-05-27  0:25 ` [ 10/91] Fix blocking allocations called very early during bootup Greg KH
2012-05-27  0:25 ` [ 11/91] s390/pfault: fix task state race Greg KH
2012-05-27  0:25 ` [ 12/91] SCSI: mpt2sas: Fix for panic happening because of improper memory allocation Greg KH
2012-05-27  0:25 ` [ 13/91] isci: fix oem parameter validation on single controller skus Greg KH
2012-05-27  0:25 ` [ 14/91] RDMA/cxgb4: Always wake up waiters in c4iw_peer_abort_intr() Greg KH
2012-05-27  0:25 ` [ 15/91] RDMA/cxgb4: Use dst parameter in import_ep() Greg KH
2012-05-27  0:25 ` [ 16/91] RDMA/cxgb4: Drop peer_abort when no endpoint found Greg KH
2012-05-27  0:25 ` [ 17/91] powerpc: Fix broken cpu_idle_wait() implementation Greg KH
2012-05-27  0:25 ` [ 18/91] KEYS: Use the compat keyctl() syscall wrapper on Sparc64 for Sparc32 compat Greg KH
2012-05-27  0:25 ` [ 19/91] SELinux: if sel_make_bools errors dont leave inconsistent state Greg KH
2012-05-27  0:25 ` [ 20/91] fbdev: sh_mobile_lcdc: Dont confuse line size with pitch Greg KH
2012-05-27  0:25 ` [ 21/91] IB/core: Fix mismatch between locked and pinned pages Greg KH
2012-05-27  0:25 ` [ 22/91] drivers/staging/comedi/comedi_fops.c: add missing vfree Greg KH
2012-05-27  0:25 ` [ 23/91] perf/x86: Update event scheduling constraints for AMD family 15h models Greg KH
2012-05-27  0:25 ` [ 24/91] HID: wiimote: Fix IR data parser Greg KH
2012-05-27  0:25 ` [ 25/91] usbhid: prevent deadlock during timeout Greg KH
2012-05-27  0:25 ` [ 26/91] HID: logitech: read all 32 bits of report type bitfield Greg KH
2012-05-27  0:25 ` [ 27/91] um: Fix __swp_type() Greg KH
2012-05-27  0:25 ` [ 28/91] um: Implement a custom pte_same() function Greg KH
2012-05-27  0:25 ` [ 29/91] persistent_ram: Fix buffer size clamping during writes Greg KH
2012-05-27  0:25 ` [ 30/91] docs: update HOWTO for 2.6.x -> 3.x versioning Greg KH
2012-05-27  0:25 ` [ 31/91] USB: cdc-wdm: sanitize error returns Greg KH
2012-05-27  0:25 ` [ 32/91] USB: cdc-wdm: fix memory leak Greg KH
2012-05-27  0:25 ` [ 33/91] USB: cdc-wdm: poll must return POLLHUP if device is gone Greg KH
2012-05-27  0:25 ` [ 34/91] USB: cdc-wdm: cannot use dev_printk when " Greg KH
2012-05-27  0:25 ` [ 35/91] USB: cdc-wdm: remove from device list on disconnect Greg KH
2012-05-27  0:25 ` [ 36/91] workqueue: skip nr_running sanity check in worker_enter_idle() if trustee is active Greg KH
2012-05-27  0:25 ` [ 37/91] mm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages Greg KH
2012-05-27  0:25 ` [ 38/91] md: using GFP_NOIO to allocate bio for flush request Greg KH
2012-05-27  0:25 ` [ 39/91] Add missing call to uart_update_timeout() Greg KH
2012-05-27  0:25 ` [ 40/91] 8250.c: less than 2400 baud fix Greg KH
2012-05-27  0:25 ` [ 41/91] 8250_pci: fix pch uart matching Greg KH
2012-05-27  0:25 ` [ 42/91] tty: Allow uart_register/unregister/register Greg KH
2012-05-27  0:25 ` [ 43/91] USB: ftdi-sio: add support for Physik Instrumente E-861 Greg KH
2012-05-27  0:25 ` [ 44/91] usb-serial: ftdi_sio: fix oops during autosuspend Greg KH
2012-05-27  0:25 ` [ 45/91] usb-storage: unusual_devs entry for Yarvik PMP400 MP4 player Greg KH
2012-05-27  0:25 ` [ 46/91] USB: ffs-test: fix length argument of out function call Greg KH
2012-05-27  0:25 ` [ 47/91] usb: usbtest: two super speed fixes for usbtest Greg KH
2012-05-27  0:25 ` [ 48/91] USB: ehci-platform: remove update_device Greg KH
2012-05-27  0:25 ` [ 49/91] USB: EHCI: OMAP: Finish ehci omap phy reset cycle before adding hcd Greg KH
2012-05-27  0:25 ` [ 50/91] USB: gpio_vbus: provide an appropriate debounce interval Greg KH
2012-05-27  0:25 ` [ 51/91] USB: ohci-at91: add a reset function to fix race condition Greg KH
2012-05-27  0:25 ` [ 52/91] USB: Remove races in devio.c Greg KH
2012-05-27  0:25 ` [ 53/91] USB: serial: ti_usb_3410_5052: Add support for the FRI2 serial console Greg KH
2012-05-27  0:26 ` [ 54/91] usb: gadget: fsl_udc_core: dTDs next dtd pointer need to be updated once written Greg KH
2012-05-27  0:26 ` [ 55/91] usb: add USB_QUIRK_RESET_RESUME for M-Audio 88es Greg KH
2012-05-27  0:26 ` [ 56/91] xhci: Add Lynx Point to list of Intel switchable hosts Greg KH
2012-05-27  0:26 ` [ 57/91] xHCI: keep track of ports being resumed and indicate in hub_status_data Greg KH
2012-05-27  0:26 ` [ 58/91] xhci: Avoid dead ports when CONFIG_USB_XHCI_HCD=n Greg KH
2012-05-27  0:26 ` [ 59/91] usb-xhci: Handle COMP_TX_ERR for isoc tds Greg KH
2012-05-27  0:26 ` [ 60/91] xhci: Reset reserved command ring TRBs on cleanup Greg KH
2012-05-27  0:26 ` [ 61/91] xhci: Add new short TX quirk for Fresco Logic host Greg KH
2012-05-27  0:26 ` [ 62/91] USB: fix resource leak in xhci power loss path Greg KH
2012-05-27  0:26 ` [ 63/91] usbcore: enable USB2 LPM if port suspend fails Greg KH
2012-05-27  0:26 ` [ 64/91] gma500: Fix Poulsbo suspend/resume crash on devices with SDVO ports Greg KH
2012-05-27  0:26 ` [ 65/91] b43legacy: Fix error due to MMIO access with SSB unpowered Greg KH
2012-05-27  0:26 ` [ 66/91] drm/i915: Avoid a double-read of PCH_IIR during interrupt handling Greg KH
2012-05-27  0:26 ` [ 67/91] drm/i915: [GEN7] Use HW scheduler for fixed function shaders Greg KH
2012-05-27  0:26 ` [ 68/91] drm/i915: dont clobber the pipe param in sanitize_modesetting Greg KH
2012-05-27  0:26 ` [ 69/91] gpio: mpc8xxx: Prevent NULL pointer deref in demux handler Greg KH
2012-05-27  0:26 ` [ 70/91] spi/spi-fsl-spi: reference correct pdata in fsl_spi_cs_control Greg KH
2012-05-27  0:26 ` [ 71/91] hvc_xen: NULL dereference on allocation failure Greg KH
2012-05-27  0:26 ` [ 72/91] xen: do not map the same GSI twice in PVHVM guests Greg KH
2012-05-27  0:26 ` [ 73/91] nouveau: nouveau_set_bo_placement takes TTM flags Greg KH
2012-05-27  0:26 ` [ 74/91] [media] smsusb: add autodetection support for USB ID 2040:c0a0 Greg KH
2012-05-27  0:26 ` [ 75/91] media: uvcvideo: Fix ENUMINPUT handling Greg KH
2012-05-27  0:26 ` [ 76/91] x86, relocs: Build clean fix Greg KH
2012-05-27  0:26 ` [ 77/91] x86-32, relocs: Whitelist more symbols for ld bug workaround Greg KH
2012-05-27  0:26 ` [ 78/91] x86, relocs: Add jiffies and jiffies_64 to the relative whitelist Greg KH
2012-05-27  0:26 ` [ 79/91] x86/mce: Fix check for processor context when machine check was taken Greg KH
2012-05-27  0:26 ` [ 80/91] mmc: sdio: avoid spurious calls to interrupt handlers Greg KH
2012-05-27  0:26 ` [ 81/91] mmc: cd-gpio: protect against NULL context in mmc_cd_gpio_free() Greg KH
2012-05-27  0:26 ` [ 82/91] mmc: omap_hsmmc: pass IRQF_ONESHOT to request_threaded_irq Greg KH
2012-05-27  0:26 ` [ 83/91] tile: fix bug where fls(0) was not returning 0 Greg KH
2012-05-27  0:26 ` [ 84/91] intel-iommu: Add device info into list before doing context mapping Greg KH
2012-05-27  0:26 ` [ 85/91] iommu: Fix off by one in dmar_get_fault_reason() Greg KH
2012-05-27  0:26 ` [ 86/91] ARM: 7365/1: drop unused parameter from flush_cache_user_range Greg KH
2012-05-27  0:26 ` [ 87/91] ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held Greg KH
2012-05-27  0:26 ` [ 88/91] ARM: dt: tegra cardhu: fix typo in SDHCI node name Greg KH
2012-05-27  0:26 ` [ 89/91] MCE: Fix vm86 handling for 32bit mce handler Greg KH
2012-05-27  0:26 ` [ 90/91] i2c: davinci: Free requested IRQ in remove Greg KH
2012-05-27  0:26 ` [ 91/91] i2c: tegra: notify transfer-complete after clearing status Greg KH
2012-05-27 17:02 ` [ 00/91] 3.4.1-stable review Willy Tarreau
2012-05-27 20:00   ` Greg KH
2012-05-28 14:18 ` [ 00/91] 3.4.1-stable review Fw: [PATCH 1/2] libata: add a host flag to ignore detected ATA devices FW: use hv_storvsc instead of ata_piix to handle the IDE disks devices ( but not for the CD-ROM) Victor Miasnikov
2012-05-28 20:35   ` Greg KH
2012-05-28 20:40     ` Jonathan Nieder
2012-05-29  6:34     ` Linux on Hyper-V 1) cd006086fa5d ata_piix: defer disks to the Hyper-V drivers by default 2) db63a4c8115a libata: add a host flag to ignore detected ATA device " Victor Miasnikov
2012-06-01  9:20       ` Greg KH
2012-06-01 16:17         ` Linux on Hyper-V 1) cd006086fa5d ata_piix: defer disks to the Hyper-V drivers by default 2) db63a4c8115a libata: add a host flag to ignore detected ATA device FW: use hv_storvsc instead of ata_piix to handle the IDE disks devices ( but not for the CD-R Victor Miasnikov
2012-06-01 16:26           ` Greg KH
2012-06-01 19:23             ` Linux on Hyper-V 1) cd006086fa5d ata_piix: defer disks to the Hyper-V drivers by default 2) db63a4c8115a libata: add a host flag to ignore detected ATA device FW: use hv_storvsc instead of ata_piix to handle the IDE disks devices ( but not for the KY Srinivasan
2012-06-02  1:22               ` Greg KH
2012-06-04 12:33                 ` Victor Miasnikov
2012-06-04 13:56                   ` KY Srinivasan
2012-06-04 14:15                     ` Victor Miasnikov
2012-06-04 14:19                       ` KY Srinivasan
2012-06-04 15:57                         ` Victor Miasnikov
2012-06-05  4:59                   ` [PATCH 2/2] ata_piix: defer disks to the Hyper-V drivers by default Jonathan Nieder
2012-06-05  6:50                     ` ToDo: backport to v3.4 , v3.3 , v3.2 patches 1b) db63a4c8115a libata 1) cd006086fa5d ata_piix: defer disks to the Hyper-V drivers by default Fw: use hv_storvsc instead of ata_piix for IDE disks ( but not for the CD-ROM) Victor Miasnikov
2012-05-29  9:38 ` [ 00/91] 3.4.1-stable review Greg KH
2012-05-29 16:57 ` Greg KH

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=20120527192419.GA2638@herton-Z68MA-D2H-B3 \
    --to=herton.krzesinski@canonical.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ben@decadent.org.uk \
    --cc=celeonar@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=s.l-h@gmx.de \
    --cc=stable@vger.kernel.org \
    --cc=stas.yakovlev@gmail.com \
    --cc=torvalds@linux-foundation.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®