From: Andreas Dilger <adilger@clusterfs.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Linux Filesystem Development <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] Allow kernel-only mount interfaces...
Date: Thu, 10 Feb 2005 12:01:13 -0700 [thread overview]
Message-ID: <20050210190113.GT2635@schnapps.adilger.int> (raw)
In-Reply-To: <1108060883.9757.33.camel@lade.trondhjem.org>
[-- Attachment #1: Type: text/plain, Size: 656 bytes --]
On Feb 10, 2005 13:41 -0500, Trond Myklebust wrote:
> +struct vfsmount *
> +do_kern_mount(const char *fstype, int flags, const char *name, void *data)
> +{
> + struct file_system_type *type = get_fs_type(fstype);
> + struct vfsmount *mnt = vfs_kern_mount(type, flags, name, data);
> + put_filesystem(type);
> + return mnt;
> +}
This will OOPS if fstype is bad, since you unconditionally put_filesystem()
on a possible PTR_ERR() type. You need an extra
if (!IS_ERR(type))
put_filesystem(type);
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-02-10 19:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-10 18:41 [PATCH] Allow kernel-only mount interfaces Trond Myklebust
2005-02-10 19:01 ` Andreas Dilger [this message]
2005-02-10 19:14 ` Trond Myklebust
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=20050210190113.GT2635@schnapps.adilger.int \
--to=adilger@clusterfs.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=trond.myklebust@fys.uio.no \
/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;
as well as URLs for NNTP newsgroup(s).