lkml.org 
[lkml]   [2000]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch-2.4.0-test5-pre1] nullfs and forced umount
Hi Manfred,

Thank you very much for your comments - they are very useful!
Let me first address the easy ones:

> > + lock_kernel();
> > + locks_remove_posix(file, files);
> > + locks_remove_flock(file);
> > + unlock_kernel();
>
> Now superflous, locks_remove_xy calls lock_kernel internally.

Agree. Fixed now.

> > +
> > +void disable_filesystem(struct vfsmount *mnt)
> > +{
>
> Please use get_task_struct(), task_lock() and atomic_inc(ref_count).
> Your code contains the same bug as the old access_process_vm code that
> caused crashes in 2.3.51(+-2)

Ok, so the loop over tasks should look like this?

repeat:
read_lock(&tasklist_lock);
for_each_task(p) {
blabla, need to block next
task_lock(p);
get_task_struct(p);
task_unlock(p);
read_unlock(&tasklist_lock);
block and manipulate p
goto repeat;
}

> > + if (flags&MNT_FORCE)
> > + disable_filesystem(mnt);
> > +
> Hmmm.
> What about module unload races?

if by module you mean nullfs then there are no races. Simply because
nullfs cannot be a module.

I will address the rest of your comments soon.

Regards,
Tigran


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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.051 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site