Re: posix-locks bugs

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

 



Timo,
 patch-666 fixes this. Thanks for the pointer!

avati

2007/12/18, Timo Sirainen <tss@xxxxxx>:
>
> new_posix_lock (struct flock *flock, transport_t *transport, pid_t
> client_pid)
> ..
>   if (flock->l_len == 0)
>     lock->fl_end = ULONG_MAX;
>
> fl_end is "signed long long" type pretty much everywhere. The main bug
> here is that with 64bit systems ULONG_MAX gets converted to -1, and
> l_len=0 locks break completely.
>
> With 32bit systems it also breaks if doing lock ranges above 4GB in a
> file, but this is probably less of a problem.
>
> So, this should work better:
>
>     lock->fl_end = LLONG_MAX;
>
> (BTW. Why aren't PGP signatures allowed here? I got "The message's
> content type was not explicitly allowed")
>
>
>
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel@xxxxxxxxxx
> http://lists.nongnu.org/mailman/listinfo/gluster-devel
>



-- 
If I traveled to the end of the rainbow
As Dame Fortune did intend,
Murphy would be there to tell me
The pot's at the other end.


[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux