Re: [RFC v14-rc][PATCH 04/23] General infrastructure for checkpoint restart

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

 



Quoting Oren Laadan (orenl@xxxxxxxxxxxxxxx):
> Changelog[v14]:
>   - Define sys_checkpoint(0,...) as asking for a self-checkpoint (Serge)

Thanks.

>   - Revert use of 'pr_fmt' to avoid tainting whom includes us (Nathan Lynch)
>   - Explicitly indicate length of UTS fields in header
>   - Discard field 'h->parent'

Nice.

> +	uts = utsname();
> +	ret = cr_write_buffer(ctx, uts->release, __NEW_UTS_LEN);
> +	if (ret < 0)
> +		return ret;
> +	ret = cr_write_buffer(ctx, uts->version, __NEW_UTS_LEN);
> +	if (ret < 0)
> +		return ret;
> +	ret = cr_write_buffer(ctx, uts->machine, __NEW_UTS_LEN);

...

> +	/* FIX: verify compatibility of release, version and machine */
> +	ret = cr_read_obj_type(ctx, uts_buf, __NEW_UTS_LEN, CR_HDR_BUFFER);
> +	if (ret < 0)
> +		goto out;
> +	ret = cr_read_obj_type(ctx, uts_buf, __NEW_UTS_LEN, CR_HDR_BUFFER);
> +	if (ret < 0)
> +		goto out;
> +	ret = cr_read_obj_type(ctx, uts_buf, __NEW_UTS_LEN, CR_HDR_BUFFER);

The new_utsname fields actually have __NEW_UTS_LEN+1 chars.  So
if hostname happens to be full (__NEW_UTS_LEN chars plus a final
null), won't you end up without the trailing null here?

-serge
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux