All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v3 1/1] intel_telemetry_debugfs: fix oops found while load/unload module test
  2017-06-01 22:42 [PATCH v3 1/1] intel_telemetry_debugfs: fix oops found while load/unload module test priyalee.kushwaha
@ 2017-06-01  6:01   ` kbuild test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2017-06-01  6:01 UTC (permalink / raw)
  To: priyalee.kushwaha
  Cc: kbuild-all, dvhart, souvik.k.chakravarty, andy, linux-kernel,
	platform-driver-x86, Priyalee Kushwaha

[-- Attachment #1: Type: text/plain, Size: 2685 bytes --]

Hi Priyalee,

[auto build test ERROR on platform-drivers-x86/for-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/priyalee-kushwaha-intel-com/intel_telemetry_debugfs-fix-oops-found-while-load-unload-module-test/20170601-083928
base:   git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next
config: x86_64-randconfig-h0-06011226 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/platform/x86/intel_telemetry_debugfs.c: In function 'telemetry_debugfs_init':
>> drivers/platform/x86/intel_telemetry_debugfs.c:963:24: error: 'pm_notifier' undeclared (first use in this function)
     register_pm_notifier(&pm_notifier);
                           ^
   drivers/platform/x86/intel_telemetry_debugfs.c:963:24: note: each undeclared identifier is reported only once for each function it appears in
   drivers/platform/x86/intel_telemetry_debugfs.c: In function 'telemetry_debugfs_exit':
   drivers/platform/x86/intel_telemetry_debugfs.c:1026:26: error: 'pm_notifier' undeclared (first use in this function)
     unregister_pm_notifier(&pm_notifier);
                             ^

vim +/pm_notifier +963 drivers/platform/x86/intel_telemetry_debugfs.c

87bee2909 Souvik Kumar Chakravarty 2016-01-12  957  		return -ENODEV;
87bee2909 Souvik Kumar Chakravarty 2016-01-12  958  
87bee2909 Souvik Kumar Chakravarty 2016-01-12  959  	err = telemetry_debugfs_check_evts();
87bee2909 Souvik Kumar Chakravarty 2016-01-12  960  	if (err < 0)
87bee2909 Souvik Kumar Chakravarty 2016-01-12  961  		return -EINVAL;
87bee2909 Souvik Kumar Chakravarty 2016-01-12  962  
87bee2909 Souvik Kumar Chakravarty 2016-01-12 @963  	register_pm_notifier(&pm_notifier);
87bee2909 Souvik Kumar Chakravarty 2016-01-12  964  
87bee2909 Souvik Kumar Chakravarty 2016-01-12  965  	debugfs_conf->telemetry_dbg_dir = debugfs_create_dir("telemetry", NULL);
1e7e221ab Priyalee Kushwaha        2017-06-01  966  	if (!debugfs_conf->telemetry_dbg_dir) {

:::::: The code at line 963 was first introduced by commit
:::::: 87bee290998d062937eecf40ad409480e7281b0e platform:x86: Add Intel Telemetry Debugfs interfaces

:::::: TO: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
:::::: CC: Darren Hart <dvhart@linux.intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27792 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 1/1] intel_telemetry_debugfs: fix oops found while load/unload module test
@ 2017-06-01  6:01   ` kbuild test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2017-06-01  6:01 UTC (permalink / raw)
  Cc: kbuild-all, dvhart, souvik.k.chakravarty, andy, linux-kernel,
	platform-driver-x86, Priyalee Kushwaha

[-- Attachment #1: Type: text/plain, Size: 2685 bytes --]

Hi Priyalee,

[auto build test ERROR on platform-drivers-x86/for-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/priyalee-kushwaha-intel-com/intel_telemetry_debugfs-fix-oops-found-while-load-unload-module-test/20170601-083928
base:   git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next
config: x86_64-randconfig-h0-06011226 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/platform/x86/intel_telemetry_debugfs.c: In function 'telemetry_debugfs_init':
>> drivers/platform/x86/intel_telemetry_debugfs.c:963:24: error: 'pm_notifier' undeclared (first use in this function)
     register_pm_notifier(&pm_notifier);
                           ^
   drivers/platform/x86/intel_telemetry_debugfs.c:963:24: note: each undeclared identifier is reported only once for each function it appears in
   drivers/platform/x86/intel_telemetry_debugfs.c: In function 'telemetry_debugfs_exit':
   drivers/platform/x86/intel_telemetry_debugfs.c:1026:26: error: 'pm_notifier' undeclared (first use in this function)
     unregister_pm_notifier(&pm_notifier);
                             ^

vim +/pm_notifier +963 drivers/platform/x86/intel_telemetry_debugfs.c

87bee2909 Souvik Kumar Chakravarty 2016-01-12  957  		return -ENODEV;
87bee2909 Souvik Kumar Chakravarty 2016-01-12  958  
87bee2909 Souvik Kumar Chakravarty 2016-01-12  959  	err = telemetry_debugfs_check_evts();
87bee2909 Souvik Kumar Chakravarty 2016-01-12  960  	if (err < 0)
87bee2909 Souvik Kumar Chakravarty 2016-01-12  961  		return -EINVAL;
87bee2909 Souvik Kumar Chakravarty 2016-01-12  962  
87bee2909 Souvik Kumar Chakravarty 2016-01-12 @963  	register_pm_notifier(&pm_notifier);
87bee2909 Souvik Kumar Chakravarty 2016-01-12  964  
87bee2909 Souvik Kumar Chakravarty 2016-01-12  965  	debugfs_conf->telemetry_dbg_dir = debugfs_create_dir("telemetry", NULL);
1e7e221ab Priyalee Kushwaha        2017-06-01  966  	if (!debugfs_conf->telemetry_dbg_dir) {

:::::: The code at line 963 was first introduced by commit
:::::: 87bee290998d062937eecf40ad409480e7281b0e platform:x86: Add Intel Telemetry Debugfs interfaces

:::::: TO: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
:::::: CC: Darren Hart <dvhart@linux.intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27792 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3 1/1] intel_telemetry_debugfs: fix oops found while load/unload module test
@ 2017-06-01 22:42 priyalee.kushwaha
  2017-06-01  6:01   ` kbuild test robot
  0 siblings, 1 reply; 3+ messages in thread
From: priyalee.kushwaha @ 2017-06-01 22:42 UTC (permalink / raw)
  To: dvhart, souvik.k.chakravarty, andy
  Cc: linux-kernel, platform-driver-x86, Priyalee Kushwaha

From: Priyalee Kushwaha <priyalee.kushwaha@intel.com>

This fix oops found while testing load/unload test of
intel_telemetry_debugfs module. Module_init uses register_pm_notifier
for PM callbacks, but unregister_pm_notifier was missing from
module_exit.

 [ 97.481860] BUG: unable to handle kernel paging request at ffffffffa006f010
 [ 97.489742] IP: blocking_notifier_chain_register+0x3a/0xa0
 [ 97.495898] PGD 2e0a067
 [ 97.495899] PUD 2e0b063
 [ 97.498737] PMD 179e29067
 [ 97.501573] PTE 0

 [ 97.508423] Oops: 0000 1 PREEMPT SMP
 [ 97.512724] Modules linked in: intel_telemetry_debugfs intel_rapl gpio_keys dwc3 udc_core intel_telemetry_pltdrv intel_punit_ipc intel_telemetry_core rtc_cmos efivars x86_pkg_temp_thermal iwlwifi snd_hda_codec_hdmi soc_button_array btusb cfg80211 btrtl mei_me hci_uart btbcm mei btintel i915 bluetooth intel_pmc_ipc snd_hda_intel spi_pxa2xx_platform snd_hda_codec dwc3_pci snd_hda_core tpm_tis tpm_tis_core tpm efivarfs
 [ 97.558453] CPU: 0 PID: 889 Comm: modprobe Not tainted 4.11.0-rc6-intel-dev-bkc #1
 [ 97.566950] Hardware name: Intel Corp. Joule DVT3/SDS, BIOS GTPP181A.X64.0143.B30.1701132137 01/13/2017
 [ 97.577518] task: ffff8801793a21c0 task.stack: ffff8801793f0000
 [ 97.584162] RIP: 0010:blocking_notifier_chain_register+0x3a/0xa0
 [ 97.590903] RSP: 0018:ffff8801793f3c58 EFLAGS: 00010286
 [ 97.596802] RAX: ffffffffa006f000 RBX: ffffffff81e3ea20 RCX: 0000000000000000
 [ 97.604812] RDX: ffff880179eaf210 RSI: ffffffffa0131000 RDI: ffffffff81e3ea20
 [ 97.612821] RBP: ffff8801793f3c68 R08: 0000000000000006 R09: 000000000000005c
 [ 97.620847] R10: 0000000000000000 R11: 0000000000000006 R12: ffffffffa0131000
 [ 97.628855] R13: 0000000000000000 R14: ffff880176e35f48 R15: ffff8801793f3ea8
 [ 97.636865] FS: 00007f7eeba07700(0000) GS:ffff88017fc00000(0000) knlGS:0000000000000000
 [ 97.645948] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 [ 97.652423] CR2: ffffffffa006f010 CR3: 00000001775ef000 CR4: 00000000003406f0
 [ 97.660423] Call Trace:
 [ 97.663166] ? 0xffffffffa0031000
 [ 97.666885] register_pm_notifier+0x18/0x20
 [ 97.671581] telemetry_debugfs_init+0x92/0x1000

Signed-off-by: Priyalee Kushwaha <priyalee.kushwaha@intel.com>
---
 drivers/platform/x86/intel_telemetry_debugfs.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c
index ef29f18..d20b6f7 100644
--- a/drivers/platform/x86/intel_telemetry_debugfs.c
+++ b/drivers/platform/x86/intel_telemetry_debugfs.c
@@ -960,14 +960,13 @@ static int __init telemetry_debugfs_init(void)
 	if (err < 0)
 		return -EINVAL;
 
-
-#ifdef CONFIG_PM_SLEEP
 	register_pm_notifier(&pm_notifier);
-#endif /* CONFIG_PM_SLEEP */
 
 	debugfs_conf->telemetry_dbg_dir = debugfs_create_dir("telemetry", NULL);
-	if (!debugfs_conf->telemetry_dbg_dir)
-		return -ENOMEM;
+	if (!debugfs_conf->telemetry_dbg_dir) {
+		err = -ENOMEM;
+		goto out_pm;
+	}
 
 	f = debugfs_create_file("pss_info", S_IFREG | S_IRUGO,
 				debugfs_conf->telemetry_dbg_dir, NULL,
@@ -1014,6 +1013,8 @@ static int __init telemetry_debugfs_init(void)
 out:
 	debugfs_remove_recursive(debugfs_conf->telemetry_dbg_dir);
 	debugfs_conf->telemetry_dbg_dir = NULL;
+out_pm:
+	unregister_pm_notifier(&pm_notifier);
 
 	return err;
 }
@@ -1022,6 +1023,7 @@ static void __exit telemetry_debugfs_exit(void)
 {
 	debugfs_remove_recursive(debugfs_conf->telemetry_dbg_dir);
 	debugfs_conf->telemetry_dbg_dir = NULL;
+	unregister_pm_notifier(&pm_notifier);
 }
 
 late_initcall(telemetry_debugfs_init);
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-01  6:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01 22:42 [PATCH v3 1/1] intel_telemetry_debugfs: fix oops found while load/unload module test priyalee.kushwaha
2017-06-01  6:01 ` kbuild test robot
2017-06-01  6:01   ` kbuild test robot

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.