2002-02-26 08:56:01

by Andrey Panin

[permalink] [raw]
Subject: [PATCH] remove unneeded inode semaphores from driverfs

Hi,

__remove_file() in driverfs/inode.c calls down(&dentry->d_inode->i_sem)
before calling vfs_unlink(dentry->d_parent->d_inode,dentry) which
tries to claim the same semaphore causing the livelock.
driverfs_remove_dir() makes the same calling vfs_rmdir().

These bugs are triggered by driverfs for IDE patch by Pavel Machek.

Best regards.

--
Andrey Panin | Embedded systems software engineer
[email protected] | PGP key: wwwkeys.eu.pgp.net


Attachments:
(No filename) (0.00 B)
(No filename) (232.00 B)
Download all attachments

2002-02-26 09:06:31

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] remove unneeded inode semaphores from driverfs

On Tue, Feb 26, 2002 at 11:59:46AM +0300, Andrey Panin wrote:
> Hi,
>
> __remove_file() in driverfs/inode.c calls down(&dentry->d_inode->i_sem)
> before calling vfs_unlink(dentry->d_parent->d_inode,dentry) which
> tries to claim the same semaphore causing the livelock.
> driverfs_remove_dir() makes the same calling vfs_rmdir().

What kernel version did you generate this patch for? This patch doesn't
apply at all to 2.5.5, and it looks like this problem is already fixed.

thanks,

greg k-h

2002-02-26 10:08:22

by Andrey Panin

[permalink] [raw]
Subject: Re: [PATCH] remove unneeded inode semaphores from driverfs

On Tue, Feb 26, 2002 at 12:59:53AM -0800, Greg KH wrote:
> On Tue, Feb 26, 2002 at 11:59:46AM +0300, Andrey Panin wrote:
> > Hi,
> >
> > __remove_file() in driverfs/inode.c calls down(&dentry->d_inode->i_sem)
> > before calling vfs_unlink(dentry->d_parent->d_inode,dentry) which
> > tries to claim the same semaphore causing the livelock.
> > driverfs_remove_dir() makes the same calling vfs_rmdir().
>
> What kernel version did you generate this patch for? This patch doesn't
> apply at all to 2.5.5, and it looks like this problem is already fixed.

It's against 2.5.5-pre1, I was out of the net for some days and
couldn't check final 2.5.5.

--
Andrey Panin | Embedded systems software engineer
[email protected] | PGP key: wwwkeys.eu.pgp.net


Attachments:
(No filename) (767.00 B)
(No filename) (232.00 B)
Download all attachments

2002-02-26 16:54:40

by Patrick Mochel

[permalink] [raw]
Subject: Re: [PATCH] remove unneeded inode semaphores from driverfs


On Tue, 26 Feb 2002, Andrey Panin wrote:

> On Tue, Feb 26, 2002 at 12:59:53AM -0800, Greg KH wrote:
> > On Tue, Feb 26, 2002 at 11:59:46AM +0300, Andrey Panin wrote:
> > > Hi,
> > >
> > > __remove_file() in driverfs/inode.c calls down(&dentry->d_inode->i_sem)
> > > before calling vfs_unlink(dentry->d_parent->d_inode,dentry) which
> > > tries to claim the same semaphore causing the livelock.
> > > driverfs_remove_dir() makes the same calling vfs_rmdir().
> >
> > What kernel version did you generate this patch for? This patch doesn't
> > apply at all to 2.5.5, and it looks like this problem is already fixed.
>
> It's against 2.5.5-pre1, I was out of the net for some days and
> couldn't check final 2.5.5.

>From the changelog, it is only the mysterious "device model/driverfs
updates", but it should have indeed been fixed in 2.5.5.

Thanks,

-pat