| Commit message (Collapse) | Author | Files | Lines |
|
This means we do less computation on encapsulated payloads.
|
|
This way other devices that use Android style wakelocks will also have
the same semantics. We also move this logic into the handler so that
it's slightly cleaner and gives us some opportunity to leave a normal
comment.
Suggested-by: Theodore Ts'o <tytso@mit.edu>
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
|
|
|
|
If struct timer_list has not been setup, it is zeroed, in which case
timer_pending is false, so calling del_timer is safe. Calling del_timer
is also safe on a timer that has already been del_timer'd. And calling
del_timer is safe after a peer is dead, since the whole point of it
being dead is that no more timers are created and all contexts
eventually stop. Finally del_timer uses a lock, which means it's safe to
call it concurrently.
Therefore, we do not need any guards around calls to del_timer. While
we're at it, we can get rid of the old lingering timers_enabled boolean
which wasn't doing anything anyway anymore.
|
|
|
|
|
|
peer_remove calls sets is_dead to true and calls timers_stop before putting
the last reference, which means whenever timers do actually trigger,
they should only trigger with a reference, and therefore we don't need
the maybe_zero dance. This also narrows the scope of using maybe_zero to
just be lookup structures (the two hashtables and allowedips), which is
what the idiom is actually meant for.
|
|
|
|
|
|
Suggested-by: Andrew Lunn <andrew@lunn.ch>
|
|
Suggested-by: Andrew Lunn <andrew@lunn.ch>
|
|
Suggested-by: Jann Horn <jann@thejh.net>
|
|
Suggested-by: Jann Horn <jann@thejh.net>
|
|
|
|
An empty allowed IPs is totally valid, for folks wishing to move IP
addresses between multiple peers atomically.
Suggested-by: Comex <comexk@gmail.com>
|
|
Suggested-by: Comex <comexk@gmail.com>
|
|
|
|
|
|
Netlink returns NLM_F_DUMP_INTR if the set of all tunnels changed
during the dump. That's unfortunate, but is pretty common on busy
systems that are adding and removing tunnels all the time. Rather
than retrying, potentially indefinitely, we just work with the
partial results.
Reported-by: Robert Gerus <ar@is-a.cat>
|
|
|
|
We don't actually use any C11 features, so we can at least compile with
ancient gcc.
Reported-by: Aaron M. D. Jones <aaronmdjones@gmail.com>
|
|
This lets us be compiled with ancient gcc.
Reported-by: Jeff Brandt <jeff@jeffcolo.net>
|
|
|
|
Suggested-by: Jiri Pirko <jiri@resnulli.us>
|
|
Suggested-by: Jiri Pirko <jiri@resnulli.us>
|
|
Otherwise if gcc's optimizer is able to look far in but not overly far
in, we wind up with "warning: 'key' may be used uninitialized in this
function [-Wmaybe-uninitialized]".
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Suggested-by: Andrew Lunn <andrew@lunn.ch>
|
|
This is a significant rearrangement that makes things less clear, to satisfy
a checkpatch.pl requirement.
Suggested-by: Andrew Lunn <andrew@lunn.ch>
|
|
|
|
This required a bit of pruning of our christmas trees.
Suggested-by: Jiri Pirko <jiri@resnulli.us>
|
|
It's not used for anything, and LKML doesn't like the type being used as
an index value.
Suggested-by: Eugene Syromiatnikov <esyr@redhat.com>
|
|
|
|
|
|
This will deal with filename changes more gracefully.
Reported-by: Jordan Glover <Golden_Miller83@protonmail.ch>
|
|
Suggested-by: Jiri Pirko <jiri@resnulli.us>
|
|
This will make it so that kernels not having arch/$(SRCARCH)/Kbuild no
longer give any (non-fatal) grep errors such as "grep: arch/arm64/Kbuild:
No such file or directory".
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
|
|
|
|
|
|
|
|
|
|
Commit ad5e4210 (global: rename include'd C files to be .c) breaks
install target for dkms sources. Fix installing selftest/*.c.
Suggested-by: Christian Hesse <mail@eworm.de>
|
|
Pros: clearer if you're not familiar with the shift idiom, uses kernel
macro.
Cons: doesn't work any more if the lvalue ever ceases to be a bool.
Neutral: generates the same machine code.
Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
|
|
|
|
Or, put differently, we don't want to go chasing down random versions of
clang used by XDA users, so we just disable this checking on clang all
together.
|
|
Android kernels backported it, complicating things.
|
|
|
|
|
|
|
|
This is done by 259 other files in the kernel tree:
linux $ rg '#include.*\.c' -l | wc -l
259
Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
|
|
|