/proc and /dev/pts [acm]time bug

Konstantin Boldyshev (konst@linuxassembly.org)
Sat, 26 Jan 2002 13:32:28 +0300 (MSK)


Hello,

It seems that there's a bug in how kernel sets time values
on directories when mounting virtual filesystems on them
(at least /proc and /dev/pts). If local time is not GMT,
it seems to add GMT offset to directory time. I.e. when
localtime is GMT+N, then /proc gets localtime+N time
(actually GMT+N*2), which leads to [acm]time in the
future (the same happens with GMT-N).

Try running 'stat /proc' right after boot and you'll get the idea.
Note that this is clearly /kernel/ issue (not glibc's or whatever),
it happens right after virtual fs is mounted. Perhaps it affects
virtual filesystems other than proc and devpts, but it doesn't
affect shm filesystem.

I tried on 2.4.17 and 2.0.39, both versions behave the same,
it seems that the bug is there for a long time :).

-- 
Regards,
Konstantin

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/