lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201706241124.mrV5erxN%fengguang.wu@intel.com>
Date:   Sat, 24 Jun 2017 11:06:27 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org, tipbuild@...or.com
Subject: [tip:irq/core 30/72] kernel/irq/debugfs.c:192:2-16: WARNING: NULL
 check before freeing functions like kfree, debugfs_remove,
 debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider
 reorganizing relevant code to avoid passing NULL values.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
head:   8d9d51b62e8558bbc11c6b978acad001f9ea7a42
commit: 087cdfb662ae50e3826e7cd2e54b6519d07b60f0 [30/72] genirq/debugfs: Add proper debugfs interface


coccinelle warnings: (new ones prefixed by >>)

>> kernel/irq/debugfs.c:192:2-16: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

vim +192 kernel/irq/debugfs.c

   176	
   177	void irq_add_debugfs_entry(unsigned int irq, struct irq_desc *desc)
   178	{
   179		char name [10];
   180	
   181		if (!irq_dir || !desc || desc->debugfs_file)
   182			return;
   183	
   184		sprintf(name, "%d", irq);
   185		desc->debugfs_file = debugfs_create_file(name, 0444, irq_dir, desc,
   186							 &dfs_irq_ops);
   187	}
   188	
   189	void irq_remove_debugfs_entry(struct irq_desc *desc)
   190	{
   191		if (desc->debugfs_file)
 > 192			debugfs_remove(desc->debugfs_file);
   193	}
   194	
   195	static int __init irq_debugfs_init(void)
   196	{
   197		struct dentry *root_dir;
   198		int irq;
   199	
   200		root_dir = debugfs_create_dir("irq", NULL);

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ