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]
Date:	Tue, 29 Mar 2016 01:12:38 +0800
From:	kbuild test robot <fengguang.wu@...el.com>
To:	Ryan Ding <ryan.ding@...cle.com>
Cc:	kbuild-all@...org, linux-kernel@...r.kernel.org,
	Junxiao Bi <junxiao.bi@...cle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Memory Management List <linux-mm@...ck.org>
Subject: fs/ocfs2/aops.c:1881:2-7: 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/torvalds/linux.git master
head:   f55532a0c0b8bb6148f4e07853b876ef73bc69ca
commit: 4506cfb6f8cad594ac73e0df2b2961ca10dbd25e ocfs2: record UNWRITTEN extents when populate write desc
date:   3 days ago


coccinelle warnings: (new ones prefixed by >>)

>> fs/ocfs2/aops.c:1881:2-7: 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 +1881 fs/ocfs2/aops.c

  1865				ret = -ENOMEM;
  1866				goto out;
  1867			}
  1868			goto retry;
  1869		}
  1870		/* This direct write will doing zero. */
  1871		new->ue_cpos = desc->c_cpos;
  1872		new->ue_phys = desc->c_phys;
  1873		desc->c_clear_unwritten = 0;
  1874		list_add_tail(&new->ue_ip_node, &oi->ip_unwritten_list);
  1875		list_add_tail(&new->ue_node, &wc->w_unwritten_list);
  1876		new = NULL;
  1877	unlock:
  1878		spin_unlock(&oi->ip_lock);
  1879	out:
  1880		if (new)
> 1881			kfree(new);
  1882		return ret;
  1883	}
  1884	
  1885	/*
  1886	 * Populate each single-cluster write descriptor in the write context
  1887	 * with information about the i/o to be done.
  1888	 *
  1889	 * Returns the number of clusters that will have to be allocated, as

---
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