lkml.org 
[lkml]   [1997]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectUmsdos bug and query
In linux-2.0.27/fs/umsdos/namei.c, there is a bug which will be
triggered when the disk is full or has some other fault.
On line 724, result the entry for the --linux-.--- file is created. If
it fails, msdos_create can return without setting result. iput will
then be called with result set to an uninitialised value.

Line 712 /* #Specification: mkdir / umsdos directory / create EMD
When we created a new sub-directory in a UMSDOS
directory (one with full UMSDOS semantic), we
create immediately an EMD file in the new
sub-directory so it inherit UMSDOS semantic.
*/
struct inode *subdir;
ret = umsdos_real_lookup (dir,info.fake.fname
,info.fake.len,&subdir);
if (ret == 0){
struct inode *result;
Line 724 ret = msdos_create (subdir,UMSDOS_EMD_FILE
,UMSDOS_EMD_NAMELEN,S_IFREG|0777,&result);
subdir = NULL;
Line 726 iput (result);
}
if (ret < 0){
printk ("UMSDOS: Can't create empty --linux-.---\n");
}
iput (subdir);

It would be better if the printk were written:
printk (KERN_INFO "UMSDOS: Can't create empty " UMSDOS_EMD_FILE "\n");

On a related topic, is it possible to have an msdos directory under a
msdos directory? I've tried creating the directory under umsdos and
removing the --linux-.--- file under MSDOS. When you do this, '..' is
missing from the subdirectory causing getcwd to fail. '..' appears to
be present under MSDOS, but I wouldn't trust it to tell me the truth.

Peter Benie

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