dazuko-devel
[Top][All Lists]
Advanced

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

Re: [Dazuko-devel] Bug in mask_proc (repost)


From: Lino Sanfilippo
Subject: Re: [Dazuko-devel] Bug in mask_proc (repost)
Date: Thu, 26 Nov 2009 10:28:19 +0100
User-agent: Icedove 1.5.0.14eol (X11/20090105)

John Ogness wrote:
Probably a good (and efficient) fix would be to have check_recursion()
set a "removed" flag in the process structure. That way, open_file()
could very easily see if it has been removed or not. In my opinion,
that is much better than relying on the return value of dentry_open().

Rather than:

ec->file = dentry_open(dget(evt->dentry), mntget(evt->mnt),
                       O_RDONLY | O_LARGEFILE, current_cred());
if (IS_ERR(ec->file)) {
        check_recursion();  /* remove myself from proc_list */
        ret = PTR_ERR(ec->file);
        goto error_out2;
}

the code could look like this:

ec->file = dentry_open(dget(evt->dentry), mntget(evt->mnt),
                       O_RDONLY | O_LARGEFILE, current_cred());
if (!proc.removed)
        check_recursion();  /* remove myself from proc_list */
if (IS_ERR(ec->file)) {
        ret = PTR_ERR(ec->file);
        goto error_out2;
}

John Ogness

And what about the solution I suggested to avoid the whole
recursion thing (by simply passing _lower_ dentry and mount
to dazukofs_open()).
Do you (or someone else) see any problems with that?


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
***************************************************




reply via email to

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