From 69045bde7854ef8e0f8bec7073f8eab65e98369d Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 24 Feb 2004 12:27:47 +0000 Subject: [PATCH] Handle bad or NULL data passed from mount to lustre. b=2529 --- lustre/llite/llite_lib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 36b0250..ceaa4e0 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -385,6 +385,9 @@ int lustre_process_log(struct lustre_mount_data *lmd, char * profile, int err; ENTRY; + if (lmd_bad_magic(lmd)) + RETURN(-EINVAL); + generate_random_uuid(uuid); class_uuid_unparse(uuid, &mdc_uuid); @@ -510,10 +513,9 @@ int lustre_fill_super(struct super_block *sb, void *data, int silent) ENTRY; CDEBUG(D_VFSTRACE, "VFS Op: sb %p\n", sb); - if (lmd == NULL) { - CERROR("lustre_mount_data is NULL: check that /sbin/mount.lustre exists?\n"); + if (lmd_bad_magic(lmd)) RETURN(-EINVAL); - } + sbi = lustre_init_sbi(sb); if (!sbi) RETURN(-ENOMEM); -- 1.8.3.1