Commit Graph

5 Commits

Author SHA1 Message Date
Ben Chan 9f77186dd1 staging: gdm72xx: Release netlink socket properly
This patch modifies the gdm72xx driver to properly release a netlink
socket using netlink_kernel_release. It fixes the following kernel
crash, which occurs after repeatedly suspending and resuming a system.

   kernel BUG at /home/benchan/trunk/src/third_party/kernel/files/mm/slub.c:3471!
   invalid opcode: 0000 [#1] SMP
   CPU 2
   Modules linked in: asix usbnet snd_hda_codec_hdmi
   snd_hda_codec_cirrus i2c_dev uinput snd_hda_intel snd_hda_codec
   snd_hwdep snd_pcm snd_timer bluetooth snd_page_alloc fuse aesni_intel
   cryptd isl29018(C) aes_x86_64 industrialio(C) memconsole nm10_gpio
   rtc_cmos nf_conntrack_ipv6 nf_defrag_ipv6 r8169 ath9k mac80211
   ip6table_filter ath9k_common ath9k_hw ath cfg80211 xt_mark ip6_tables
   uvcvideo videobuf2_core videodev videobuf2_vmalloc videobuf2_memops
   gdmwm(C) joydev

   Pid: 3125, comm: kworker/u:30 Tainted: G        WC   3.4.0 #1
   RIP: 0010:[<ffffffff810cda19>]  [<ffffffff810cda19>] kfree+0x67/0xca
   RSP: 0018:ffff880134977d60  EFLAGS: 00010246
   RAX: 4000000000000400 RBX: ffffffff818832a0 RCX: 0000000000000000
   RDX: 4000000000000000 RSI: 0000000000000000 RDI: ffffffff818832a0
   RBP: ffff880134977d80 R08: 00000000ffffffff R09: ffffea00000620c0
   R10: ffffffff8111b729 R11: ffff880149fb3840 R12: ffffffff81a08840
   R13: ffffffff813f5bc3 R14: ffffffff8138ed84 R15: 0000000000000000
   FS:  0000000000000000(0000) GS:ffff88014fb00000(0000) knlGS:0000000000000000
   CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
   CR2: 00007f7cad963110 CR3: 000000000180b000 CR4: 00000000000407e0
   DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
   DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
   Process kworker/u:30 (pid: 3125, threadinfo ffff880134976000, task ffff8801330647e0)
   Stack:
    0000000000000002 ffffffff818832a0 ffffffff81a08840 ffff880134977df0
    ffff880134977da0 ffffffff813f5bc3 ffff880134977df0 ffffffff81883250
    ffff880134977dd0 ffffffff8138e64c 0000000180150010 ffffffff81883250
   Call Trace:
    [<ffffffff813f5bc3>] ipv4_sysctl_exit_net+0x23/0x27
    [<ffffffff8138e64c>] ops_exit_list+0x27/0x50
    [<ffffffff8138ee72>] cleanup_net+0xee/0x17c
    [<ffffffff81040c64>] process_one_work+0x199/0x2b8
    [<ffffffff810416e4>] worker_thread+0x13c/0x222
    [<ffffffff810415a8>] ? manage_workers.isra.26+0x171/0x171
    [<ffffffff8104506d>] kthread+0x8b/0x93
    [<ffffffff8145b414>] kernel_thread_helper+0x4/0x10
    [<ffffffff81044fe2>] ? __init_kthread_worker+0x39/0x39
    [<ffffffff8145b410>] ? gs_change+0xb/0xb
   Code: 83 c4 10 49 83 3c 24 00 eb e4 48 83 fb 10 76 76 48 89 df e8 17
   e1 ff ff 49 89 c1 48 8b 00 a8 80 75 15 49 f7 01 00 c0 00 00 75 02
   <0f> 0b 4c 89 cf e8 b8 b4 fd ff eb 4f 4c 8b 55 08 49 8b 79 30 48
   RIP  [<ffffffff810cda19>] kfree+0x67/0xca
    RSP <ffff880134977d60>

Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:28:46 -07:00
Randy Dunlap 622d421c33 staging: gdm72xx depends on NET
gdm72xx uses networking interfaces, so it should depend
at least on NET (maybe on WIMAX?).

ERROR: "sock_release" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netif_carrier_on" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netif_carrier_off" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "skb_realloc_headroom" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netif_rx" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netlink_kernel_create" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netif_rx_ni" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "dev_alloc_skb" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "free_netdev" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "register_netdev" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "skb_push" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "dev_get_by_index" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "skb_pull" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "init_net" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "__alloc_skb" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netlink_broadcast" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "kfree_skb" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "alloc_netdev_mqs" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "eth_type_trans" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "ether_setup" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "unregister_netdev" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "__netif_schedule" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "skb_put" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "sock_wfree" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "__nlmsg_put" [drivers/staging/gdm72xx/gdmwm.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 13:17:41 -07:00
Paul Stewart 54bc1ff1da staging: gdm72xx: Set up parent link in sysfs for gdm72xx devices
This patch uses SET_NETDEV_DEV to set up a 'device' parent link in sysfs
(e.g. /sys/class/net/wm0/device) for a gdm72xx device.

Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 13:17:41 -07:00
Geert Uytterhoeven dd4f521399 staging: gdm72xx: WIMAX_GDM72XX_USB_PM should depend on USB_SUSPEND
Use Kconfig logic instead of a rude #error in the driver source,
which breaks m68k-allmodconfig.
Also remove the "default n", as that's the default.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-16 13:17:52 -07:00
Sage Ahn 247e9cffdc staging: gdm72xx: Add GCT GDM72xx WiMAX driver.
This patch provides the kernel driver for the GDM72xx WiMAX chips
developed by GCT Semiconductor, Inc., which enables mobile WiMAX
connection on the Linux host.

Signed-off-by: Sage Ahn <syahn@gctsemi.com>
Cc: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 08:49:35 -07:00