Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.9 commit in: /
Date: Mon, 11 May 2020 22:52:17
Message-Id: 1589237522.3965e59bb607dc512cb1de26942aa8ed37051a54.mpagano@gentoo
1 commit: 3965e59bb607dc512cb1de26942aa8ed37051a54
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 11 22:52:02 2020 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Mon May 11 22:52:02 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=3965e59b
7
8 Linux patch 4.9.223
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1222_linux-4.9.223.patch | 696 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 700 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index e92c377..b6392e3 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -931,6 +931,10 @@ Patch: 1221_linux-4.9.222.patch
21 From: http://www.kernel.org
22 Desc: Linux 4.9.222
23
24 +Patch: 1222_linux-4.9.223.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 4.9.223
27 +
28 Patch: 1500_XATTR_USER_PREFIX.patch
29 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
30 Desc: Support for namespace user.pax.* on tmpfs.
31
32 diff --git a/1222_linux-4.9.223.patch b/1222_linux-4.9.223.patch
33 new file mode 100644
34 index 0000000..33dc3b1
35 --- /dev/null
36 +++ b/1222_linux-4.9.223.patch
37 @@ -0,0 +1,696 @@
38 +diff --git a/Makefile b/Makefile
39 +index 67c9106594be..2a923301987e 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,6 +1,6 @@
43 + VERSION = 4
44 + PATCHLEVEL = 9
45 +-SUBLEVEL = 222
46 ++SUBLEVEL = 223
47 + EXTRAVERSION =
48 + NAME = Roaring Lionus
49 +
50 +diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
51 +index d3ba9f4105b5..8e04fe8325db 100644
52 +--- a/arch/mips/kernel/perf_event_mipsxx.c
53 ++++ b/arch/mips/kernel/perf_event_mipsxx.c
54 +@@ -1605,7 +1605,6 @@ static const struct mips_perf_event *mipsxx_pmu_map_raw_event(u64 config)
55 + break;
56 + case CPU_P5600:
57 + case CPU_P6600:
58 +- case CPU_I6400:
59 + /* 8-bit event numbers */
60 + raw_id = config & 0x1ff;
61 + base_id = raw_id & 0xff;
62 +@@ -1618,6 +1617,11 @@ static const struct mips_perf_event *mipsxx_pmu_map_raw_event(u64 config)
63 + raw_event.range = P;
64 + #endif
65 + break;
66 ++ case CPU_I6400:
67 ++ /* 8-bit event numbers */
68 ++ base_id = config & 0xff;
69 ++ raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
70 ++ break;
71 + case CPU_1004K:
72 + if (IS_BOTH_COUNTERS_1004K_EVENT(base_id))
73 + raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
74 +diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
75 +index e0648a09d9c8..194c0ab82e7c 100644
76 +--- a/arch/powerpc/kernel/pci_of_scan.c
77 ++++ b/arch/powerpc/kernel/pci_of_scan.c
78 +@@ -82,10 +82,16 @@ static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev)
79 + const __be32 *addrs;
80 + u32 i;
81 + int proplen;
82 ++ bool mark_unset = false;
83 +
84 + addrs = of_get_property(node, "assigned-addresses", &proplen);
85 +- if (!addrs)
86 +- return;
87 ++ if (!addrs || !proplen) {
88 ++ addrs = of_get_property(node, "reg", &proplen);
89 ++ if (!addrs || !proplen)
90 ++ return;
91 ++ mark_unset = true;
92 ++ }
93 ++
94 + pr_debug(" parse addresses (%d bytes) @ %p\n", proplen, addrs);
95 + for (; proplen >= 20; proplen -= 20, addrs += 5) {
96 + flags = pci_parse_of_flags(of_read_number(addrs, 1), 0);
97 +@@ -110,6 +116,8 @@ static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev)
98 + continue;
99 + }
100 + res->flags = flags;
101 ++ if (mark_unset)
102 ++ res->flags |= IORESOURCE_UNSET;
103 + res->name = pci_name(dev);
104 + region.start = base;
105 + region.end = base + size - 1;
106 +diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
107 +index 47c3d7f32900..437762a1e487 100644
108 +--- a/drivers/iio/adc/ad7793.c
109 ++++ b/drivers/iio/adc/ad7793.c
110 +@@ -570,7 +570,7 @@ static const struct iio_info ad7797_info = {
111 + .read_raw = &ad7793_read_raw,
112 + .write_raw = &ad7793_write_raw,
113 + .write_raw_get_fmt = &ad7793_write_raw_get_fmt,
114 +- .attrs = &ad7793_attribute_group,
115 ++ .attrs = &ad7797_attribute_group,
116 + .validate_trigger = ad_sd_validate_trigger,
117 + .driver_module = THIS_MODULE,
118 + };
119 +diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
120 +index 71525950c641..060f9b176929 100644
121 +--- a/drivers/net/dsa/b53/b53_common.c
122 ++++ b/drivers/net/dsa/b53/b53_common.c
123 +@@ -1109,6 +1109,7 @@ static int b53_arl_read(struct b53_device *dev, u64 mac,
124 + u16 vid, struct b53_arl_entry *ent, u8 *idx,
125 + bool is_valid)
126 + {
127 ++ DECLARE_BITMAP(free_bins, B53_ARLTBL_MAX_BIN_ENTRIES);
128 + unsigned int i;
129 + int ret;
130 +
131 +@@ -1116,6 +1117,8 @@ static int b53_arl_read(struct b53_device *dev, u64 mac,
132 + if (ret)
133 + return ret;
134 +
135 ++ bitmap_zero(free_bins, dev->num_arl_entries);
136 ++
137 + /* Read the bins */
138 + for (i = 0; i < dev->num_arl_entries; i++) {
139 + u64 mac_vid;
140 +@@ -1127,13 +1130,21 @@ static int b53_arl_read(struct b53_device *dev, u64 mac,
141 + B53_ARLTBL_DATA_ENTRY(i), &fwd_entry);
142 + b53_arl_to_entry(ent, mac_vid, fwd_entry);
143 +
144 +- if (!(fwd_entry & ARLTBL_VALID))
145 ++ if (!(fwd_entry & ARLTBL_VALID)) {
146 ++ set_bit(i, free_bins);
147 + continue;
148 ++ }
149 + if ((mac_vid & ARLTBL_MAC_MASK) != mac)
150 + continue;
151 + *idx = i;
152 ++ return 0;
153 + }
154 +
155 ++ if (bitmap_weight(free_bins, dev->num_arl_entries) == 0)
156 ++ return -ENOSPC;
157 ++
158 ++ *idx = find_first_bit(free_bins, dev->num_arl_entries);
159 ++
160 + return -ENOENT;
161 + }
162 +
163 +@@ -1163,10 +1174,21 @@ static int b53_arl_op(struct b53_device *dev, int op, int port,
164 + if (op)
165 + return ret;
166 +
167 +- /* We could not find a matching MAC, so reset to a new entry */
168 +- if (ret) {
169 ++ switch (ret) {
170 ++ case -ENOSPC:
171 ++ dev_dbg(dev->dev, "{%pM,%.4d} no space left in ARL\n",
172 ++ addr, vid);
173 ++ return is_valid ? ret : 0;
174 ++ case -ENOENT:
175 ++ /* We could not find a matching MAC, so reset to a new entry */
176 ++ dev_dbg(dev->dev, "{%pM,%.4d} not found, using idx: %d\n",
177 ++ addr, vid, idx);
178 + fwd_entry = 0;
179 +- idx = 1;
180 ++ break;
181 ++ default:
182 ++ dev_dbg(dev->dev, "{%pM,%.4d} found, using idx: %d\n",
183 ++ addr, vid, idx);
184 ++ break;
185 + }
186 +
187 + memset(&ent, 0, sizeof(ent));
188 +diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h
189 +index 85c44bfba55a..3cf246c6bdcc 100644
190 +--- a/drivers/net/dsa/b53/b53_regs.h
191 ++++ b/drivers/net/dsa/b53/b53_regs.h
192 +@@ -280,6 +280,9 @@
193 + #define ARLTBL_STATIC BIT(15)
194 + #define ARLTBL_VALID BIT(16)
195 +
196 ++/* Maximum number of bin entries in the ARL for all switches */
197 ++#define B53_ARLTBL_MAX_BIN_ENTRIES 4
198 ++
199 + /* ARL Search Control Register (8 bit) */
200 + #define B53_ARL_SRCH_CTL 0x50
201 + #define B53_ARL_SRCH_CTL_25 0x20
202 +diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
203 +index 6519dd33c7ca..5d67dbdd943d 100644
204 +--- a/drivers/net/ethernet/broadcom/bcmsysport.c
205 ++++ b/drivers/net/ethernet/broadcom/bcmsysport.c
206 +@@ -504,7 +504,8 @@ static struct sk_buff *bcm_sysport_rx_refill(struct bcm_sysport_priv *priv,
207 + dma_addr_t mapping;
208 +
209 + /* Allocate a new SKB for a new packet */
210 +- skb = netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH);
211 ++ skb = __netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH,
212 ++ GFP_ATOMIC | __GFP_NOWARN);
213 + if (!skb) {
214 + priv->mib.alloc_rx_buff_failed++;
215 + netif_err(priv, rx_err, ndev, "SKB alloc failed\n");
216 +diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
217 +index a23404480597..5d4189c94718 100644
218 +--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
219 ++++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
220 +@@ -1596,7 +1596,8 @@ static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv,
221 + dma_addr_t mapping;
222 +
223 + /* Allocate a new Rx skb */
224 +- skb = netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT);
225 ++ skb = __netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT,
226 ++ GFP_ATOMIC | __GFP_NOWARN);
227 + if (!skb) {
228 + priv->mib.alloc_rx_buff_failed++;
229 + netif_err(priv, rx_err, priv->dev,
230 +diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
231 +index 25136941a964..5b91a95476de 100644
232 +--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
233 ++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
234 +@@ -40,12 +40,16 @@ static u32 stmmac_config_sub_second_increment(void __iomem *ioaddr,
235 + unsigned long data;
236 + u32 reg_value;
237 +
238 +- /* For GMAC3.x, 4.x versions, convert the ptp_clock to nano second
239 +- * formula = (1/ptp_clock) * 1000000000
240 +- * where ptp_clock is 50MHz if fine method is used to update system
241 ++ /* For GMAC3.x, 4.x versions, in "fine adjustement mode" set sub-second
242 ++ * increment to twice the number of nanoseconds of a clock cycle.
243 ++ * The calculation of the default_addend value by the caller will set it
244 ++ * to mid-range = 2^31 when the remainder of this division is zero,
245 ++ * which will make the accumulator overflow once every 2 ptp_clock
246 ++ * cycles, adding twice the number of nanoseconds of a clock cycle :
247 ++ * 2000000000ULL / ptp_clock.
248 + */
249 + if (value & PTP_TCR_TSCFUPDT)
250 +- data = (1000000000ULL / 50000000);
251 ++ data = (2000000000ULL / ptp_clock);
252 + else
253 + data = (1000000000ULL / ptp_clock);
254 +
255 +diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c
256 +index e74664b84925..4e4167976acf 100644
257 +--- a/drivers/net/wimax/i2400m/usb-fw.c
258 ++++ b/drivers/net/wimax/i2400m/usb-fw.c
259 +@@ -354,6 +354,7 @@ out:
260 + usb_autopm_put_interface(i2400mu->usb_iface);
261 + d_fnend(8, dev, "(i2400m %p ack %p size %zu) = %ld\n",
262 + i2400m, ack, ack_size, (long) result);
263 ++ usb_put_urb(&notif_urb);
264 + return result;
265 +
266 + error_exceeded:
267 +diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
268 +index 2e37097916b5..2ac966400c42 100644
269 +--- a/drivers/vhost/vsock.c
270 ++++ b/drivers/vhost/vsock.c
271 +@@ -460,6 +460,11 @@ static int vhost_vsock_start(struct vhost_vsock *vsock)
272 + mutex_unlock(&vq->mutex);
273 + }
274 +
275 ++ /* Some packets may have been queued before the device was started,
276 ++ * let's kick the send worker to send them.
277 ++ */
278 ++ vhost_work_queue(&vsock->dev, &vsock->send_pkt_work);
279 ++
280 + mutex_unlock(&vsock->dev.mutex);
281 + return 0;
282 +
283 +diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
284 +index f2707ff795d4..c018d161735c 100644
285 +--- a/fs/cifs/connect.c
286 ++++ b/fs/cifs/connect.c
287 +@@ -341,8 +341,10 @@ static int reconn_set_ipaddr(struct TCP_Server_Info *server)
288 + return rc;
289 + }
290 +
291 ++ spin_lock(&cifs_tcp_ses_lock);
292 + rc = cifs_convert_address((struct sockaddr *)&server->dstaddr, ipaddr,
293 + strlen(ipaddr));
294 ++ spin_unlock(&cifs_tcp_ses_lock);
295 + kfree(ipaddr);
296 +
297 + return !rc ? -1 : 0;
298 +diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
299 +index d3417c18ee2f..dbab3036e4f5 100644
300 +--- a/include/linux/ieee80211.h
301 ++++ b/include/linux/ieee80211.h
302 +@@ -619,6 +619,15 @@ static inline bool ieee80211_is_qos_nullfunc(__le16 fc)
303 + cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
304 + }
305 +
306 ++/**
307 ++ * ieee80211_is_any_nullfunc - check if frame is regular or QoS nullfunc frame
308 ++ * @fc: frame control bytes in little-endian byteorder
309 ++ */
310 ++static inline bool ieee80211_is_any_nullfunc(__le16 fc)
311 ++{
312 ++ return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc));
313 ++}
314 ++
315 + /**
316 + * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
317 + * @fc: frame control field in little-endian byteorder
318 +diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h
319 +index 0f64fcee4ccd..8f383cca6bb1 100644
320 +--- a/lib/mpi/longlong.h
321 ++++ b/lib/mpi/longlong.h
322 +@@ -756,22 +756,22 @@ do { \
323 + do { \
324 + if (__builtin_constant_p(bh) && (bh) == 0) \
325 + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
326 +- : "=r" ((USItype)(sh)), \
327 +- "=&r" ((USItype)(sl)) \
328 ++ : "=r" (sh), \
329 ++ "=&r" (sl) \
330 + : "%r" ((USItype)(ah)), \
331 + "%r" ((USItype)(al)), \
332 + "rI" ((USItype)(bl))); \
333 + else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
334 + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
335 +- : "=r" ((USItype)(sh)), \
336 +- "=&r" ((USItype)(sl)) \
337 ++ : "=r" (sh), \
338 ++ "=&r" (sl) \
339 + : "%r" ((USItype)(ah)), \
340 + "%r" ((USItype)(al)), \
341 + "rI" ((USItype)(bl))); \
342 + else \
343 + __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
344 +- : "=r" ((USItype)(sh)), \
345 +- "=&r" ((USItype)(sl)) \
346 ++ : "=r" (sh), \
347 ++ "=&r" (sl) \
348 + : "%r" ((USItype)(ah)), \
349 + "r" ((USItype)(bh)), \
350 + "%r" ((USItype)(al)), \
351 +@@ -781,36 +781,36 @@ do { \
352 + do { \
353 + if (__builtin_constant_p(ah) && (ah) == 0) \
354 + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
355 +- : "=r" ((USItype)(sh)), \
356 +- "=&r" ((USItype)(sl)) \
357 ++ : "=r" (sh), \
358 ++ "=&r" (sl) \
359 + : "r" ((USItype)(bh)), \
360 + "rI" ((USItype)(al)), \
361 + "r" ((USItype)(bl))); \
362 + else if (__builtin_constant_p(ah) && (ah) == ~(USItype) 0) \
363 + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
364 +- : "=r" ((USItype)(sh)), \
365 +- "=&r" ((USItype)(sl)) \
366 ++ : "=r" (sh), \
367 ++ "=&r" (sl) \
368 + : "r" ((USItype)(bh)), \
369 + "rI" ((USItype)(al)), \
370 + "r" ((USItype)(bl))); \
371 + else if (__builtin_constant_p(bh) && (bh) == 0) \
372 + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
373 +- : "=r" ((USItype)(sh)), \
374 +- "=&r" ((USItype)(sl)) \
375 ++ : "=r" (sh), \
376 ++ "=&r" (sl) \
377 + : "r" ((USItype)(ah)), \
378 + "rI" ((USItype)(al)), \
379 + "r" ((USItype)(bl))); \
380 + else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
381 + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
382 +- : "=r" ((USItype)(sh)), \
383 +- "=&r" ((USItype)(sl)) \
384 ++ : "=r" (sh), \
385 ++ "=&r" (sl) \
386 + : "r" ((USItype)(ah)), \
387 + "rI" ((USItype)(al)), \
388 + "r" ((USItype)(bl))); \
389 + else \
390 + __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
391 +- : "=r" ((USItype)(sh)), \
392 +- "=&r" ((USItype)(sl)) \
393 ++ : "=r" (sh), \
394 ++ "=&r" (sl) \
395 + : "r" ((USItype)(ah)), \
396 + "r" ((USItype)(bh)), \
397 + "rI" ((USItype)(al)), \
398 +@@ -821,7 +821,7 @@ do { \
399 + do { \
400 + USItype __m0 = (m0), __m1 = (m1); \
401 + __asm__ ("mulhwu %0,%1,%2" \
402 +- : "=r" ((USItype) ph) \
403 ++ : "=r" (ph) \
404 + : "%r" (__m0), \
405 + "r" (__m1)); \
406 + (pl) = __m0 * __m1; \
407 +diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
408 +index 048389b5aa0f..58b80270e58c 100644
409 +--- a/net/mac80211/mlme.c
410 ++++ b/net/mac80211/mlme.c
411 +@@ -2277,7 +2277,7 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
412 + if (!ieee80211_is_data(hdr->frame_control))
413 + return;
414 +
415 +- if (ieee80211_is_nullfunc(hdr->frame_control) &&
416 ++ if (ieee80211_is_any_nullfunc(hdr->frame_control) &&
417 + sdata->u.mgd.probe_send_count > 0) {
418 + if (ack)
419 + ieee80211_sta_reset_conn_monitor(sdata);
420 +diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
421 +index a6f265262f15..d3334fd84ca2 100644
422 +--- a/net/mac80211/rx.c
423 ++++ b/net/mac80211/rx.c
424 +@@ -1231,8 +1231,7 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx)
425 + return RX_CONTINUE;
426 +
427 + if (ieee80211_is_ctl(hdr->frame_control) ||
428 +- ieee80211_is_nullfunc(hdr->frame_control) ||
429 +- ieee80211_is_qos_nullfunc(hdr->frame_control) ||
430 ++ ieee80211_is_any_nullfunc(hdr->frame_control) ||
431 + is_multicast_ether_addr(hdr->addr1))
432 + return RX_CONTINUE;
433 +
434 +@@ -1617,8 +1616,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
435 + * Drop (qos-)data::nullfunc frames silently, since they
436 + * are used only to control station power saving mode.
437 + */
438 +- if (ieee80211_is_nullfunc(hdr->frame_control) ||
439 +- ieee80211_is_qos_nullfunc(hdr->frame_control)) {
440 ++ if (ieee80211_is_any_nullfunc(hdr->frame_control)) {
441 + I802_DEBUG_INC(rx->local->rx_handlers_drop_nullfunc);
442 +
443 + /*
444 +@@ -2112,7 +2110,7 @@ static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
445 +
446 + /* Drop unencrypted frames if key is set. */
447 + if (unlikely(!ieee80211_has_protected(fc) &&
448 +- !ieee80211_is_nullfunc(fc) &&
449 ++ !ieee80211_is_any_nullfunc(fc) &&
450 + ieee80211_is_data(fc) && rx->key))
451 + return -EACCES;
452 +
453 +diff --git a/net/mac80211/status.c b/net/mac80211/status.c
454 +index 246d113bd755..1d81064b241d 100644
455 +--- a/net/mac80211/status.c
456 ++++ b/net/mac80211/status.c
457 +@@ -480,8 +480,7 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local,
458 + rcu_read_lock();
459 + sdata = ieee80211_sdata_from_skb(local, skb);
460 + if (sdata) {
461 +- if (ieee80211_is_nullfunc(hdr->frame_control) ||
462 +- ieee80211_is_qos_nullfunc(hdr->frame_control))
463 ++ if (ieee80211_is_any_nullfunc(hdr->frame_control))
464 + cfg80211_probe_status(sdata->dev, hdr->addr1,
465 + cookie, acked,
466 + GFP_ATOMIC);
467 +@@ -914,7 +913,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
468 + I802_DEBUG_INC(local->dot11FailedCount);
469 + }
470 +
471 +- if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc) &&
472 ++ if (ieee80211_is_any_nullfunc(fc) && ieee80211_has_pm(fc) &&
473 + ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) &&
474 + !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
475 + local->ps_sdata && !(local->scanning)) {
476 +diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
477 +index 850264fac378..6216279efc46 100644
478 +--- a/net/mac80211/tx.c
479 ++++ b/net/mac80211/tx.c
480 +@@ -294,7 +294,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
481 + if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
482 + test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
483 + !ieee80211_is_probe_req(hdr->frame_control) &&
484 +- !ieee80211_is_nullfunc(hdr->frame_control))
485 ++ !ieee80211_is_any_nullfunc(hdr->frame_control))
486 + /*
487 + * When software scanning only nullfunc frames (to notify
488 + * the sleep state to the AP) and probe requests (for the
489 +diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
490 +index fc67d356b5fa..acb0c2631c79 100644
491 +--- a/net/sctp/sm_make_chunk.c
492 ++++ b/net/sctp/sm_make_chunk.c
493 +@@ -856,7 +856,11 @@ struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc,
494 + sctp_shutdownhdr_t shut;
495 + __u32 ctsn;
496 +
497 +- ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
498 ++ if (chunk && chunk->asoc)
499 ++ ctsn = sctp_tsnmap_get_ctsn(&chunk->asoc->peer.tsn_map);
500 ++ else
501 ++ ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
502 ++
503 + shut.cum_tsn_ack = htonl(ctsn);
504 +
505 + retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0,
506 +diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
507 +index 2c472e1b4827..a84c3b681699 100644
508 +--- a/net/sunrpc/xprtrdma/backchannel.c
509 ++++ b/net/sunrpc/xprtrdma/backchannel.c
510 +@@ -71,21 +71,13 @@ out_fail:
511 + static int rpcrdma_bc_setup_reps(struct rpcrdma_xprt *r_xprt,
512 + unsigned int count)
513 + {
514 +- struct rpcrdma_rep *rep;
515 + int rc = 0;
516 +
517 + while (count--) {
518 +- rep = rpcrdma_create_rep(r_xprt);
519 +- if (IS_ERR(rep)) {
520 +- pr_err("RPC: %s: reply buffer alloc failed\n",
521 +- __func__);
522 +- rc = PTR_ERR(rep);
523 ++ rc = rpcrdma_create_rep(r_xprt);
524 ++ if (rc)
525 + break;
526 +- }
527 +-
528 +- rpcrdma_recv_buffer_put(rep);
529 + }
530 +-
531 + return rc;
532 + }
533 +
534 +diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
535 +index 1a2b1f61ed26..915a1ddabe03 100644
536 +--- a/net/sunrpc/xprtrdma/verbs.c
537 ++++ b/net/sunrpc/xprtrdma/verbs.c
538 +@@ -891,10 +891,17 @@ rpcrdma_create_req(struct rpcrdma_xprt *r_xprt)
539 + return req;
540 + }
541 +
542 +-struct rpcrdma_rep *
543 +-rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt)
544 ++/**
545 ++ * rpcrdma_create_rep - Allocate an rpcrdma_rep object
546 ++ * @r_xprt: controlling transport
547 ++ *
548 ++ * Returns 0 on success or a negative errno on failure.
549 ++ */
550 ++int
551 ++ rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt)
552 + {
553 + struct rpcrdma_create_data_internal *cdata = &r_xprt->rx_data;
554 ++ struct rpcrdma_buffer *buf = &r_xprt->rx_buf;
555 + struct rpcrdma_ia *ia = &r_xprt->rx_ia;
556 + struct rpcrdma_rep *rep;
557 + int rc;
558 +@@ -919,12 +926,18 @@ rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt)
559 + rep->rr_recv_wr.wr_cqe = &rep->rr_cqe;
560 + rep->rr_recv_wr.sg_list = &rep->rr_rdmabuf->rg_iov;
561 + rep->rr_recv_wr.num_sge = 1;
562 +- return rep;
563 ++
564 ++ spin_lock(&buf->rb_lock);
565 ++ list_add(&rep->rr_list, &buf->rb_recv_bufs);
566 ++ spin_unlock(&buf->rb_lock);
567 ++ return 0;
568 +
569 + out_free:
570 + kfree(rep);
571 + out:
572 +- return ERR_PTR(rc);
573 ++ dprintk("RPC: %s: reply buffer %d alloc failed\n",
574 ++ __func__, rc);
575 ++ return rc;
576 + }
577 +
578 + int
579 +@@ -967,17 +980,10 @@ rpcrdma_buffer_create(struct rpcrdma_xprt *r_xprt)
580 + }
581 +
582 + INIT_LIST_HEAD(&buf->rb_recv_bufs);
583 +- for (i = 0; i < buf->rb_max_requests + RPCRDMA_MAX_BC_REQUESTS; i++) {
584 +- struct rpcrdma_rep *rep;
585 +-
586 +- rep = rpcrdma_create_rep(r_xprt);
587 +- if (IS_ERR(rep)) {
588 +- dprintk("RPC: %s: reply buffer %d alloc failed\n",
589 +- __func__, i);
590 +- rc = PTR_ERR(rep);
591 ++ for (i = 0; i <= buf->rb_max_requests; i++) {
592 ++ rc = rpcrdma_create_rep(r_xprt);
593 ++ if (rc)
594 + goto out;
595 +- }
596 +- list_add(&rep->rr_list, &buf->rb_recv_bufs);
597 + }
598 +
599 + return 0;
600 +diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
601 +index 48989d5b2883..002305c38f7c 100644
602 +--- a/net/sunrpc/xprtrdma/xprt_rdma.h
603 ++++ b/net/sunrpc/xprtrdma/xprt_rdma.h
604 +@@ -502,8 +502,8 @@ int rpcrdma_ep_post_recv(struct rpcrdma_ia *, struct rpcrdma_rep *);
605 + * Buffer calls - xprtrdma/verbs.c
606 + */
607 + struct rpcrdma_req *rpcrdma_create_req(struct rpcrdma_xprt *);
608 +-struct rpcrdma_rep *rpcrdma_create_rep(struct rpcrdma_xprt *);
609 + void rpcrdma_destroy_req(struct rpcrdma_req *);
610 ++int rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt);
611 + int rpcrdma_buffer_create(struct rpcrdma_xprt *);
612 + void rpcrdma_buffer_destroy(struct rpcrdma_buffer *);
613 +
614 +diff --git a/scripts/config b/scripts/config
615 +index 026aeb4f32ee..73de17d39698 100755
616 +--- a/scripts/config
617 ++++ b/scripts/config
618 +@@ -6,6 +6,9 @@ myname=${0##*/}
619 + # If no prefix forced, use the default CONFIG_
620 + CONFIG_="${CONFIG_-CONFIG_}"
621 +
622 ++# We use an uncommon delimiter for sed substitutions
623 ++SED_DELIM=$(echo -en "\001")
624 ++
625 + usage() {
626 + cat >&2 <<EOL
627 + Manipulate options in a .config file from the command line.
628 +@@ -82,7 +85,7 @@ txt_subst() {
629 + local infile="$3"
630 + local tmpfile="$infile.swp"
631 +
632 +- sed -e "s:$before:$after:" "$infile" >"$tmpfile"
633 ++ sed -e "s$SED_DELIM$before$SED_DELIM$after$SED_DELIM" "$infile" >"$tmpfile"
634 + # replace original file with the edited one
635 + mv "$tmpfile" "$infile"
636 + }
637 +diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
638 +index ab16b81c0c7f..16a692fc7f64 100644
639 +--- a/sound/pci/hda/hda_intel.c
640 ++++ b/sound/pci/hda/hda_intel.c
641 +@@ -1966,9 +1966,10 @@ static const struct hdac_io_ops pci_hda_io_ops = {
642 + * some HD-audio PCI entries are exposed without any codecs, and such devices
643 + * should be ignored from the beginning.
644 + */
645 +-static const struct snd_pci_quirk driver_blacklist[] = {
646 +- SND_PCI_QUIRK(0x1462, 0xcb59, "MSI TRX40 Creator", 0),
647 +- SND_PCI_QUIRK(0x1462, 0xcb60, "MSI TRX40", 0),
648 ++static const struct pci_device_id driver_blacklist[] = {
649 ++ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1043, 0x874f) }, /* ASUS ROG Zenith II / Strix */
650 ++ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb59) }, /* MSI TRX40 Creator */
651 ++ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb60) }, /* MSI TRX40 */
652 + {}
653 + };
654 +
655 +@@ -1991,7 +1992,7 @@ static int azx_probe(struct pci_dev *pci,
656 + bool schedule_probe;
657 + int err;
658 +
659 +- if (snd_pci_quirk_lookup(pci, driver_blacklist)) {
660 ++ if (pci_match_id(driver_blacklist, pci)) {
661 + dev_info(&pci->dev, "Skipping the blacklisted device\n");
662 + return -ENODEV;
663 + }
664 +diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
665 +index 39810b713d5f..0c2a1413a8f5 100644
666 +--- a/sound/soc/codecs/sgtl5000.c
667 ++++ b/sound/soc/codecs/sgtl5000.c
668 +@@ -1464,6 +1464,40 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
669 + dev_err(&client->dev,
670 + "Error %d initializing CHIP_CLK_CTRL\n", ret);
671 +
672 ++ /* Mute everything to avoid pop from the following power-up */
673 ++ ret = regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_CTRL,
674 ++ SGTL5000_CHIP_ANA_CTRL_DEFAULT);
675 ++ if (ret) {
676 ++ dev_err(&client->dev,
677 ++ "Error %d muting outputs via CHIP_ANA_CTRL\n", ret);
678 ++ goto disable_clk;
679 ++ }
680 ++
681 ++ /*
682 ++ * If VAG is powered-on (e.g. from previous boot), it would be disabled
683 ++ * by the write to ANA_POWER in later steps of the probe code. This
684 ++ * may create a loud pop even with all outputs muted. The proper way
685 ++ * to circumvent this is disabling the bit first and waiting the proper
686 ++ * cool-down time.
687 ++ */
688 ++ ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, &value);
689 ++ if (ret) {
690 ++ dev_err(&client->dev, "Failed to read ANA_POWER: %d\n", ret);
691 ++ goto disable_clk;
692 ++ }
693 ++ if (value & SGTL5000_VAG_POWERUP) {
694 ++ ret = regmap_update_bits(sgtl5000->regmap,
695 ++ SGTL5000_CHIP_ANA_POWER,
696 ++ SGTL5000_VAG_POWERUP,
697 ++ 0);
698 ++ if (ret) {
699 ++ dev_err(&client->dev, "Error %d disabling VAG\n", ret);
700 ++ goto disable_clk;
701 ++ }
702 ++
703 ++ msleep(SGTL5000_VAG_POWERDOWN_DELAY);
704 ++ }
705 ++
706 + /* Follow section 2.2.1.1 of AN3663 */
707 + ana_pwr = SGTL5000_ANA_POWER_DEFAULT;
708 + if (sgtl5000->num_supplies <= VDDD) {
709 +diff --git a/sound/soc/codecs/sgtl5000.h b/sound/soc/codecs/sgtl5000.h
710 +index 22f3442af982..9ea41749d037 100644
711 +--- a/sound/soc/codecs/sgtl5000.h
712 ++++ b/sound/soc/codecs/sgtl5000.h
713 +@@ -236,6 +236,7 @@
714 + /*
715 + * SGTL5000_CHIP_ANA_CTRL
716 + */
717 ++#define SGTL5000_CHIP_ANA_CTRL_DEFAULT 0x0133
718 + #define SGTL5000_LINE_OUT_MUTE 0x0100
719 + #define SGTL5000_HP_SEL_MASK 0x0040
720 + #define SGTL5000_HP_SEL_SHIFT 6
721 +diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c
722 +index 1b2ce334bb3f..47c074d73e61 100644
723 +--- a/tools/testing/selftests/ipc/msgque.c
724 ++++ b/tools/testing/selftests/ipc/msgque.c
725 +@@ -135,7 +135,7 @@ int dump_queue(struct msgque_data *msgque)
726 + for (kern_id = 0; kern_id < 256; kern_id++) {
727 + ret = msgctl(kern_id, MSG_STAT, &ds);
728 + if (ret < 0) {
729 +- if (errno == -EINVAL)
730 ++ if (errno == EINVAL)
731 + continue;
732 + printf("Failed to get stats for IPC queue with id %d\n",
733 + kern_id);