lkml.org 
[lkml]   [1998]   [Jan]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateFri, 16 Jan 1998 00:15:21 -0500 (EST)
FromJon Lewis <>
SubjectRe: Linux inode.i_count overflow
On Wed, 14 Jan 1998, Pavel Machek wrote:

> Hi!
> 
> > >    Member i_count in struct inode contains the usage count. It is of type
> > >    unsigned short, which is only 16-bit long on i386. Unfortunately, it
> > >    is not enough. You can make it overflow by mapping one file many
> > >    times:
> > 
> > Making i_count unsigned long fixes this (Im sure its simple enough not to
> > need a patch). This should be in 2.0.34
> 
> Ok, it is simple, but *PLEASE* post that patch anyway.

--- include/linux/fs.h.orig     Wed Oct 15 18:22:04 1997
+++ include/linux/fs.h  Tue Jan 13 10:46:40 1998
@@ -304,7 +304,10 @@
        struct inode *i_hash_next, *i_hash_prev;
        struct inode *i_bound_to, *i_bound_by;
        struct inode *i_mount;
-       unsigned short i_count;
+/*     unsigned short i_count;
+SECURITY HACK
+*/
+       unsigned long i_count;
        unsigned short i_flags;
        unsigned char i_lock;
        unsigned char i_dirt;

------------------------------------------------------------------
 Jon Lewis <jlewis@fdt.net>  |  Unsolicited commercial e-mail will
 Network Administrator       |  be proof-read for $199/message.
 Florida Digital Turnpike    |  
______http://inorganic5.fdt.net/~jlewis/pgp for PGP public key____

\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008