Re: [PATCH] rbd: fix integer overflow in rbd_header_from_disk()

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

 



On Apr 18, 2012, at 10:21 AM, Alex Elder wrote:
> 
> This looks good, however I have changed it to use UINT_MAX
> rather than ULONG_MAX, because on some architectures size_t
> (__kernel_size_t) is defined as type (unsigned int).  It
> is the more conservative value, and even on architectures
> where __BITS_PER_LONG is 64, it still offers a sane upper
> bound on the number of snapshots for a rbd device.

Looks good to me.

BTW, on which arch is size_t 32-bit while long is 64?
Several commits still use ULONG_MAX, such as

http://git.kernel.org/linus/64486697

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


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux