dazuko-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dazuko-devel] patch 4 for dazukofs release 3.0.0


From: Lino Sanfilippo
Subject: [Dazuko-devel] patch 4 for dazukofs release 3.0.0
Date: Tue, 21 Apr 2009 19:01:29 +0200
User-agent: IceDove 1.5.0.14eol (X11/20090105)


Bug description:
The attempt to mount dazukofs over a regular file results in a kernel oops.

The solution is to ensure that the mount point is a directory.
(This is a repost of the patch posted on the 9th Feb. 2009. It is only
posted for the sake of completeness.)




Geschäftsführender Gesellschafter: Tjark Auerbach
Sitz der Gesellschaft: Tettnang
Handelsregister: Amtsgericht Ulm, HRB 630992
ALLGEMEINE GESCHÄFTSBEDINGUNGEN
Es gelten unsere Allgemeinen Geschäftsbedingungen
(AGB). Sie finden sie in der jeweils gültigen Fassung
im Internet unter http://www.avira.de/agb
***************************************************
diff -rup dazukofs-3.0.0-p3/super.c dazukofs-3.0.0-p4/super.c
--- dazukofs-3.0.0-p3/super.c   2009-03-15 18:24:16.000000000 +0100
+++ dazukofs-3.0.0-p4/super.c   2009-03-15 19:23:58.000000000 +0100
@@ -171,6 +171,11 @@ static int dazukofs_read_super(struct su
                goto out_put;
        }
 
+       if (!S_ISDIR(lower_root->d_inode->i_mode)) {
+               err = -ENOENT;
+               goto out_put;
+       }
+
        SET_LOWER_SB(sb, lower_root->d_sb);
        sb->s_maxbytes = lower_root->d_sb->s_maxbytes;
        SET_LOWER_DENTRY(sb->s_root, lower_root, lower_mnt);
@@ -213,6 +218,7 @@ static int dazukofs_get_sb(struct file_s
 
 out_abort:
        up_write(&sb->s_umount);
+       dput(sb->s_root);
        deactivate_super(sb);
 out:
        return err;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]