Re: [PATCH] vxlan: Wrong type passed to %pIS

From: Cong Wang
Date: Sat Feb 07 2015 - 18:31:50 EST


On Sat, Feb 7, 2015 at 4:34 AM, Rasmus Villemoes
<linux@xxxxxxxxxxxxxxxxxx> wrote:
> On Sat, Feb 07 2015, Cong Wang <xiyou.wangcong@xxxxxxxxx> wrote:
>
>> On Fri, Feb 6, 2015 at 6:17 PM, Rasmus Villemoes
>> <linux@xxxxxxxxxxxxxxxxxx> wrote:
>>> src_ip is a pointer to a union vxlan_addr, one member of which is a
>>> struct sockaddr. Passing a pointer to src_ip is wrong; one should pass
>>> the value of src_ip itself. Since %pIS formally expects something of
>>> type struct sockaddr*, let's pass a pointer to the appropriate union
>>> member, though this of course doesn't change the generated code.
>>>
>>
>>
>> It is a union, this doesn't harm.
>>
>
> Just to be clear: This fixes a real bug. The minimal fix had been
>
> - src_mac, &rdst->remote_ip, &src_ip);
> + src_mac, &rdst->remote_ip, src_ip);
>
> but I through in the cosmetic improvements while the line needed
> changing anyway.
>

Ah, I misread the patch.

Acked-by: Cong Wang <xiyou.wangcong@xxxxxxxxx>

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/