2017-03-24 00:05:20

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the net-next tree with Linus' tree

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

kernel/bpf/hashtab.c

between commit:

8c290e60fa2a ("bpf: fix hashmap extra_elems logic")

from Linus' tree and commit:

bcc6b1b7ebf8 ("bpf: Add hash of maps support")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc kernel/bpf/hashtab.c
index 361a69dfe543,343fb5394c95..000000000000
--- a/kernel/bpf/hashtab.c
+++ b/kernel/bpf/hashtab.c
@@@ -582,7 -609,20 +616,15 @@@ static void htab_elem_free_rcu(struct r

static void free_htab_elem(struct bpf_htab *htab, struct htab_elem *l)
{
+ struct bpf_map *map = &htab->map;
+
+ if (map->ops->map_fd_put_ptr) {
+ void *ptr = fd_htab_map_get_ptr(map, l);
+
+ map->ops->map_fd_put_ptr(ptr);
+ }
+
- if (l->state == HTAB_EXTRA_ELEM_USED) {
- l->state = HTAB_EXTRA_ELEM_FREE;
- return;
- }
-
- if (!(htab->map.map_flags & BPF_F_NO_PREALLOC)) {
+ if (htab_is_prealloc(htab)) {
pcpu_freelist_push(&htab->freelist, &l->fnode);
} else {
atomic_dec(&htab->count);


2017-03-24 00:10:39

by David Miller

[permalink] [raw]
Subject: Re: linux-next: manual merge of the net-next tree with Linus' tree

From: Stephen Rothwell <[email protected]>
Date: Fri, 24 Mar 2017 11:05:14 +1100

> Hi all,
>
> Today's linux-next merge of the net-next tree got a conflict in:
>
> kernel/bpf/hashtab.c
>
> between commit:
>
> 8c290e60fa2a ("bpf: fix hashmap extra_elems logic")
>
> from Linus' tree and commit:
>
> bcc6b1b7ebf8 ("bpf: Add hash of maps support")
>
> from the net-next tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

I did the same resolution just an hour ago when merging net into
net-next.

Thanks!

2017-03-24 01:24:34

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: linux-next: manual merge of the net-next tree with Linus' tree

On 3/23/17 5:10 PM, David Miller wrote:
> From: Stephen Rothwell <[email protected]>
> Date: Fri, 24 Mar 2017 11:05:14 +1100
>
>> Hi all,
>>
>> Today's linux-next merge of the net-next tree got a conflict in:
>>
>> kernel/bpf/hashtab.c
>>
>> between commit:
>>
>> 8c290e60fa2a ("bpf: fix hashmap extra_elems logic")
>>
>> from Linus' tree and commit:
>>
>> bcc6b1b7ebf8 ("bpf: Add hash of maps support")
>>
>> from the net-next tree.
>>
>> I fixed it up (see below) and can carry the fix as necessary. This
>> is now fixed as far as linux-next is concerned, but any non trivial
>> conflicts should be mentioned to your upstream maintainer when your tree
>> is submitted for merging. You may also want to consider cooperating
>> with the maintainer of the conflicting tree to minimise any particularly
>> complex conflicts.
>
> I did the same resolution just an hour ago when merging net into
> net-next.

yes. that's correct merge conflict resolution.
Just rebuilt and retested. All looks good.
Thanks!