All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: YueHaibing <yuehaibing@huawei.com>,
	Hulk Robot <hulkci@huawei.com>, Kalle Valo <kvalo@codeaurora.org>,
	Sasha Levin <sashal@kernel.org>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 061/244] at76c50x-usb: Don't register led_trigger if usb_register_driver failed
Date: Wed, 22 May 2019 15:23:27 -0400	[thread overview]
Message-ID: <20190522192630.24917-61-sashal@kernel.org> (raw)
In-Reply-To: <20190522192630.24917-1-sashal@kernel.org>

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit 09ac2694b0475f96be895848687ebcbba97eeecf ]

Syzkaller report this:

[ 1213.468581] BUG: unable to handle kernel paging request at fffffbfff83bf338
[ 1213.469530] #PF error: [normal kernel read fault]
[ 1213.469530] PGD 237fe4067 P4D 237fe4067 PUD 237e60067 PMD 1c868b067 PTE 0
[ 1213.473514] Oops: 0000 [#1] SMP KASAN PTI
[ 1213.473514] CPU: 0 PID: 6321 Comm: syz-executor.0 Tainted: G         C        5.1.0-rc3+ #8
[ 1213.473514] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
[ 1213.473514] RIP: 0010:strcmp+0x31/0xa0
[ 1213.473514] Code: 00 00 00 00 fc ff df 55 53 48 83 ec 08 eb 0a 84 db 48 89 ef 74 5a 4c 89 e6 48 89 f8 48 89 fa 48 8d 6f 01 48 c1 e8 03 83 e2 07 <42> 0f b6 04 28 38 d0 7f 04 84 c0 75 50 48 89 f0 48 89 f2 0f b6 5d
[ 1213.473514] RSP: 0018:ffff8881f2b7f950 EFLAGS: 00010246
[ 1213.473514] RAX: 1ffffffff83bf338 RBX: ffff8881ea6f7240 RCX: ffffffff825350c6
[ 1213.473514] RDX: 0000000000000000 RSI: ffffffffc1ee19c0 RDI: ffffffffc1df99c0
[ 1213.473514] RBP: ffffffffc1df99c1 R08: 0000000000000001 R09: 0000000000000004
[ 1213.473514] R10: 0000000000000000 R11: ffff8881de353f00 R12: ffff8881ee727900
[ 1213.473514] R13: dffffc0000000000 R14: 0000000000000001 R15: ffffffffc1eeaaf0
[ 1213.473514] FS:  00007fa66fa01700(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000
[ 1213.473514] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1213.473514] CR2: fffffbfff83bf338 CR3: 00000001ebb9e005 CR4: 00000000007606f0
[ 1213.473514] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1213.473514] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1213.473514] PKRU: 55555554
[ 1213.473514] Call Trace:
[ 1213.473514]  led_trigger_register+0x112/0x3f0
[ 1213.473514]  led_trigger_register_simple+0x7a/0x110
[ 1213.473514]  ? 0xffffffffc1c10000
[ 1213.473514]  at76_mod_init+0x77/0x1000 [at76c50x_usb]
[ 1213.473514]  do_one_initcall+0xbc/0x47d
[ 1213.473514]  ? perf_trace_initcall_level+0x3a0/0x3a0
[ 1213.473514]  ? kasan_unpoison_shadow+0x30/0x40
[ 1213.473514]  ? kasan_unpoison_shadow+0x30/0x40
[ 1213.473514]  do_init_module+0x1b5/0x547
[ 1213.473514]  load_module+0x6405/0x8c10
[ 1213.473514]  ? module_frob_arch_sections+0x20/0x20
[ 1213.473514]  ? kernel_read_file+0x1e6/0x5d0
[ 1213.473514]  ? find_held_lock+0x32/0x1c0
[ 1213.473514]  ? cap_capable+0x1ae/0x210
[ 1213.473514]  ? __do_sys_finit_module+0x162/0x190
[ 1213.473514]  __do_sys_finit_module+0x162/0x190
[ 1213.473514]  ? __ia32_sys_init_module+0xa0/0xa0
[ 1213.473514]  ? __mutex_unlock_slowpath+0xdc/0x690
[ 1213.473514]  ? wait_for_completion+0x370/0x370
[ 1213.473514]  ? vfs_write+0x204/0x4a0
[ 1213.473514]  ? do_syscall_64+0x18/0x450
[ 1213.473514]  do_syscall_64+0x9f/0x450
[ 1213.473514]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 1213.473514] RIP: 0033:0x462e99
[ 1213.473514] Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
[ 1213.473514] RSP: 002b:00007fa66fa00c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 1213.473514] RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000462e99
[ 1213.473514] RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003
[ 1213.473514] RBP: 00007fa66fa00c70 R08: 0000000000000000 R09: 0000000000000000
[ 1213.473514] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa66fa016bc
[ 1213.473514] R13: 00000000004bcefa R14: 00000000006f6fb0 R15: 0000000000000004

If usb_register failed, no need to call led_trigger_register_simple.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 1264b951463a ("at76c50x-usb: add driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/atmel/at76c50x-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
index e99e766a30285..1cabae424839e 100644
--- a/drivers/net/wireless/atmel/at76c50x-usb.c
+++ b/drivers/net/wireless/atmel/at76c50x-usb.c
@@ -2585,8 +2585,8 @@ static int __init at76_mod_init(void)
 	if (result < 0)
 		printk(KERN_ERR DRIVER_NAME
 		       ": usb_register failed (status %d)\n", result);
-
-	led_trigger_register_simple("at76_usb-tx", &ledtrig_tx);
+	else
+		led_trigger_register_simple("at76_usb-tx", &ledtrig_tx);
 	return result;
 }
 
-- 
2.20.1


  parent reply	other threads:[~2019-05-22 19:44 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 19:22 [PATCH AUTOSEL 4.19 001/244] gfs2: Fix lru_count going negative Sasha Levin
2019-05-22 19:22 ` [Cluster-devel] " Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 002/244] cxgb4: Fix error path in cxgb4_init_module Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 003/244] NFS: make nfs_match_client killable Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 004/244] IB/hfi1: Fix WQ_MEM_RECLAIM warning Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 005/244] gfs2: Fix occasional glock use-after-free Sasha Levin
2019-05-22 19:22   ` [Cluster-devel] " Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 006/244] mmc: core: Verify SD bus width Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 007/244] batman-adv: mcast: fix multicast tt/tvlv worker locking Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 008/244] tools/bpf: fix perf build error with uClibc (seen on ARC) Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 009/244] selftests/bpf: set RLIMIT_MEMLOCK properly for test_libbpf_open.c Sasha Levin
2019-05-22 19:22   ` Sasha Levin
2019-05-22 19:22   ` sashal
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 010/244] bpftool: exclude bash-completion/bpftool from .gitignore pattern Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 011/244] dmaengine: tegra210-dma: free dma controller in remove() Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 012/244] net: ena: gcc 8: fix compilation warning Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 013/244] hv_netvsc: fix race that may miss tx queue wakeup Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 014/244] orangefs: truncate before updating size Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 015/244] Bluetooth: Ignore CC events not matching the last HCI command Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 016/244] pinctrl: zte: fix leaked of_node references Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 017/244] ASoC: Intel: kbl_da7219_max98357a: Map BTN_0 to KEY_PLAYPAUSE Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 018/244] usb: dwc2: gadget: Increase descriptors count for ISOC's Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 019/244] usb: dwc3: move synchronize_irq() out of the spinlock protected block Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 020/244] ASoC: hdmi-codec: unlock the device on startup errors Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 021/244] leds: avoid races with workqueue Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 022/244] powerpc/perf: Return accordingly on invalid chip-id in Sasha Levin
2019-05-22 19:22   ` Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 023/244] powerpc/boot: Fix missing check of lseek() return value Sasha Levin
2019-05-22 19:22   ` Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 024/244] powerpc/perf: Fix loop exit condition in nest_imc_event_init Sasha Levin
2019-05-22 19:22   ` Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 025/244] ASoC: imx: fix fiq dependencies Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 026/244] spi: pxa2xx: fix SCR (divisor) calculation Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 027/244] brcm80211: potential NULL dereference in brcmf_cfg80211_vndr_cmds_dcmd_handler() Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 028/244] ACPI / property: fix handling of data_nodes in acpi_get_next_subnode() Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 029/244] drm/nouveau/bar/nv50: ensure BAR is mapped Sasha Levin
2019-05-22 19:22   ` Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 030/244] media: stm32-dcmi: return appropriate error codes during probe Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 031/244] ARM: vdso: Remove dependency with the arch_timer driver internals Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 032/244] arm64: Fix compiler warning from pte_unmap() with -Wunused-but-set-variable Sasha Levin
2019-05-22 19:22 ` [PATCH AUTOSEL 4.19 033/244] powerpc/watchdog: Use hrtimers for per-CPU heartbeat Sasha Levin
2019-05-22 19:22   ` Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 034/244] sched/cpufreq: Fix kobject memleak Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 035/244] scsi: qla2xxx: Fix a qla24xx_enable_msix() error path Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 036/244] scsi: qla2xxx: Fix abort handling in tcm_qla2xxx_write_pending() Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 037/244] scsi: qla2xxx: Avoid that lockdep complains about unsafe locking in tcm_qla2xxx_close_session() Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 038/244] scsi: qla2xxx: Fix hardirq-unsafe locking Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 039/244] x86/modules: Avoid breaking W^X while loading modules Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 040/244] Btrfs: fix data bytes_may_use underflow with fallocate due to failed quota reserve Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 041/244] btrfs: fix panic during relocation after ENOSPC before writeback happens Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 042/244] btrfs: Don't panic when we can't find a root key Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 043/244] iwlwifi: pcie: don't crash on invalid RX interrupt Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 044/244] rtc: 88pm860x: prevent use-after-free on device remove Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 045/244] rtc: stm32: manage the get_irq probe defer case Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 046/244] scsi: qedi: Abort ep termination if offload not scheduled Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 047/244] s390/kexec_file: Fix detection of text segment in ELF loader Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 048/244] sched/nohz: Run NOHZ idle load balancer on HK_FLAG_MISC CPUs Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 049/244] w1: fix the resume command API Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 050/244] s390: qeth: address type mismatch warning Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 051/244] dmaengine: pl330: _stop: clear interrupt status Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 052/244] mac80211/cfg80211: update bss channel on channel switch Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 053/244] USB: serial: fix initial-termios handling Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 054/244] libbpf: fix samples/bpf build failure due to undefined UINT32_MAX Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 055/244] slimbus: fix a potential NULL pointer dereference in of_qcom_slim_ngd_register Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 056/244] driver core: platform: Fix the usage of platform device name(pdev->name) Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 057/244] ASoC: fsl_sai: Update is_slave_mode with correct value Sasha Levin
2019-05-22 19:23   ` Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 058/244] mwifiex: prevent an array overflow Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 059/244] rsi: Fix NULL pointer dereference in kmalloc Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 060/244] net: cw1200: fix a NULL pointer dereference Sasha Levin
2019-05-22 19:23 ` Sasha Levin [this message]
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 062/244] nvme: set 0 capacity if namespace block size exceeds PAGE_SIZE Sasha Levin
2019-05-22 19:23   ` Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 063/244] nvme-rdma: fix a NULL deref when an admin connect times out Sasha Levin
2019-05-22 19:23   ` Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 064/244] ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 065/244] crypto: sun4i-ss - Fix invalid calculation of hash end Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 066/244] bcache: avoid potential memleak of list of journal_replay(s) in the CACHE_SYNC branch of run_cache_set Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 067/244] bcache: return error immediately in bch_journal_replay() Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 068/244] bcache: fix failure in journal relplay Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 069/244] bcache: add failure check to run_cache_set() for journal replay Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 070/244] bcache: avoid clang -Wunintialized warning Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 071/244] RDMA/cma: Consider scope_id while binding to ipv6 ll address Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 072/244] vfio-ccw: Do not call flush_workqueue while holding the spinlock Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 073/244] vfio-ccw: Release any channel program when releasing/removing vfio-ccw mdev Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 074/244] x86/build: Move _etext to actual end of .text Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 075/244] smpboot: Place the __percpu annotation correctly Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 076/244] x86/mm: Remove in_nmi() warning from 64-bit implementation of vmalloc_fault() Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 077/244] mlxsw: spectrum_router: Prevent ipv6 gateway with v4 route via replace and append Sasha Levin
2019-05-22 19:29   ` David Ahern
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 078/244] mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 079/244] Bluetooth: hci_qca: Give enough time to ROME controller to bootup Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 080/244] HID: logitech-hidpp: use RAP instead of FAP to get the protocol version Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 081/244] pinctrl: pistachio: fix leaked of_node references Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 082/244] pinctrl: samsung: " Sasha Levin
2019-05-22 19:23 ` [PATCH AUTOSEL 4.19 083/244] clk: rockchip: undo several noc and special clocks as critical on rk3288 Sasha Levin
2019-05-22 19:23   ` Sasha Levin

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=20190522192630.24917-61-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=hulkci@huawei.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yuehaibing@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.