All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Greg KH <greg@kroah.com>
Cc: linux-security-module@wirex.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] LSM changes for 2.5.59
Date: Wed, 5 Feb 2003 08:48:52 +0000	[thread overview]
Message-ID: <20030205084852.B16212@infradead.org> (raw)
In-Reply-To: <20030205041611.GB16823@kroah.com>; from greg@kroah.com on Tue, Feb 04, 2003 at 08:16:11PM -0800

On Tue, Feb 04, 2003 at 08:16:11PM -0800, Greg KH wrote:
> diff -Nru a/fs/super.c b/fs/super.c
> --- a/fs/super.c	Wed Feb  5 14:58:37 2003
> +++ b/fs/super.c	Wed Feb  5 14:58:37 2003
> @@ -610,6 +610,7 @@
>  	struct file_system_type *type = get_fs_type(fstype);
>  	struct super_block *sb = ERR_PTR(-ENOMEM);
>  	struct vfsmount *mnt;
> +	int error;
>  
>  	if (!type)
>  		return ERR_PTR(-ENODEV);
> @@ -620,6 +621,13 @@
>  	sb = type->get_sb(type, flags, name, data);
>  	if (IS_ERR(sb))
>  		goto out_mnt;
> + 	error = security_sb_kern_mount(sb);
> + 	if (error) {
> + 		up_write(&sb->s_umount);
> + 		deactivate_super(sb);
> + 		sb = ERR_PTR(error);
> + 		goto out_mnt;
> + 	}

it would be nice if you could follow the syle in this function/file
and put the error handling code out of line.  This is a general
complaint, btw - the LSM hooks seldomly follow the style of the
code around :(


  parent reply	other threads:[~2003-02-05  8:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-05  4:15 [BK PATCH] LSM changes for 2.5.59 Greg KH
2003-02-05  4:16 ` [PATCH] " Greg KH
2003-02-05  4:16   ` Greg KH
2003-02-05  4:16     ` Greg KH
2003-02-05  4:17       ` Greg KH
2003-02-05  4:17         ` Greg KH
2003-02-05  4:17           ` Greg KH
2003-02-05  8:48   ` Christoph Hellwig [this message]
2003-02-05  8:47 ` [BK PATCH] " Christoph Hellwig

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=20030205084852.B16212@infradead.org \
    --to=hch@infradead.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@wirex.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.