Re: [PATCH] LSM changes for 2.5.59

From: Christoph Hellwig (hch@infradead.org)
Date: Wed Feb 05 2003 - 03:48:52 EST


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 :(

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



This archive was generated by hypermail 2b29 : Fri Feb 07 2003 - 22:00:17 EST