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>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Oct 2012 14:35:03 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	a-fujita@...jp.nec.com
Cc:	linux-ext4@...r.kernel.org
Subject: re: ext4: Replace BUG_ON() with ext4_error() in move_extents.c

Hello Akira Fujita,

This is a semi-automatic email about new static checker warnings.

The patch 2147b1a6a48e: "ext4: Replace BUG_ON() with ext4_error() in 
move_extents.c" from Sep 16, 2009, leads to the following Smatch 
complaint:

fs/ext4/move_extent.c:693 mext_replace_branches()
	 warn: variable dereferenced before check 'dext' (see line 683)

fs/ext4/move_extent.c
   682		dext = donor_path[depth].p_ext;
   683		tmp_dext = *dext;
                           ^^^^^
Old dereference.

   684	
   685		*err = mext_calc_swap_extents(&tmp_dext, &tmp_oext, orig_off,
   686					      donor_off, count);
   687		if (*err)
   688			goto out;
   689	
   690		/* Loop for the donor extents */
   691		while (1) {
   692			/* The extent for donor must be found. */
   693			if (!dext) {
                            ^^^^^
This check was inside BUG_ON() macro before and so Smatch ignored it on
the basis that macros do a lot of unneeded checks.  But now it's outside
the macro it triggers a warning.

   694				EXT4_ERROR_INODE(donor_inode,
   695					   "The extent for donor must be found");

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ