Dear Linux kernel code maintainer,

on rechecking the current stable kernel code, I found some places where jiffies
were compared in a way that seems to break when they wrap. For these,
I made up patches to use the macros "time_before()" or "time_after()"
that are supposed to handle wraparound correctly.

For a small part of the patches, I believe you to be the relevant kernel code
maintainer. Appended to this email you will find some lines explaining
why I decided to mail or cc: you on this (an extract of the copyright notice
or the MAINTAINERS file), followed by the patch itself. If I mailed you
in error, please drop me a short note.

I kindly ask you to approve the correctness of the patch, and pass it on to
the relevant people for inclusion into the mainline kernel.

Thanks,
Tim Schmielau ([EMAIL PROTECTED])



KERNEL AUTOMOUNTER (AUTOFS)
P:      H. Peter Anvin
M:      [EMAIL PROTECTED]
L:      [EMAIL PROTECTED]
S:      Maintained

KERNEL AUTOMOUNTER v4 (AUTOFS4)
P:      Jeremy Fitzhardinge
M:      [EMAIL PROTECTED]
L:      [EMAIL PROTECTED]
S:      Maintained


--- linux-2.4.20-pre6/fs/autofs/root.c  Fri Sep 14 23:04:07 2001
+++ linux-2.4.20-pre6-jfix/fs/autofs/root.c     Wed Sep 11 11:57:00 2002
@@ -164,7 +164,7 @@
        /* Negative dentry.. invalidate if "old" */
        if (!dentry->d_inode) {
                unlock_kernel();
-               return (dentry->d_time - jiffies <= AUTOFS_NEGATIVE_TIMEOUT);
+               return time_after_eq(jiffies, dentry->d_time - 
+AUTOFS_NEGATIVE_TIMEOUT);
        }
                
        /* Check for a non-mountpoint directory */

--- linux-2.4.20-pre6/fs/autofs4/root.c Sat Aug  3 02:39:45 2002
+++ linux-2.4.20-pre6-jfix/fs/autofs4/root.c    Wed Sep 11 11:58:11 2002
@@ -161,7 +161,7 @@
 
        /* Negative dentry.. invalidate if "old" */
        if (dentry->d_inode == NULL)
-               return (dentry->d_time - jiffies <= AUTOFS_NEGATIVE_TIMEOUT);
+               return time_after_eq(jiffies, dentry->d_time - 
+AUTOFS_NEGATIVE_TIMEOUT);
 
        ino = autofs4_dentry_ino(dentry);
 
_______________________________________________
autofs mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to