Re: [PATCH RESEND] sctp: fix incorrect overflow check on autoclose

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 9, 2011, at 12:38 PM, Vladislav Yasevich wrote:
> I think this should be u32 since that's what sp->autoclose is.

Do you mean something like this?

	min_t(u32, sp->autoclose, MAX_SCHEDULE_TIMEOUT / HZ)

On 64-bit platform this would limit autoclose for no good
reason to

	(u32)(MAX_SCHEDULE_TIMEOUT / HZ),

which is basically 0x978d4fdf (assuming HZ is 250).  I guess the
intention was to allow autoclose to be any u32 on 64-bit platform.

- xi
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux