Re: [PATCH] Updating id field in backports genl family

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

 



On  6/12/2018 4:50, Chi-hsien Lin wrote:
>On 06/11/2018 8:25, Johannes Berg wrote:
>> On Mon, 2018-06-11 at 05:29 -0500, Wan-Hua Chang wrote:
>>> Hi,
>>>
>>> I see the patch causes compiling error becasue family->family is not
>>> found when LINUX_VERSION >= 3.13
>>>
>>> backports/backport/backport-include/genetlink.h
>>> struct backport_genl_fmaily is only defined when LINUX_VERSION < 3.13
>>>

I built backports-output for recent kernels (4.4.92, for example) and didn't get any compilation errors.
Which version are you using?

>>>
>>> And in backports/backport/compat/backport-3.13.c line 127
>>>
>>> family->id = family->family.id
>>>
>>> it looks like this line has done what the patch want to do. Is the
>>> comprehension correct?

This line does update family id, but it gets **copy**->family.
copy->family.id in backport-4.12.c is changed, but family->family.id remains unchanged.

>> 
>> I guess we have to put an ifdef around this ...
>> 
>> Aaron?
>
>Hi Aaron,
>
>As Wan-Hua mentioned, it looks like backport-3.13.c line 127 syncs back 
>the id for backport_genl_family structure for kernel < 3.13 already.
>
>Could you please share more details about the failure you saw without 
>this change? What's the kernel version you used?
>

I am using target kernel version 3.10.104.
The problem I saw was that a driver using family id after calling genl_register_family would always get 0 instead of the actual value.

>
>Regards,
>Chi-hsien Lin
>
>> 
>> johannes
> .
> 

Aaron
    --
To unsubscribe from this list: send the line "unsubscribe backports" in




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux