main: deny modprobe when /mars is no mountpoint

This commit is contained in:
Thomas Schoebel-Theuer 2020-07-31 08:12:59 +02:00
parent 6d9ffefb84
commit ff79d8b30d

View File

@ -6861,6 +6861,11 @@ static int __init init_main(void)
return -ENOENT;
}
if (unlikely(!mars_is_mountpoint("/mars/"))) {
printk(KERN_ERR "/mars is no mountpoint\n");
return -EINVAL;
}
/* This must come first to be effective */
status = mars_stat(SAY_TEST_STR, &dummy, true);
if (!status)