From: Stephen Boyd <sboyd@codeaurora.org> To: linux-edac@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 1/6] edac: Don't try to cancel workqueue when it's never setup Date: Mon, 30 Dec 2013 12:14:12 -0800 [thread overview] Message-ID: <1388434457-4194-2-git-send-email-sboyd@codeaurora.org> (raw) In-Reply-To: <1388434457-4194-1-git-send-email-sboyd@codeaurora.org> We only setup a workqueue for edac devices that use the polling method. We still try to cancel the workqueue if an edac_device uses the irq method though. This causes a warning from debug objects when we remove an edac device: WARNING: CPU: 0 PID: 56 at lib/debugobjects.c:260 debug_print_object+0x98/0xc0() ODEBUG: assert_init not available (active state 0) object type: timer_list hint: stub_timer+0x0/0x28 Modules linked in: krait_edac(-) CPU: 0 PID: 56 Comm: rmmod Not tainted 3.12.0-rc2-00035-g15292a0 #69 (unwind_backtrace+0x0/0x144) (show_stack+0x20/0x24) (dump_stack+0x74/0xb4) (warn_slowpath_common+0x78/0x9c) (warn_slowpath_fmt+0x40/0x48) (debug_print_object+0x98/0xc0) (debug_object_assert_init+0xdc/0xec) (del_timer+0x24/0x7c) (try_to_grab_pending+0xc0/0x1b0) (cancel_delayed_work+0x2c/0xa0) (edac_device_workq_teardown+0x1c/0x38) (edac_device_del_device+0xb8/0xe4) (krait_edac_remove+0x50/0x70 [krait_edac]) (platform_drv_remove+0x24/0x28) (__device_release_driver+0x68/0xc0) (driver_detach+0xc4/0xc8) (bus_remove_driver+0xac/0x114) (driver_unregister+0x38/0x58) (platform_driver_unregister+0x1c/0x20) (krait_edac_driver_exit+0x14/0x1c [krait_edac]) (SyS_delete_module+0x178/0x2b4) Fix it by skipping the workqueue teardown for such devices. Acked-by: Borislav Petkov <bp@suse.de> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> --- drivers/edac/edac_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 1026743..592af5f 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -437,6 +437,9 @@ void edac_device_workq_teardown(struct edac_device_ctl_info *edac_dev) { int status; + if (!edac_dev->edac_check) + return; + status = cancel_delayed_work(&edac_dev->work); if (status == 0) { /* workq instance might be running, wait for it */ -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 1/6] edac: Don't try to cancel workqueue when it's never setup Date: Mon, 30 Dec 2013 12:14:12 -0800 [thread overview] Message-ID: <1388434457-4194-2-git-send-email-sboyd@codeaurora.org> (raw) In-Reply-To: <1388434457-4194-1-git-send-email-sboyd@codeaurora.org> We only setup a workqueue for edac devices that use the polling method. We still try to cancel the workqueue if an edac_device uses the irq method though. This causes a warning from debug objects when we remove an edac device: WARNING: CPU: 0 PID: 56 at lib/debugobjects.c:260 debug_print_object+0x98/0xc0() ODEBUG: assert_init not available (active state 0) object type: timer_list hint: stub_timer+0x0/0x28 Modules linked in: krait_edac(-) CPU: 0 PID: 56 Comm: rmmod Not tainted 3.12.0-rc2-00035-g15292a0 #69 (unwind_backtrace+0x0/0x144) (show_stack+0x20/0x24) (dump_stack+0x74/0xb4) (warn_slowpath_common+0x78/0x9c) (warn_slowpath_fmt+0x40/0x48) (debug_print_object+0x98/0xc0) (debug_object_assert_init+0xdc/0xec) (del_timer+0x24/0x7c) (try_to_grab_pending+0xc0/0x1b0) (cancel_delayed_work+0x2c/0xa0) (edac_device_workq_teardown+0x1c/0x38) (edac_device_del_device+0xb8/0xe4) (krait_edac_remove+0x50/0x70 [krait_edac]) (platform_drv_remove+0x24/0x28) (__device_release_driver+0x68/0xc0) (driver_detach+0xc4/0xc8) (bus_remove_driver+0xac/0x114) (driver_unregister+0x38/0x58) (platform_driver_unregister+0x1c/0x20) (krait_edac_driver_exit+0x14/0x1c [krait_edac]) (SyS_delete_module+0x178/0x2b4) Fix it by skipping the workqueue teardown for such devices. Acked-by: Borislav Petkov <bp@suse.de> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> --- drivers/edac/edac_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 1026743..592af5f 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -437,6 +437,9 @@ void edac_device_workq_teardown(struct edac_device_ctl_info *edac_dev) { int status; + if (!edac_dev->edac_check) + return; + status = cancel_delayed_work(&edac_dev->work); if (status == 0) { /* workq instance might be running, wait for it */ -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2013-12-30 20:14 UTC|newest] Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-12-30 20:14 [PATCH v4 0/6] Krait L1/L2 EDAC driver Stephen Boyd 2013-12-30 20:14 ` Stephen Boyd 2013-12-30 20:14 ` Stephen Boyd 2013-12-30 20:14 ` Stephen Boyd [this message] 2013-12-30 20:14 ` [PATCH v4 1/6] edac: Don't try to cancel workqueue when it's never setup Stephen Boyd 2014-01-07 17:19 ` Borislav Petkov 2014-01-07 17:19 ` Borislav Petkov 2014-01-07 17:19 ` Borislav Petkov 2013-12-30 20:14 ` [PATCH v4 2/6] genirq: export percpu irq functions for module usage Stephen Boyd 2013-12-30 20:14 ` Stephen Boyd 2014-01-07 23:02 ` Borislav Petkov 2014-01-07 23:02 ` Borislav Petkov 2013-12-30 20:14 ` [PATCH v4 3/6] ARM: Add Krait L2 accessor functions Stephen Boyd 2013-12-30 20:14 ` Stephen Boyd 2014-01-07 23:07 ` Borislav Petkov 2014-01-07 23:07 ` Borislav Petkov 2014-01-07 23:09 ` Stephen Boyd 2014-01-07 23:09 ` Stephen Boyd 2014-01-09 0:53 ` Courtney Cavin 2014-01-09 0:53 ` Courtney Cavin 2014-01-09 0:53 ` Courtney Cavin 2014-01-09 1:54 ` Stephen Boyd 2014-01-09 1:54 ` Stephen Boyd 2014-01-09 1:54 ` Stephen Boyd 2014-01-09 11:03 ` Borislav Petkov 2014-01-09 11:03 ` Borislav Petkov 2014-01-09 11:03 ` Borislav Petkov [not found] ` <1388434457-4194-1-git-send-email-sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> 2013-12-30 20:14 ` [PATCH v4 4/6] devicetree: bindings: Document Krait L1/L2 EDAC Stephen Boyd 2013-12-30 20:14 ` Stephen Boyd 2013-12-30 20:14 ` Stephen Boyd 2014-01-07 10:54 ` Lorenzo Pieralisi 2014-01-07 10:54 ` Lorenzo Pieralisi 2014-01-07 10:54 ` Lorenzo Pieralisi 2014-01-07 20:12 ` Stephen Boyd 2014-01-07 20:12 ` Stephen Boyd 2014-01-07 20:12 ` Stephen Boyd 2014-01-08 10:05 ` Lorenzo Pieralisi 2014-01-08 10:05 ` Lorenzo Pieralisi 2014-01-08 10:05 ` Lorenzo Pieralisi 2014-01-09 20:52 ` Stephen Boyd 2014-01-09 20:52 ` Stephen Boyd 2014-01-09 20:52 ` Stephen Boyd 2014-01-10 10:54 ` Lorenzo Pieralisi 2014-01-10 10:54 ` Lorenzo Pieralisi 2014-01-10 10:54 ` Lorenzo Pieralisi 2013-12-30 20:14 ` [PATCH v4 5/6] edac: Add support for Krait CPU cache error detection Stephen Boyd 2013-12-30 20:14 ` Stephen Boyd 2014-01-07 23:43 ` Borislav Petkov 2014-01-07 23:43 ` Borislav Petkov 2013-12-30 20:14 ` [PATCH v4 6/6] ARM: dts: msm: Add Krait CPU/L2 nodes Stephen Boyd 2013-12-30 20:14 ` Stephen Boyd 2014-01-04 10:19 ` [PATCH v4 0/6] Krait L1/L2 EDAC driver Borislav Petkov 2014-01-04 10:19 ` Borislav Petkov [not found] ` <20140104101901.GA4439-K5JNixvcfoxupOikMc4+xw@public.gmane.org> 2014-01-06 22:09 ` Stephen Boyd 2014-01-06 22:09 ` Stephen Boyd 2014-01-06 22:09 ` Stephen Boyd
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=1388434457-4194-2-git-send-email-sboyd@codeaurora.org \ --to=sboyd@codeaurora.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-edac@vger.kernel.org \ --cc=linux-kernel@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: linkBe 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.