aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-04-17 12:57:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-04-17 12:57:45 -0400
commit2a3a028fc61d03e80ac57091330eb514280bd5be (patch)
treec0f98d752faa37fed4d11231f08d368dce120786 /include
parent444fe991353987c1c9bc5ab1f903d01f1b4ad415 (diff)
parente6986423d28362aafe64d3757bbbc493f2687f8f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Handle init flow failures properly in iwlwifi driver, from Shahar S Matityahu. 2) mac80211 TXQs need to be unscheduled on powersave start, from Felix Fietkau. 3) SKB memory accounting fix in A-MDSU aggregation, from Felix Fietkau. 4) Increase RCU lock hold time in mlx5 FPGA code, from Saeed Mahameed. 5) Avoid checksum complete with XDP in mlx5, also from Saeed. 6) Fix netdev feature clobbering in ibmvnic driver, from Thomas Falcon. 7) Partial sent TLS record leak fix from Jakub Kicinski. 8) Reject zero size iova range in vhost, from Jason Wang. 9) Allow pending work to complete before clcsock release from Karsten Graul. 10) Fix XDP handling max MTU in thunderx, from Matteo Croce. 11) A lot of protocols look at the sa_family field of a sockaddr before validating it's length is large enough, from Tetsuo Handa. 12) Don't write to free'd pointer in qede ptp error path, from Colin Ian King. 13) Have to recompile IP options in ipv4_link_failure because it can be invoked from ARP, from Stephen Suryaputra. 14) Doorbell handling fixes in qed from Denis Bolotin. 15) Revert net-sysfs kobject register leak fix, it causes new problems. From Wang Hai. 16) Spectre v1 fix in ATM code, from Gustavo A. R. Silva. 17) Fix put of BROPT_VLAN_STATS_PER_PORT in bridging code, from Nikolay Aleksandrov. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (111 commits) socket: fix compat SO_RCVTIMEO_NEW/SO_SNDTIMEO_NEW tcp: tcp_grow_window() needs to respect tcp_space() ocelot: Clean up stats update deferred work ocelot: Don't sleep in atomic context (irqs_disabled()) net: bridge: fix netlink export of vlan_stats_per_port option qed: fix spelling mistake "faspath" -> "fastpath" tipc: set sysctl_tipc_rmem and named_timeout right range tipc: fix link established but not in session net: Fix missing meta data in skb with vlan packet net: atm: Fix potential Spectre v1 vulnerabilities net/core: work around section mismatch warning for ptp_classifier net: bridge: fix per-port af_packet sockets bnx2x: fix spelling mistake "dicline" -> "decline" route: Avoid crash from dereferencing NULL rt->from MAINTAINERS: normalize Woojung Huh's email address bonding: fix event handling for stacked bonds Revert "net-sysfs: Fix memory leak in netdev_register_kobject" rtnetlink: fix rtnl_valid_stats_req() nlmsg_len check qed: Fix the DORQ's attentions handling qed: Fix missing DORQ attentions ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h3
-rw-r--r--include/net/af_rxrpc.h4
-rw-r--r--include/net/cfg80211.h5
-rw-r--r--include/net/mac80211.h63
-rw-r--r--include/net/netrom.h2
-rw-r--r--include/net/sock.h6
-rw-r--r--include/net/tls.h4
7 files changed, 49 insertions, 38 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 26f69cf763f4..324e872c91d1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1500,6 +1500,7 @@ struct net_device_ops {
1500 * @IFF_FAILOVER: device is a failover master device 1500 * @IFF_FAILOVER: device is a failover master device
1501 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device 1501 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device
1502 * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device 1502 * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device
1503 * @IFF_LIVE_RENAME_OK: rename is allowed while device is up and running
1503 */ 1504 */
1504enum netdev_priv_flags { 1505enum netdev_priv_flags {
1505 IFF_802_1Q_VLAN = 1<<0, 1506 IFF_802_1Q_VLAN = 1<<0,
@@ -1532,6 +1533,7 @@ enum netdev_priv_flags {
1532 IFF_FAILOVER = 1<<27, 1533 IFF_FAILOVER = 1<<27,
1533 IFF_FAILOVER_SLAVE = 1<<28, 1534 IFF_FAILOVER_SLAVE = 1<<28,
1534 IFF_L3MDEV_RX_HANDLER = 1<<29, 1535 IFF_L3MDEV_RX_HANDLER = 1<<29,
1536 IFF_LIVE_RENAME_OK = 1<<30,
1535}; 1537};
1536 1538
1537#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN 1539#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -1563,6 +1565,7 @@ enum netdev_priv_flags {
1563#define IFF_FAILOVER IFF_FAILOVER 1565#define IFF_FAILOVER IFF_FAILOVER
1564#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE 1566#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
1565#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER 1567#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
1568#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK
1566 1569
1567/** 1570/**
1568 * struct net_device - The DEVICE structure. 1571 * struct net_device - The DEVICE structure.
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h
index 2bfb87eb98ce..78c856cba4f5 100644
--- a/include/net/af_rxrpc.h
+++ b/include/net/af_rxrpc.h
@@ -61,10 +61,12 @@ int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
61 rxrpc_user_attach_call_t, unsigned long, gfp_t, 61 rxrpc_user_attach_call_t, unsigned long, gfp_t,
62 unsigned int); 62 unsigned int);
63void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64); 63void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64);
64u32 rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *); 64bool rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *,
65 u32 *);
65void rxrpc_kernel_probe_life(struct socket *, struct rxrpc_call *); 66void rxrpc_kernel_probe_life(struct socket *, struct rxrpc_call *);
66u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *); 67u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *);
67bool rxrpc_kernel_get_reply_time(struct socket *, struct rxrpc_call *, 68bool rxrpc_kernel_get_reply_time(struct socket *, struct rxrpc_call *,
68 ktime_t *); 69 ktime_t *);
70bool rxrpc_kernel_call_is_complete(struct rxrpc_call *);
69 71
70#endif /* _NET_RXRPC_H */ 72#endif /* _NET_RXRPC_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index bb307a11ee63..13bfeb712d36 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -7183,6 +7183,11 @@ void cfg80211_pmsr_complete(struct wireless_dev *wdev,
7183#define wiphy_info(wiphy, format, args...) \ 7183#define wiphy_info(wiphy, format, args...) \
7184 dev_info(&(wiphy)->dev, format, ##args) 7184 dev_info(&(wiphy)->dev, format, ##args)
7185 7185
7186#define wiphy_err_ratelimited(wiphy, format, args...) \
7187 dev_err_ratelimited(&(wiphy)->dev, format, ##args)
7188#define wiphy_warn_ratelimited(wiphy, format, args...) \
7189 dev_warn_ratelimited(&(wiphy)->dev, format, ##args)
7190
7186#define wiphy_debug(wiphy, format, args...) \ 7191#define wiphy_debug(wiphy, format, args...) \
7187 wiphy_printk(KERN_DEBUG, wiphy, format, ##args) 7192 wiphy_printk(KERN_DEBUG, wiphy, format, ##args)
7188 7193
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ac2ed8ec662b..112dc18c658f 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -6231,8 +6231,6 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
6231 * @hw: pointer as obtained from ieee80211_alloc_hw() 6231 * @hw: pointer as obtained from ieee80211_alloc_hw()
6232 * @ac: AC number to return packets from. 6232 * @ac: AC number to return packets from.
6233 * 6233 *
6234 * Should only be called between calls to ieee80211_txq_schedule_start()
6235 * and ieee80211_txq_schedule_end().
6236 * Returns the next txq if successful, %NULL if no queue is eligible. If a txq 6234 * Returns the next txq if successful, %NULL if no queue is eligible. If a txq
6237 * is returned, it should be returned with ieee80211_return_txq() after the 6235 * is returned, it should be returned with ieee80211_return_txq() after the
6238 * driver has finished scheduling it. 6236 * driver has finished scheduling it.
@@ -6240,51 +6238,58 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
6240struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac); 6238struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac);
6241 6239
6242/** 6240/**
6243 * ieee80211_return_txq - return a TXQ previously acquired by ieee80211_next_txq() 6241 * ieee80211_txq_schedule_start - start new scheduling round for TXQs
6244 *
6245 * @hw: pointer as obtained from ieee80211_alloc_hw()
6246 * @txq: pointer obtained from station or virtual interface
6247 *
6248 * Should only be called between calls to ieee80211_txq_schedule_start()
6249 * and ieee80211_txq_schedule_end().
6250 */
6251void ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
6252
6253/**
6254 * ieee80211_txq_schedule_start - acquire locks for safe scheduling of an AC
6255 * 6242 *
6256 * @hw: pointer as obtained from ieee80211_alloc_hw() 6243 * @hw: pointer as obtained from ieee80211_alloc_hw()
6257 * @ac: AC number to acquire locks for 6244 * @ac: AC number to acquire locks for
6258 * 6245 *
6259 * Acquire locks needed to schedule TXQs from the given AC. Should be called 6246 * Should be called before ieee80211_next_txq() or ieee80211_return_txq().
6260 * before ieee80211_next_txq() or ieee80211_return_txq(). 6247 * The driver must not call multiple TXQ scheduling rounds concurrently.
6261 */ 6248 */
6262void ieee80211_txq_schedule_start(struct ieee80211_hw *hw, u8 ac) 6249void ieee80211_txq_schedule_start(struct ieee80211_hw *hw, u8 ac);
6263 __acquires(txq_lock); 6250
6251/* (deprecated) */
6252static inline void ieee80211_txq_schedule_end(struct ieee80211_hw *hw, u8 ac)
6253{
6254}
6255
6256void __ieee80211_schedule_txq(struct ieee80211_hw *hw,
6257 struct ieee80211_txq *txq, bool force);
6264 6258
6265/** 6259/**
6266 * ieee80211_txq_schedule_end - release locks for safe scheduling of an AC 6260 * ieee80211_schedule_txq - schedule a TXQ for transmission
6267 * 6261 *
6268 * @hw: pointer as obtained from ieee80211_alloc_hw() 6262 * @hw: pointer as obtained from ieee80211_alloc_hw()
6269 * @ac: AC number to acquire locks for 6263 * @txq: pointer obtained from station or virtual interface
6270 * 6264 *
6271 * Release locks previously acquired by ieee80211_txq_schedule_end(). 6265 * Schedules a TXQ for transmission if it is not already scheduled,
6266 * even if mac80211 does not have any packets buffered.
6267 *
6268 * The driver may call this function if it has buffered packets for
6269 * this TXQ internally.
6272 */ 6270 */
6273void ieee80211_txq_schedule_end(struct ieee80211_hw *hw, u8 ac) 6271static inline void
6274 __releases(txq_lock); 6272ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
6273{
6274 __ieee80211_schedule_txq(hw, txq, true);
6275}
6275 6276
6276/** 6277/**
6277 * ieee80211_schedule_txq - schedule a TXQ for transmission 6278 * ieee80211_return_txq - return a TXQ previously acquired by ieee80211_next_txq()
6278 * 6279 *
6279 * @hw: pointer as obtained from ieee80211_alloc_hw() 6280 * @hw: pointer as obtained from ieee80211_alloc_hw()
6280 * @txq: pointer obtained from station or virtual interface 6281 * @txq: pointer obtained from station or virtual interface
6282 * @force: schedule txq even if mac80211 does not have any buffered packets.
6281 * 6283 *
6282 * Schedules a TXQ for transmission if it is not already scheduled. Takes a 6284 * The driver may set force=true if it has buffered packets for this TXQ
6283 * lock, which means it must *not* be called between 6285 * internally.
6284 * ieee80211_txq_schedule_start() and ieee80211_txq_schedule_end()
6285 */ 6286 */
6286void ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq) 6287static inline void
6287 __acquires(txq_lock) __releases(txq_lock); 6288ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq,
6289 bool force)
6290{
6291 __ieee80211_schedule_txq(hw, txq, force);
6292}
6288 6293
6289/** 6294/**
6290 * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit 6295 * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
diff --git a/include/net/netrom.h b/include/net/netrom.h
index 5a0714ff500f..80f15b1c1a48 100644
--- a/include/net/netrom.h
+++ b/include/net/netrom.h
@@ -266,7 +266,7 @@ void nr_stop_idletimer(struct sock *);
266int nr_t1timer_running(struct sock *); 266int nr_t1timer_running(struct sock *);
267 267
268/* sysctl_net_netrom.c */ 268/* sysctl_net_netrom.c */
269void nr_register_sysctl(void); 269int nr_register_sysctl(void);
270void nr_unregister_sysctl(void); 270void nr_unregister_sysctl(void);
271 271
272#endif 272#endif
diff --git a/include/net/sock.h b/include/net/sock.h
index 8de5ee258b93..341f8bafa0cf 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2084,12 +2084,6 @@ static inline bool skwq_has_sleeper(struct socket_wq *wq)
2084 * @p: poll_table 2084 * @p: poll_table
2085 * 2085 *
2086 * See the comments in the wq_has_sleeper function. 2086 * See the comments in the wq_has_sleeper function.
2087 *
2088 * Do not derive sock from filp->private_data here. An SMC socket establishes
2089 * an internal TCP socket that is used in the fallback case. All socket
2090 * operations on the SMC socket are then forwarded to the TCP socket. In case of
2091 * poll, the filp->private_data pointer references the SMC socket because the
2092 * TCP socket has no file assigned.
2093 */ 2087 */
2094static inline void sock_poll_wait(struct file *filp, struct socket *sock, 2088static inline void sock_poll_wait(struct file *filp, struct socket *sock,
2095 poll_table *p) 2089 poll_table *p)
diff --git a/include/net/tls.h b/include/net/tls.h
index a5a938583295..5934246b2c6f 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -307,6 +307,7 @@ int tls_device_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
307int tls_device_sendpage(struct sock *sk, struct page *page, 307int tls_device_sendpage(struct sock *sk, struct page *page,
308 int offset, size_t size, int flags); 308 int offset, size_t size, int flags);
309void tls_device_sk_destruct(struct sock *sk); 309void tls_device_sk_destruct(struct sock *sk);
310void tls_device_free_resources_tx(struct sock *sk);
310void tls_device_init(void); 311void tls_device_init(void);
311void tls_device_cleanup(void); 312void tls_device_cleanup(void);
312int tls_tx_records(struct sock *sk, int flags); 313int tls_tx_records(struct sock *sk, int flags);
@@ -330,6 +331,7 @@ int tls_push_sg(struct sock *sk, struct tls_context *ctx,
330 int flags); 331 int flags);
331int tls_push_partial_record(struct sock *sk, struct tls_context *ctx, 332int tls_push_partial_record(struct sock *sk, struct tls_context *ctx,
332 int flags); 333 int flags);
334bool tls_free_partial_record(struct sock *sk, struct tls_context *ctx);
333 335
334static inline struct tls_msg *tls_msg(struct sk_buff *skb) 336static inline struct tls_msg *tls_msg(struct sk_buff *skb)
335{ 337{
@@ -379,7 +381,7 @@ tls_validate_xmit_skb(struct sock *sk, struct net_device *dev,
379static inline bool tls_is_sk_tx_device_offloaded(struct sock *sk) 381static inline bool tls_is_sk_tx_device_offloaded(struct sock *sk)
380{ 382{
381#ifdef CONFIG_SOCK_VALIDATE_XMIT 383#ifdef CONFIG_SOCK_VALIDATE_XMIT
382 return sk_fullsock(sk) & 384 return sk_fullsock(sk) &&
383 (smp_load_acquire(&sk->sk_validate_xmit_skb) == 385 (smp_load_acquire(&sk->sk_validate_xmit_skb) ==
384 &tls_validate_xmit_skb); 386 &tls_validate_xmit_skb);
385#else 387#else