ZFS: clock_t overflow in l2arc_feed_thread

Martin Matuska mm at FreeBSD.org
Tue Feb 1 11:17:57 UTC 2011

Please try the attached patch.


Dňa 29.01.2011 20:06, Artem Belevich wrote / napísal(a):
> On Sat, Jan 29, 2011 at 7:36 AM, Martin Matuska <mm at freebsd.org> wrote:
>> I agree to you that we have different types and this may be an issue but
>> I disagree to your patch.
>> clock_t is not signed (int64_t) and this can be done in a much easier
>> (and cleaner way) without touching the code, see attached patch.
> I like the minimalism of your patch.
> It should fix the overflow on LP64, but it would still be there on
> i386. To avoid this particular problem we need int64_t even on 32-bit
> platforms. Either that, or we should change the way we emulate
> solaris' LBOLT in FreeBSD.
> Another concern I have is with this patch we'll end up with parts of
> kernel compiled with 32-bit clock_t and other parts build with 64-bit
> clock_t. If someone passes a pointer to clock_t between these two
> classes of code, we'll have a problem.
> --Artem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zfs_clock_t.patch
Type: text/x-patch
Size: 400 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110201/57c1d7d7/zfs_clock_t.bin

More information about the freebsd-fs mailing list