[ovs-dev] [PATCH] datapath: Correctly return error if percpu allocation fails.
Jesse Gross
jesse at nicira.com
Tue Dec 14 00:09:08 UTC 2010
On Mon, Dec 13, 2010 at 3:38 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, Dec 13, 2010 at 03:32:04PM -0800, Jesse Gross wrote:
>> If the allocation of percpu stats fails when creating a new
>> datapath, we currently don't return the correct error code. Since
>> we don't explicitly set it when the allocation fails it will keep
>> the value from the previous call. This means we will return success
>> when the creation actually failed.
>>
>> Signed-off-by: Jesse Gross <jesse at nicira.com>
>
> Good catch, thanks.
>
> (I suspect that sometime in the distant past this allocation was just
> after some other allocation that had already set err to -ENOMEM.)
Yeah, I think you're right.
>
> Acked-by: Ben Pfaff <blp at nicira.com>
Thanks, I pushed this out.
More information about the dev
mailing list