From: vibi sreenivasan <vibi_sreenivasan@cms.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Slaby <jirislaby@gmail.com>, Mimi Zohar <zohar@us.ibm.com>,
Kylene Hall <kylene@us.ibm.com>, Serge Hallyn <serue@us.ibm.com>,
Reiner Sailer <sailer@watson.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
James Morris <jmorris@namei.org>
Subject: Re: [PATCH]:RESEND : Return proper error value on failure of dentry_open
Date: Tue, 02 Jun 2009 11:05:40 +0530 [thread overview]
Message-ID: <1243920940.2170.12.camel@system> (raw)
In-Reply-To: <20090601222105.16e20612.akpm@linux-foundation.org>
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'?
>
>
>
next prev parent reply other threads:[~2009-06-02 5:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 6:11 [PATCH]:Return proper error value on failure of dentry_open vibi sreenivasan
2009-06-01 7:41 ` Jiri Slaby
2009-06-01 8:10 ` vibi sreenivasan
2009-06-01 8:27 ` [PATCH]:RESEND : Return " vibi sreenivasan
2009-06-01 8:39 ` Jiri Slaby
2009-06-02 5:21 ` Andrew Morton
2009-06-02 5:35 ` vibi sreenivasan [this message]
2009-06-01 20:37 ` [PATCH]:Return " Jon Masters
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1243920940.2170.12.camel@system \
--to=vibi_sreenivasan@cms.com \
--cc=akpm@linux-foundation.org \
--cc=jirislaby@gmail.com \
--cc=jmorris@namei.org \
--cc=kylene@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sailer@watson.ibm.com \
--cc=serue@us.ibm.com \
--cc=zohar@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox