Re: [PATCH 11/33] libceph: nuke bogus encoding version check in osdmap_apply_incremental()

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

 



On 03/27/2014 01:17 PM, Ilya Dryomov wrote:
> Only version 6 of osdmap encoding is supported, anything other than
> version 6 results in an error and halts the decoding process.  Checking
> if version is >= 5 is therefore bogus.

Looks good.

Reviewed-by: Alex Elder <elder@xxxxxxxxxx>

> Signed-off-by: Ilya Dryomov <ilya.dryomov@xxxxxxxxxxx>
> ---
>  net/ceph/osdmap.c |    9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
> index 0fc29a930c06..75e192e99173 100644
> --- a/net/ceph/osdmap.c
> +++ b/net/ceph/osdmap.c
> @@ -946,11 +946,10 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
>  		if (err < 0)
>  			goto bad;
>  	}
> -	if (version >= 5) {
> -		err = __decode_pool_names(p, end, map);
> -		if (err)
> -			goto bad;
> -	}
> +
> +	err = __decode_pool_names(p, end, map);
> +	if (err)
> +		goto bad;
>  
>  	/* old_pool */
>  	ceph_decode_32_safe(p, end, len, e_inval);
> 

--
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