timeout*HZ can overflow and produce a bad positive result for
some values of timeout, I think. Assuming timeout is
a long (I don't have the source handy), how about
if ((timeout < 0) || (timeout > LONG_MAX/HZ))
timeout = MAX_SCHEDULE_TIMEOUT;
else if (timeout > 0)
timeout = (timeout*HZ+999)/1000+1;
?
- Dan
-- Speaking only for myself, not for my employer- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/