[lkml]   [1997]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectpatch for 2.1.61 fat/msdos problems
The attached patch corrects a number of inode-related problems in the
fat and msdos filesystems, plus some memory leaks. One of the memory
leaks is very easy to trigger, and could allow a malicious user with
mount privileges to bring a system down pretty quickly.

A summary of the changes:
(1) in fat_put_inode, don't do anything until the last effective use,
then clean up any linked and depend inodes.

(2) in fat_put_super, iocharset wasn't always being freed

(3) in fat_read_super, most of the error exits failed to release the
iocharset buffer. I've restructured to code to clean everything up on

(4) The nls_io field wasn't being initialized, leading to an oops on
umount if you don't have the nls code page loaded.

(5) for msdos_rmdir, change the test on i_count > 1 to d_count > 1 after
shrinking child dentries. The shrink is being done with
shrink_dcache_sb for now, but will change to shrink_dcache_parent when
it becomes available. The code here seems to rely on the inode being
iput immediately, because it it isn't you get "FAT cache corruption"

(6) In msdos_rename, the code was losing track of linked and depend
inodes under certain circumstances, leading to leaked inode counts. I
think this is a latent bug in the old code that gets triggered easily
with the dentry layer keeping inodes around for longer.

The patch checks out OK here, but I'm not much of a user of msdos disks,
so I'd appreciate it if others could test it thoroughly. If you've
experienced problems with msdos or fat fs, like "Inodes busy after
umount", this should fix things up.

Bill[unhandled content-type:application/x-gzip]
 \ /
  Last update: 2005-03-22 13:40    [W:0.056 / U:0.044 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site