aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-19 14:51:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-19 14:51:45 -0400
commit2ad0d52699700a91660a406a4046017a2d7f246a (patch)
treeeda80942d8671e60ef2d991fc68816784a41135c /include/linux
parente61cf2e3a5b452cfefcb145021f5a8ea88735cc1 (diff)
parente2948e5af8eeb6c945000772b7613b0323a0a203 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix races in IPVS, from Tan Hu. 2) Missing unbind in matchall classifier, from Hangbin Liu. 3) Missing act_ife action release, from Vlad Buslov. 4) Cure lockdep splats in ila, from Cong Wang. 5) veth queue leak on link delete, from Toshiaki Makita. 6) Disable isdn's IIOCDBGVAR ioctl, it exposes kernel addresses. From Kees Cook. 7) RCU usage fixup in XDP, from Tariq Toukan. 8) Two TCP ULP fixes from Daniel Borkmann. 9) r8169 needs REALTEK_PHY as a Kconfig dependency, from Heiner Kallweit. 10) Always take tcf_lock with BH disabled, otherwise we can deadlock with rate estimator code paths. From Vlad Buslov. 11) Don't use MSI-X on RTL8106e r8169 chips, they don't resume properly. From Jian-Hong Pan. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits) ip6_vti: fix creating fallback tunnel device for vti6 ip_vti: fix a null pointer deferrence when create vti fallback tunnel r8169: don't use MSI-X on RTL8106e net: lan743x_ptp: convert to ktime_get_clocktai_ts64 net: sched: always disable bh when taking tcf_lock ip6_vti: simplify stats handling in vti6_xmit bpf: fix redirect to map under tail calls r8169: add missing Kconfig dependency tools/bpf: fix bpf selftest test_cgroup_storage failure bpf, sockmap: fix sock_map_ctx_update_elem race with exist/noexist bpf, sockmap: fix map elem deletion race with smap_stop_sock bpf, sockmap: fix leakage of smap_psock_map_entry tcp, ulp: fix leftover icsk_ulp_ops preventing sock from reattach tcp, ulp: add alias for all ulp modules bpf: fix a rcu usage warning in bpf_prog_array_copy_core() samples/bpf: all XDP samples should unload xdp/bpf prog on SIGTERM net/xdp: Fix suspicious RCU usage warning net/mlx5e: Delete unneeded function argument Documentation: networking: ti-cpsw: correct cbs parameters for Eth1 100Mb isdn: Disable IIOCDBGVAR ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/filter.h3
-rw-r--r--include/linux/jiffies.h5
-rw-r--r--include/linux/spinlock.h17
3 files changed, 21 insertions, 4 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 5d565c50bcb2..6791a0ac0139 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -543,7 +543,6 @@ struct bpf_redirect_info {
543 u32 flags; 543 u32 flags;
544 struct bpf_map *map; 544 struct bpf_map *map;
545 struct bpf_map *map_to_flush; 545 struct bpf_map *map_to_flush;
546 unsigned long map_owner;
547 u32 kern_flags; 546 u32 kern_flags;
548}; 547};
549 548
@@ -781,6 +780,8 @@ static inline bool bpf_dump_raw_ok(void)
781struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, 780struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
782 const struct bpf_insn *patch, u32 len); 781 const struct bpf_insn *patch, u32 len);
783 782
783void bpf_clear_redirect_map(struct bpf_map *map);
784
784static inline bool xdp_return_frame_no_direct(void) 785static inline bool xdp_return_frame_no_direct(void)
785{ 786{
786 struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info); 787 struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info);
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index a27cf6652327..fa928242567d 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -447,6 +447,11 @@ static inline clock_t jiffies_delta_to_clock_t(long delta)
447 return jiffies_to_clock_t(max(0L, delta)); 447 return jiffies_to_clock_t(max(0L, delta));
448} 448}
449 449
450static inline unsigned int jiffies_delta_to_msecs(long delta)
451{
452 return jiffies_to_msecs(max(0L, delta));
453}
454
450extern unsigned long clock_t_to_jiffies(unsigned long x); 455extern unsigned long clock_t_to_jiffies(unsigned long x);
451extern u64 jiffies_64_to_clock_t(u64 x); 456extern u64 jiffies_64_to_clock_t(u64 x);
452extern u64 nsec_to_clock_t(u64 x); 457extern u64 nsec_to_clock_t(u64 x);
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 3190997df9ca..e089157dcf97 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -451,9 +451,20 @@ extern int _atomic_dec_and_lock_irqsave(atomic_t *atomic, spinlock_t *lock,
451#define atomic_dec_and_lock_irqsave(atomic, lock, flags) \ 451#define atomic_dec_and_lock_irqsave(atomic, lock, flags) \
452 __cond_lock(lock, _atomic_dec_and_lock_irqsave(atomic, lock, &(flags))) 452 __cond_lock(lock, _atomic_dec_and_lock_irqsave(atomic, lock, &(flags)))
453 453
454int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask, 454int __alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask,
455 size_t max_size, unsigned int cpu_mult, 455 size_t max_size, unsigned int cpu_mult,
456 gfp_t gfp); 456 gfp_t gfp, const char *name,
457 struct lock_class_key *key);
458
459#define alloc_bucket_spinlocks(locks, lock_mask, max_size, cpu_mult, gfp) \
460 ({ \
461 static struct lock_class_key key; \
462 int ret; \
463 \
464 ret = __alloc_bucket_spinlocks(locks, lock_mask, max_size, \
465 cpu_mult, gfp, #locks, &key); \
466 ret; \
467 })
457 468
458void free_bucket_spinlocks(spinlock_t *locks); 469void free_bucket_spinlocks(spinlock_t *locks);
459 470