04 Feb, 2006

1 commit

  • The implementation of int_sqrt() assumes that longs have 32 bits. On
    systems that have 64 bit longs this will result in gross errors when the
    argument to the function is greater than 2^32 - 1 on such systems. I doubt
    whether any such use is currently made of int_sqrt() but the attached patch
    fixes the problem anyway.

    Signed-off-by: Peter Williams
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Williams