Re: [PATCH bpf v2] bpf: fix unused-var without NETDEVICES

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

 



On 6/3/20 10:45 PM, Song Liu wrote:
On Wed, Jun 3, 2020 at 12:05 PM Matthieu Baerts
<matthieu.baerts@xxxxxxxxxxxx> wrote:

A recent commit added new variables only used if CONFIG_NETDEVICES is
set. A simple fix would be to only declare these variables if the same
condition is valid but Alexei suggested an even simpler solution:

     since CONFIG_NETDEVICES doesn't change anything in .h I think the
     best is to remove #ifdef CONFIG_NETDEVICES from net/core/filter.c
     and rely on sock_bindtoindex() returning ENOPROTOOPT in the extreme
     case of oddly configured kernels.

Fixes: 70c58997c1e8 ("bpf: Allow SO_BINDTODEVICE opt in bpf_setsockopt")
Suggested-by: Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx>
Signed-off-by: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx>

Acked-by: Song Liu <songliubraving@xxxxxx>

Applied, thanks!



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux