Tobias Klauser 582db7e0c4 bpf: devmap: pass on return value of bpf_map_precharge_memlock
If bpf_map_precharge_memlock in dev_map_alloc, -ENOMEM is returned
regardless of the actual error produced by bpf_map_precharge_memlock.
Fix it by passing on the error returned by bpf_map_precharge_memlock.

Also return -EINVAL instead of -ENOMEM if the page count overflow check
fails.

This makes dev_map_alloc match the behavior of other bpf maps' alloc
functions wrt. return values.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-18 16:53:30 -07:00
..
2017-05-12 15:57:15 -07:00
2017-09-08 18:26:48 -07:00
2017-05-23 10:01:37 +02:00
2017-08-16 16:48:34 -07:00
2017-09-05 09:46:59 -04:00
2017-01-12 07:01:56 -07:00
2017-07-15 20:46:47 -04:00
2017-05-18 10:30:19 -06:00
2017-09-12 13:21:00 -07:00
2017-09-08 18:26:51 -07:00
2017-07-25 15:08:32 +02:00
2017-08-21 12:47:31 -07:00
2017-09-08 18:26:48 -07:00
2016-12-22 22:58:37 -05:00
2017-09-04 19:05:15 -04:00