* [uml-devel] Humfs directory creation bug.
@ 2004-06-07 16:44 Piotr Neuman
2004-07-01 1:00 ` Jeff Dike
0 siblings, 1 reply; 2+ messages in thread
From: Piotr Neuman @ 2004-06-07 16:44 UTC (permalink / raw)
To: user-mode-linux-devel
[-- Attachment #1: Type: text/plain, Size: 774 bytes --]
Humfs code misreported device when getting stat info on directories. This code
hopefully fixes that (mv will work with hardlinks as expected now).
Apply to 2.4.26-1 UML release (in arch/um/fs/hostfs/). Patch:
Index: externfs.c
===================================================================
--- externfs.c (revision 708)
+++ externfs.c (working copy)
@@ -844,7 +844,6 @@
return(-ENOMEM);
err = (*ops->make_dir)(file, mode, current->fsuid, current->fsgid,
mount);
- kfree(file);
inode = get_inode(ino->i_sb, dentry, ops, 1);
if(IS_ERR(inode)){
@@ -852,6 +851,11 @@
goto out;
}
+ err = read_name(inode, file);
+ kfree(file);
+ if(err)
+ goto out;
+
d_instantiate(dentry, inode);
inode->i_nlink = 2;
inode->i_mode = S_IFDIR | mode;
[-- Attachment #2: humfs_mkdir.patch --]
[-- Type: text/x-diff, Size: 561 bytes --]
Index: externfs.c
===================================================================
--- externfs.c (revision 708)
+++ externfs.c (working copy)
@@ -844,7 +844,6 @@
return(-ENOMEM);
err = (*ops->make_dir)(file, mode, current->fsuid, current->fsgid,
mount);
- kfree(file);
inode = get_inode(ino->i_sb, dentry, ops, 1);
if(IS_ERR(inode)){
@@ -852,6 +851,11 @@
goto out;
}
+ err = read_name(inode, file);
+ kfree(file);
+ if(err)
+ goto out;
+
d_instantiate(dentry, inode);
inode->i_nlink = 2;
inode->i_mode = S_IFDIR | mode;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [uml-devel] Humfs directory creation bug.
2004-06-07 16:44 [uml-devel] Humfs directory creation bug Piotr Neuman
@ 2004-07-01 1:00 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2004-07-01 1:00 UTC (permalink / raw)
To: Piotr Neuman; +Cc: user-mode-linux-devel
sikkh@wp.pl said:
> Humfs code misreported device when getting stat info on directories.
> This code hopefully fixes that (mv will work with hardlinks as
> expected now).
> Apply to 2.4.26-1 UML release (in arch/um/fs/hostfs/). Patch:
Nice spotting.
However, you missed a kfree(file) along an error path.
Jeff
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-01 0:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-07 16:44 [uml-devel] Humfs directory creation bug Piotr Neuman
2004-07-01 1:00 ` Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.