2002-01-26 10:32:41

by Konstantin Boldyshev

[permalink] [raw]
Subject: /proc and /dev/pts [acm]time bug

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