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-prev] [day] [month] [year] [list]
Message-Id: <1243920940.2170.12.camel@system>
Date:	Tue, 02 Jun 2009 11:05:40 +0530
From:	vibi sreenivasan <vibi_sreenivasan@....com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Jiri Slaby <jirislaby@...il.com>, Mimi Zohar <zohar@...ibm.com>,
	Kylene Hall <kylene@...ibm.com>,
	Serge Hallyn <serue@...ibm.com>,
	Reiner Sailer <sailer@...son.ibm.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	James Morris <jmorris@...ei.org>
Subject: Re: [PATCH]:RESEND : Return proper error value on failure of
	dentry_open

hi,
	Thanks for spending your time on my patch.
> > What bug did you hit?
i was using linus tree & not linux-next.
in that the code fragment was different
it was

		file = dentry_open(dentry, mnt, O_RDONLY, current->cred);
		rc = get_path_measurement(iint, file, dentry->d_name.name);
	}
out:
	mutex_unlock(&iint->mutex);
	if (file)
		fput(file);
	kref_put(&iint->refcount, iint_free);
	return 0;

So i hit a bug in fput.

My sincere apologies for taking all of yours valuable time.
I will take care that any of my future contributions will be
based on linux-next.

Thanks & Regards
vibi sreenivasan

> 	if (!(iint->flags & IMA_MEASURED)) {
> 		struct dentry *dentry = dget(path->dentry);
> 		struct vfsmount *mnt = mntget(path->mnt);
> 
> 		file = dentry_open(dentry, mnt, O_RDONLY | O_LARGEFILE,
> 				   current_cred());
> 		if (IS_ERR(file)) {
> 			pr_info("%s dentry_open failed\n", dentry->d_name.name);
> 			rc = PTR_ERR(file);
> 			file = NULL;
> 			goto out;
> 		}
> 		rc = get_path_measurement(iint, file, dentry->d_name.name);
> 	}
> out:
> 	mutex_unlock(&iint->mutex);
> 	if (file)
> 		fput(file);
> 	kref_put(&iint->refcount, iint_free);
> 	return 0;
> }
> 
> The handling of `file' looks OK to me.
> 
> otoh the function just drops the error code on the floor.  Shouldn't it
> return `rc'?
> 
> 
> 


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ