Patch for a ctdb reloadnodes crash Bugzilla ID 10366

Amitay Isaacs amitay at gmail.com
Wed Jan 22 17:55:59 MST 2014


On Thu, Jan 23, 2014 at 4:32 AM, Kevin Osborn
<kosborn at overlandstorage.com>wrote:

>  Thanks Amitay. One more question…
>
>
>
> Your patch didn’t incorporate a change that we had proposed on the first
> allocation. We had changed the size being passed in to be just struct
> ctdb_tcp_array instead of calculating the amount of memory needed to hold
> the array. The ctdb_tcp_array struct includes a pointer to an array but not
> an array itself so we thought this allocation unnecessary.  An allocation
> further down in your patch did not calculate the space needed so at the
> very least these allocations are inconsistent.
>
>
>
> I propose this for the first part of the patch
>
> ---- snip ----
>
>     /* If this is the first tickle */
>
>     if (tcparray == NULL) {
>
> -       tcparray = talloc_size(ctdb->nodes,
>
> +       tcparray = talloc_size(vnn, struct ctdb_tcp_array);
>
> ---- snip ----
>
>
>
> Thanks again,
>
>
>
> -Kevin
>


Hi Kevin,

I missed that connections is a pointer in the ctdb_tcp_array structure
rather than the usual array with single element as a place holder for the
array.  I have now included this change as well.

Thanks again.

Amitay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-daemon-Always-talloc-tickle-array-off-vnn-instead-of.patch
Type: text/x-patch
Size: 2578 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140123/cf500cca/attachment.bin>


More information about the samba-technical mailing list