History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

No conflicts.

Jakub Kicinski committed 4 years ago

Commit c59400a2 parents 9c30918 dcb85f8405 files · +4030 −2043Browse files

Showing the changes to include (20 of 405 files). Show all

Unified · Split

20 files
  1. include/linux/blkdev.h +1 −0
  2. include/linux/fs.h +1 −1
  3. include/linux/fsnotify.h +43 −6
  4. include/linux/if_vlan.h +4 −2
  5. include/linux/lsm_hook_defs.h +1 −1
  6. include/linux/mm.h +12 −5
  7. include/linux/mm_types.h +1 −0
  8. include/linux/psi.h +5 −6
  9. include/linux/quota.h +1 −1
  10. include/linux/sched.h +0 −1
  11. include/linux/suspend.h +1 −10
  12. include/linux/sysctl.h +1 −1
  13. include/linux/usb/role.h +6 −0
  14. include/net/ax25.h +12 −0
  15. include/net/neighbour.h +13 −5
  16. include/trace/perf.h +3 −2
  17. include/trace/trace_events.h +5 −4
  18. include/uapi/linux/cyclades.h +35 −0
  19. include/uapi/linux/kvm.h +1 −0
  20. include/uapi/linux/smc_diag.h +5 −6
include/linux/blkdev.h+1−0
@@ -1258,6 +1258,7 @@ unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors, · 1257 unmodified lines
12581258 void disk_end_io_acct(struct gendisk *disk, unsigned int op,
12591259 unsigned long start_time);
12601260
1261+void bio_start_io_acct_time(struct bio *bio, unsigned long start_time);
12611262 unsigned long bio_start_io_acct(struct bio *bio);
12621263 void bio_end_io_acct_remapped(struct bio *bio, unsigned long start_time,
12631264 struct block_device *orig_bdev);
include/linux/fs.h+1−1
@@ -1483,7 +1483,7 @@ struct super_block { · 1482 unmodified lines
14831483 #ifdef CONFIG_FS_VERITY
14841484 const struct fsverity_operations *s_vop;
14851485 #endif
1486−#ifdef CONFIG_UNICODE
1486+#if IS_ENABLED(CONFIG_UNICODE)
14871487 struct unicode_map *s_encoding;
14881488 __u16 s_encoding_flags;
14891489 #endif
include/linux/fsnotify.h+43−6
@@ -224,6 +224,43 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, · 223 unmodified lines
224224 dir, &new_dentry->d_name, 0);
225225 }
226226
227+/*
228+ * fsnotify_delete - @dentry was unlinked and unhashed
229+ *
230+ * Caller must make sure that dentry->d_name is stable.
231+ *
232+ * Note: unlike fsnotify_unlink(), we have to pass also the unlinked inode
233+ * as this may be called after d_delete() and old_dentry may be negative.
234+ */
235+static inline void fsnotify_delete(struct inode *dir, struct inode *inode,
236+ struct dentry *dentry)
237+{
238+ __u32 mask = FS_DELETE;
239+
240+ if (S_ISDIR(inode->i_mode))
241+ mask |= FS_ISDIR;
242+
243+ fsnotify_name(mask, inode, FSNOTIFY_EVENT_INODE, dir, &dentry->d_name,
244+ 0);
245+}
246+
247+/**
248+ * d_delete_notify - delete a dentry and call fsnotify_delete()
249+ * @dentry: The dentry to delete
250+ *
251+ * This helper is used to guaranty that the unlinked inode cannot be found
252+ * by lookup of this name after fsnotify_delete() event has been delivered.
253+ */
254+static inline void d_delete_notify(struct inode *dir, struct dentry *dentry)
255+{
256+ struct inode *inode = d_inode(dentry);
257+
258+ ihold(inode);
259+ d_delete(dentry);
260+ fsnotify_delete(dir, inode, dentry);
261+ iput(inode);
262+}
263+
227264 /*
228265 * fsnotify_unlink - 'name' was unlinked
229266 *
@@ -231,10 +268,10 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, · 1 unmodified line
231268 */
232269 static inline void fsnotify_unlink(struct inode *dir, struct dentry *dentry)
233270 {
234− /* Expected to be called before d_delete() */
235− WARN_ON_ONCE(d_is_negative(dentry));
271+ if (WARN_ON_ONCE(d_is_negative(dentry)))
272+ return;
236273
237− fsnotify_dirent(dir, dentry, FS_DELETE);
274+ fsnotify_delete(dir, d_inode(dentry), dentry);
238275 }
239276
240277 /*
@@ -258,10 +295,10 @@ static inline void fsnotify_mkdir(struct inode *dir, struct dentry *dentry) · 17 unmodified lines
258295 */
259296 static inline void fsnotify_rmdir(struct inode *dir, struct dentry *dentry)
260297 {
261− /* Expected to be called before d_delete() */
262− WARN_ON_ONCE(d_is_negative(dentry));
298+ if (WARN_ON_ONCE(d_is_negative(dentry)))
299+ return;
263300
264− fsnotify_dirent(dir, dentry, FS_DELETE | FS_ISDIR);
301+ fsnotify_delete(dir, d_inode(dentry), dentry);
265302 }
266303
267304 /*
include/linux/if_vlan.h+4−2
@@ -46,8 +46,10 @@ struct vlan_hdr { · 45 unmodified lines
4646 * @h_vlan_encapsulated_proto: packet type ID or len
4747 */
4848 struct vlan_ethhdr {
49− unsigned char h_dest[ETH_ALEN];
50− unsigned char h_source[ETH_ALEN];
49+ struct_group(addrs,
50+ unsigned char h_dest[ETH_ALEN];
51+ unsigned char h_source[ETH_ALEN];
52+ );
5153 __be16 h_vlan_proto;
5254 __be16 h_vlan_TCI;
5355 __be16 h_vlan_encapsulated_proto;
include/linux/lsm_hook_defs.h+1−1
@@ -80,7 +80,7 @@ LSM_HOOK(int, 0, sb_clone_mnt_opts, const struct super_block *oldsb, · 79 unmodified lines
8080 unsigned long *set_kern_flags)
8181 LSM_HOOK(int, 0, move_mount, const struct path *from_path,
8282 const struct path *to_path)
83−LSM_HOOK(int, 0, dentry_init_security, struct dentry *dentry,
83+LSM_HOOK(int, -EOPNOTSUPP, dentry_init_security, struct dentry *dentry,
8484 int mode, const struct qstr *name, const char **xattr_name,
8585 void **ctx, u32 *ctxlen)
8686 LSM_HOOK(int, 0, dentry_create_files_as, struct dentry *dentry, int mode,
include/linux/mm.h+12−5
@@ -1506,11 +1506,18 @@ static inline u8 page_kasan_tag(const struct page *page) · 1505 unmodified lines
15061506
15071507 static inline void page_kasan_tag_set(struct page *page, u8 tag)
15081508 {
1509− if (kasan_enabled()) {
1510− tag ^= 0xff;
1511− page->flags &= ~(KASAN_TAG_MASK << KASAN_TAG_PGSHIFT);
1512− page->flags |= (tag & KASAN_TAG_MASK) << KASAN_TAG_PGSHIFT;
1513− }
1509+ unsigned long old_flags, flags;
1510+
1511+ if (!kasan_enabled())
1512+ return;
1513+
1514+ tag ^= 0xff;
1515+ old_flags = READ_ONCE(page->flags);
1516+ do {
1517+ flags = old_flags;
1518+ flags &= ~(KASAN_TAG_MASK << KASAN_TAG_PGSHIFT);
1519+ flags |= (tag & KASAN_TAG_MASK) << KASAN_TAG_PGSHIFT;
1520+ } while (unlikely(!try_cmpxchg(&page->flags, &old_flags, flags)));
15141521 }
15151522
15161523 static inline void page_kasan_tag_reset(struct page *page)
include/linux/mm_types.h+1−0
@@ -261,6 +261,7 @@ static_assert(sizeof(struct page) == sizeof(struct folio)); · 260 unmodified lines
261261 static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
262262 FOLIO_MATCH(flags, flags);
263263 FOLIO_MATCH(lru, lru);
264+FOLIO_MATCH(mapping, mapping);
264265 FOLIO_MATCH(compound_head, lru);
265266 FOLIO_MATCH(index, index);
266267 FOLIO_MATCH(private, private);
include/linux/psi.h+5−6
@@ -25,18 +25,17 @@ void psi_memstall_enter(unsigned long *flags); · 24 unmodified lines
2525 void psi_memstall_leave(unsigned long *flags);
2626
2727 int psi_show(struct seq_file *s, struct psi_group *group, enum psi_res res);
28−
29−#ifdef CONFIG_CGROUPS
30−int psi_cgroup_alloc(struct cgroup *cgrp);
31−void psi_cgroup_free(struct cgroup *cgrp);
32−void cgroup_move_task(struct task_struct *p, struct css_set *to);
33−
3428 struct psi_trigger *psi_trigger_create(struct psi_group *group,
3529 char *buf, size_t nbytes, enum psi_res res);
3630 void psi_trigger_destroy(struct psi_trigger *t);
3731
3832 __poll_t psi_trigger_poll(void **trigger_ptr, struct file *file,
3933 poll_table *wait);
34+
35+#ifdef CONFIG_CGROUPS
36+int psi_cgroup_alloc(struct cgroup *cgrp);
37+void psi_cgroup_free(struct cgroup *cgrp);
38+void cgroup_move_task(struct task_struct *p, struct css_set *to);
4039 #endif
4140
4241 #else /* CONFIG_PSI */
include/linux/quota.h+1−1
@@ -91,7 +91,7 @@ extern bool qid_valid(struct kqid qid); · 90 unmodified lines
9191 *
9292 * When there is no mapping defined for the user-namespace, type,
9393 * qid tuple an invalid kqid is returned. Callers are expected to
94− * test for and handle handle invalid kqids being returned.
94+ * test for and handle invalid kqids being returned.
9595 * Invalid kqids may be tested for using qid_valid().
9696 */
9797 static inline struct kqid make_kqid(struct user_namespace *from,
include/linux/sched.h+0−1
@@ -1680,7 +1680,6 @@ extern struct pid *cad_pid; · 1679 unmodified lines
16801680 #define PF_MEMALLOC 0x00000800 /* Allocating memory */
16811681 #define PF_NPROC_EXCEEDED 0x00001000 /* set_user() noticed that RLIMIT_NPROC was exceeded */
16821682 #define PF_USED_MATH 0x00002000 /* If unset the fpu must be initialized before use */
1683−#define PF_USED_ASYNC 0x00004000 /* Used async_schedule*(), used by module init */
16841683 #define PF_NOFREEZE 0x00008000 /* This thread should not be frozen */
16851684 #define PF_FROZEN 0x00010000 /* Frozen for system suspend */
16861685 #define PF_KSWAPD 0x00020000 /* I am kswapd */
include/linux/suspend.h+1−10
@@ -430,15 +430,7 @@ struct platform_hibernation_ops { · 429 unmodified lines
430430
431431 #ifdef CONFIG_HIBERNATION
432432 /* kernel/power/snapshot.c */
433−extern void __register_nosave_region(unsigned long b, unsigned long e, int km);
434−static inline void __init register_nosave_region(unsigned long b, unsigned long e)
435−{
436− __register_nosave_region(b, e, 0);
437−}
438−static inline void __init register_nosave_region_late(unsigned long b, unsigned long e)
439−{
440− __register_nosave_region(b, e, 1);
441−}
433+extern void register_nosave_region(unsigned long b, unsigned long e);
442434 extern int swsusp_page_is_forbidden(struct page *);
443435 extern void swsusp_set_page_free(struct page *);
444436 extern void swsusp_unset_page_free(struct page *);
@@ -458,7 +450,6 @@ int pfn_is_nosave(unsigned long pfn); · 13 unmodified lines
458450 int hibernate_quiet_exec(int (*func)(void *data), void *data);
459451 #else /* CONFIG_HIBERNATION */
460452 static inline void register_nosave_region(unsigned long b, unsigned long e) {}
461−static inline void register_nosave_region_late(unsigned long b, unsigned long e) {}
462453 static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
463454 static inline void swsusp_set_page_free(struct page *p) {}
464455 static inline void swsusp_unset_page_free(struct page *p) {}
include/linux/sysctl.h+1−1
@@ -265,7 +265,7 @@ static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * · 264 unmodified lines
265265 return NULL;
266266 }
267267
268−static inline struct sysctl_header *register_sysctl_mount_point(const char *path)
268+static inline struct ctl_table_header *register_sysctl_mount_point(const char *path)
269269 {
270270 return NULL;
271271 }
include/linux/usb/role.h+6−0
@@ -91,6 +91,12 @@ fwnode_usb_role_switch_get(struct fwnode_handle *node) · 90 unmodified lines
9191
9292 static inline void usb_role_switch_put(struct usb_role_switch *sw) { }
9393
94+static inline struct usb_role_switch *
95+usb_role_switch_find_by_fwnode(const struct fwnode_handle *fwnode)
96+{
97+ return NULL;
98+}
99+
94100 static inline struct usb_role_switch *
95101 usb_role_switch_register(struct device *parent,
96102 const struct usb_role_switch_desc *desc)
include/net/ax25.h+12−0
@@ -227,6 +227,7 @@ typedef struct ax25_dev { · 226 unmodified lines
227227 #if defined(CONFIG_AX25_DAMA_SLAVE) || defined(CONFIG_AX25_DAMA_MASTER)
228228 ax25_dama_info dama;
229229 #endif
230+ refcount_t refcount;
230231 } ax25_dev;
231232
232233 typedef struct ax25_cb {
@@ -281,6 +282,17 @@ static __inline__ void ax25_cb_put(ax25_cb *ax25) · 48 unmodified lines
281282 }
282283 }
283284
285+static inline void ax25_dev_hold(ax25_dev *ax25_dev)
286+{
287+ refcount_inc(&ax25_dev->refcount);
288+}
289+
290+static inline void ax25_dev_put(ax25_dev *ax25_dev)
291+{
292+ if (refcount_dec_and_test(&ax25_dev->refcount)) {
293+ kfree(ax25_dev);
294+ }
295+}
284296 static inline __be16 ax25_type_trans(struct sk_buff *skb, struct net_device *dev)
285297 {
286298 skb->dev = dev;
include/net/neighbour.h+13−5
@@ -350,7 +350,8 @@ static inline struct neighbour *neigh_create(struct neigh_table *tbl, · 349 unmodified lines
350350 return __neigh_create(tbl, pkey, dev, true);
351351 }
352352 void neigh_destroy(struct neighbour *neigh);
353−int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb);
353+int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb,
354+ const bool immediate_ok);
354355 int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, u32 flags,
355356 u32 nlmsg_pid);
356357 void __neigh_set_probe_once(struct neighbour *neigh);
@@ -460,17 +461,24 @@ static inline struct neighbour * neigh_clone(struct neighbour *neigh) · 103 unmodified lines
460461
461462 #define neigh_hold(n) refcount_inc(&(n)->refcnt)
462463
463−static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
464+static __always_inline int neigh_event_send_probe(struct neighbour *neigh,
465+ struct sk_buff *skb,
466+ const bool immediate_ok)
464467 {
465468 unsigned long now = jiffies;
466−
469+
467470 if (READ_ONCE(neigh->used) != now)
468471 WRITE_ONCE(neigh->used, now);
469− if (!(neigh->nud_state&(NUD_CONNECTED|NUD_DELAY|NUD_PROBE)))
470− return __neigh_event_send(neigh, skb);
472+ if (!(neigh->nud_state & (NUD_CONNECTED | NUD_DELAY | NUD_PROBE)))
473+ return __neigh_event_send(neigh, skb, immediate_ok);
471474 return 0;
472475 }
473476
477+static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
478+{
479+ return neigh_event_send_probe(neigh, skb, true);
480+}
481+
474482 #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
475483 static inline int neigh_hh_bridge(struct hh_cache *hh, struct sk_buff *skb)
476484 {
include/trace/perf.h+3−2
@@ -23,8 +23,9 @@ · 22 unmodified lines
2323
2424 #undef __get_rel_dynamic_array
2525 #define __get_rel_dynamic_array(field) \
26− ((void *)(&__entry->__rel_loc_##field) + \
27− sizeof(__entry->__rel_loc_##field) + \
26+ ((void *)__entry + \
27+ offsetof(typeof(*__entry), __rel_loc_##field) + \
28+ sizeof(__entry->__rel_loc_##field) + \
2829 (__entry->__rel_loc_##field & 0xffff))
2930
3031 #undef __get_rel_dynamic_array_len
include/trace/trace_events.h+5−4
@@ -128,7 +128,7 @@ TRACE_MAKE_SYSTEM_STR(); · 127 unmodified lines
128128 struct trace_event_raw_##name { \
129129 struct trace_entry ent; \
130130 tstruct \
131− char __data[0]; \
131+ char __data[]; \
132132 }; \
133133 \
134134 static struct trace_event_class event_class_##name;
@@ -318,9 +318,10 @@ TRACE_MAKE_SYSTEM_STR(); · 183 unmodified lines
318318 #define __get_str(field) ((char *)__get_dynamic_array(field))
319319
320320 #undef __get_rel_dynamic_array
321−#define __get_rel_dynamic_array(field) \
322− ((void *)(&__entry->__rel_loc_##field) + \
323− sizeof(__entry->__rel_loc_##field) + \
321+#define __get_rel_dynamic_array(field) \
322+ ((void *)__entry + \
323+ offsetof(typeof(*__entry), __rel_loc_##field) + \
324+ sizeof(__entry->__rel_loc_##field) + \
324325 (__entry->__rel_loc_##field & 0xffff))
325326
326327 #undef __get_rel_dynamic_array_len
include/uapi/linux/cyclades.h+35−0
@@ -0,0 +1,35 @@
1+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+
3+#ifndef _UAPI_LINUX_CYCLADES_H
4+#define _UAPI_LINUX_CYCLADES_H
5+
6+#warning "Support for features provided by this header has been removed"
7+#warning "Please consider updating your code"
8+
9+struct cyclades_monitor {
10+ unsigned long int_count;
11+ unsigned long char_count;
12+ unsigned long char_max;
13+ unsigned long char_last;
14+};
15+
16+#define CYGETMON 0x435901
17+#define CYGETTHRESH 0x435902
18+#define CYSETTHRESH 0x435903
19+#define CYGETDEFTHRESH 0x435904
20+#define CYSETDEFTHRESH 0x435905
21+#define CYGETTIMEOUT 0x435906
22+#define CYSETTIMEOUT 0x435907
23+#define CYGETDEFTIMEOUT 0x435908
24+#define CYSETDEFTIMEOUT 0x435909
25+#define CYSETRFLOW 0x43590a
26+#define CYGETRFLOW 0x43590b
27+#define CYSETRTSDTR_INV 0x43590c
28+#define CYGETRTSDTR_INV 0x43590d
29+#define CYZSETPOLLCYCLE 0x43590e
30+#define CYZGETPOLLCYCLE 0x43590f
31+#define CYGETCD1400VER 0x435910
32+#define CYSETWAIT 0x435912
33+#define CYGETWAIT 0x435913
34+
35+#endif /* _UAPI_LINUX_CYCLADES_H */
include/uapi/linux/kvm.h+1−0
@@ -1133,6 +1133,7 @@ struct kvm_ppc_resize_hpt { · 1132 unmodified lines
11331133 #define KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM 206
11341134 #define KVM_CAP_VM_GPA_BITS 207
11351135 #define KVM_CAP_XSAVE2 208
1136+#define KVM_CAP_SYS_ATTRIBUTES 209
11361137
11371138 #ifdef KVM_CAP_IRQ_ROUTING
11381139
include/uapi/linux/smc_diag.h+5−6
@@ -84,12 +84,11 @@ struct smc_diag_conninfo { · 83 unmodified lines
8484 /* SMC_DIAG_LINKINFO */
8585
8686 struct smc_diag_linkinfo {
87− __u8 link_id; /* link identifier */
88− __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */
89− __u8 ibport; /* RDMA device port number */
90− __u8 gid[40]; /* local GID */
91− __u8 peer_gid[40]; /* peer GID */
92− __aligned_u64 net_cookie; /* RDMA device net namespace */
87+ __u8 link_id; /* link identifier */
88+ __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */
89+ __u8 ibport; /* RDMA device port number */
90+ __u8 gid[40]; /* local GID */
91+ __u8 peer_gid[40]; /* peer GID */
9392 };
9493
9594 struct smc_diag_lgrinfo {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t