From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Savkov Subject: [BUG] cpufreq: sleeping function called from invalid context at kernel/workqueue.c:2811 Date: Thu, 7 Feb 2013 00:25:13 +0400 Message-ID: <20130206202513.GA5626@thinkpad.lan> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=XAQBvV4GdGBKXdyTkqubURS9sJg5wYsp15XIDs75QNw=; b=eorRfRAI0ls5F4p9XsdGk/UDUQJ/v82YrnbB8UL+eL+qiom8mJ/RG5hP55q4+LBgik eBKy8Xd8tUf+7yVJY1SlmPf8vbifjoI8skb820w+Y7mTrlYsIr2Yvbs8NcfAM706uphp DxDnsKcqYG97MZ2gDIVDmuSD9kkBdddibbuqXO+eNpja4a2qVy9I3gHyXlNt67iaCKXU xlTD3UYuYtzr6LDGK38iuUd9IAtUby1RPXzBbWxa+JjbebBjR+DnHIXVS9/OuvsmO+CD frBCFunR8TYzVBSOILO7CPN2yaNPIDPEZejh14kuYkPWBEafLCzMnp3EgUFDcN6tlFYL 0R2A== Content-Disposition: inline Sender: cpufreq-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" , Viresh Kumar I get the following BUG on suspend using systemd-sleep(this doesn't happen with pm-suspend). This seems to be introduced by some of the Viresh's patches. [ 94.908046] Disabling non-boot CPUs ... [ 94.908416] BUG: sleeping function called from invalid context at kernel/workqueue.c:2811 [ 94.908419] in_atomic(): 1, irqs_disabled(): 1, pid: 4038, name: systemd-sleep [ 94.908421] 7 locks held by systemd-sleep/4038: [ 94.908439] #0: (&buffer->mutex){......}, at: [] sysfs_write_file+0x29/0x100 [ 94.908448] #1: (s_active#179){......}, at: [] sysfs_write_file+0x8d/0x100 [ 94.908459] #2: (pm_mutex){......}, at: [] pm_suspend+0x40/0x1e0 [ 94.908469] #3: (cpu_add_remove_lock){......}, at: [] cpu_maps_update_begin+0x14/0x20 [ 94.908476] #4: (cpu_hotplug.lock){......}, at: [] cpu_hotplug_begin+0x22/0x50 [ 94.908487] #5: (&per_cpu(cpu_policy_rwsem, cpu)){......}, at: [] lock_policy_rwsem_write+0x3d/0x70 [ 94.908495] #6: (cpufreq_driver_lock){......}, at: [] __cpufreq_remove_dev.isra.10+0x26/0x270 [ 94.908500] Pid: 4038, comm: systemd-sleep Not tainted 3.8.0-rc6-next-20130205+ #200 [ 94.908501] Call Trace: [ 94.908511] [] __might_sleep+0xe0/0x100 [ 94.908518] [] flush_work+0x5f/0x230 [ 94.908523] [] ? insert_work+0x50/0x50 [ 94.908528] [] ? del_timer+0x47/0x70 [ 94.908533] [] ? del_timer+0x47/0x70 [ 94.908538] [] ? try_to_grab_pending+0xa8/0x120 [ 94.908543] [] __cancel_work_timer+0x59/0x80 [ 94.908548] [] cancel_delayed_work_sync+0x12/0x20 [ 94.908555] [] cpufreq_governor_dbs+0x2cd/0x490 [ 94.908561] [] od_cpufreq_governor_dbs+0x16/0x20 [ 94.908565] [] __cpufreq_governor+0x41/0x100 [ 94.908570] [] ? __cpufreq_remove_dev.isra.10+0x26/0x270 [ 94.908575] [] __cpufreq_remove_dev.isra.10+0x56/0x270 [ 94.908580] [] ? lock_policy_rwsem_write+0x3d/0x70 [ 94.908589] [] cpufreq_cpu_callback+0x50/0x65 [ 94.908596] [] notifier_call_chain+0x47/0x90 [ 94.908606] [] __raw_notifier_call_chain+0x1e/0x30 [ 94.908610] [] __cpu_notify+0x24/0x50 [ 94.908615] [] _cpu_down+0x6d/0x250 [ 94.908621] [] disable_nonboot_cpus+0x6c/0xf0 [ 94.908625] [] suspend_devices_and_enter+0x175/0x2b0 [ 94.908629] [] pm_suspend+0x1d7/0x1e0 [ 94.908633] [] state_store+0x5d/0xb0 [ 94.908638] [] ? pm_trace_dev_match_show+0x20/0x20 [ 94.908644] [] kobj_attr_store+0x1b/0x30 [ 94.908650] [] sysfs_write_file+0xa3/0x100 [ 94.908655] [] ? sysfs_open_file+0x1f0/0x1f0 [ 94.908662] [] vfs_write+0x88/0x140 [ 94.908667] [] ? sysfs_open_file+0x1f0/0x1f0 [ 94.908672] [] sys_write+0x47/0x90 [ 94.908679] [] sysenter_do_call+0x12/0x2d [ 94.911067] smpboot: CPU 1 is now offline [ 94.915585] smpboot: CPU 2 is now offline [ 94.917500] smpboot: CPU 3 is now offline -- Kind regards, Artem