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: Tue, 10 Sep 2019 11:11:02
Message-Id: 1568113845.8f74a190cf6c75962fb3b16ecf8157b2a1061376.mpagano@gentoo
1 commit: 8f74a190cf6c75962fb3b16ecf8157b2a1061376
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 10 11:10:45 2019 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 10 11:10:45 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=8f74a190
7
8 Linux patch 4.9.192
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1191_linux-4.9.192.patch | 612 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 616 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 04712fb..9e9b006 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -807,6 +807,10 @@ Patch: 1190_linux-4.9.191.patch
21 From: http://www.kernel.org
22 Desc: Linux 4.9.191
23
24 +Patch: 1191_linux-4.9.192.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 4.9.192
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/1191_linux-4.9.192.patch b/1191_linux-4.9.192.patch
33 new file mode 100644
34 index 0000000..a2a0ff3
35 --- /dev/null
36 +++ b/1191_linux-4.9.192.patch
37 @@ -0,0 +1,612 @@
38 +diff --git a/Makefile b/Makefile
39 +index 311e861afb15..946951930f62 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,6 +1,6 @@
43 + VERSION = 4
44 + PATCHLEVEL = 9
45 +-SUBLEVEL = 191
46 ++SUBLEVEL = 192
47 + EXTRAVERSION =
48 + NAME = Roaring Lionus
49 +
50 +diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
51 +index 08443a15e6be..3caee91bca08 100644
52 +--- a/arch/arm/kvm/mmio.c
53 ++++ b/arch/arm/kvm/mmio.c
54 +@@ -98,6 +98,12 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run)
55 + unsigned int len;
56 + int mask;
57 +
58 ++ /* Detect an already handled MMIO return */
59 ++ if (unlikely(!vcpu->mmio_needed))
60 ++ return 0;
61 ++
62 ++ vcpu->mmio_needed = 0;
63 ++
64 + if (!run->mmio.is_write) {
65 + len = run->mmio.len;
66 + if (len > sizeof(unsigned long))
67 +@@ -200,6 +206,7 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
68 + run->mmio.is_write = is_write;
69 + run->mmio.phys_addr = fault_ipa;
70 + run->mmio.len = len;
71 ++ vcpu->mmio_needed = 1;
72 +
73 + if (!ret) {
74 + /* We handled the access successfully in the kernel. */
75 +diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
76 +index 37666c536741..928ffdc21873 100644
77 +--- a/arch/x86/kernel/apic/apic.c
78 ++++ b/arch/x86/kernel/apic/apic.c
79 +@@ -1067,10 +1067,6 @@ void clear_local_APIC(void)
80 + apic_write(APIC_LVT0, v | APIC_LVT_MASKED);
81 + v = apic_read(APIC_LVT1);
82 + apic_write(APIC_LVT1, v | APIC_LVT_MASKED);
83 +- if (!x2apic_enabled()) {
84 +- v = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
85 +- apic_write(APIC_LDR, v);
86 +- }
87 + if (maxlvt >= 4) {
88 + v = apic_read(APIC_LVTPC);
89 + apic_write(APIC_LVTPC, v | APIC_LVT_MASKED);
90 +diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
91 +index 28afd5d585f9..b7dfa4afd516 100644
92 +--- a/drivers/bluetooth/btqca.c
93 ++++ b/drivers/bluetooth/btqca.c
94 +@@ -363,6 +363,9 @@ int qca_uart_setup_rome(struct hci_dev *hdev, uint8_t baudrate)
95 + return err;
96 + }
97 +
98 ++ /* Give the controller some time to get ready to receive the NVM */
99 ++ msleep(10);
100 ++
101 + /* Download NVM configuration */
102 + config.type = TLV_TYPE_NVM;
103 + snprintf(config.fwname, sizeof(config.fwname), "qca/nvm_%08x.bin",
104 +diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
105 +index d9323d7c479c..f32ffd74ec47 100644
106 +--- a/drivers/infiniband/hw/mlx4/mad.c
107 ++++ b/drivers/infiniband/hw/mlx4/mad.c
108 +@@ -1643,8 +1643,6 @@ tx_err:
109 + tx_buf_size, DMA_TO_DEVICE);
110 + kfree(tun_qp->tx_ring[i].buf.addr);
111 + }
112 +- kfree(tun_qp->tx_ring);
113 +- tun_qp->tx_ring = NULL;
114 + i = MLX4_NUM_TUNNEL_BUFS;
115 + err:
116 + while (i > 0) {
117 +@@ -1653,6 +1651,8 @@ err:
118 + rx_buf_size, DMA_FROM_DEVICE);
119 + kfree(tun_qp->ring[i].addr);
120 + }
121 ++ kfree(tun_qp->tx_ring);
122 ++ tun_qp->tx_ring = NULL;
123 + kfree(tun_qp->ring);
124 + tun_qp->ring = NULL;
125 + return -ENOMEM;
126 +diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
127 +index 20455d082cb8..61c55621b958 100644
128 +--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
129 ++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
130 +@@ -2781,8 +2781,10 @@ static ssize_t blocked_fl_write(struct file *filp, const char __user *ubuf,
131 + return -ENOMEM;
132 +
133 + err = bitmap_parse_user(ubuf, count, t, adap->sge.egr_sz);
134 +- if (err)
135 ++ if (err) {
136 ++ kvfree(t);
137 + return err;
138 ++ }
139 +
140 + bitmap_copy(adap->sge.blocked_fl, t, adap->sge.egr_sz);
141 + t4_free_mem(t);
142 +diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
143 +index 955f658f3b65..de9897c8e933 100644
144 +--- a/drivers/net/ethernet/ibm/ibmveth.c
145 ++++ b/drivers/net/ethernet/ibm/ibmveth.c
146 +@@ -1557,7 +1557,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
147 + struct net_device *netdev;
148 + struct ibmveth_adapter *adapter;
149 + unsigned char *mac_addr_p;
150 +- unsigned int *mcastFilterSize_p;
151 ++ __be32 *mcastFilterSize_p;
152 + long ret;
153 + unsigned long ret_attr;
154 +
155 +@@ -1579,8 +1579,9 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
156 + return -EINVAL;
157 + }
158 +
159 +- mcastFilterSize_p = (unsigned int *)vio_get_attribute(dev,
160 +- VETH_MCAST_FILTER_SIZE, NULL);
161 ++ mcastFilterSize_p = (__be32 *)vio_get_attribute(dev,
162 ++ VETH_MCAST_FILTER_SIZE,
163 ++ NULL);
164 + if (!mcastFilterSize_p) {
165 + dev_err(&dev->dev, "Can't find VETH_MCAST_FILTER_SIZE "
166 + "attribute\n");
167 +@@ -1597,7 +1598,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
168 +
169 + adapter->vdev = dev;
170 + adapter->netdev = netdev;
171 +- adapter->mcastFilterSize = *mcastFilterSize_p;
172 ++ adapter->mcastFilterSize = be32_to_cpu(*mcastFilterSize_p);
173 + adapter->pool_config = 0;
174 +
175 + netif_napi_add(netdev, &adapter->napi, ibmveth_poll, 16);
176 +diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
177 +index 6d1a956e3f77..02ec326cb129 100644
178 +--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
179 ++++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
180 +@@ -4113,7 +4113,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
181 + * setup (if available). */
182 + status = myri10ge_request_irq(mgp);
183 + if (status != 0)
184 +- goto abort_with_firmware;
185 ++ goto abort_with_slices;
186 + myri10ge_free_irq(mgp);
187 +
188 + /* Save configuration space to be restored if the
189 +diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
190 +index 480883a7a3e5..545cb6262cff 100644
191 +--- a/drivers/net/ethernet/renesas/ravb_main.c
192 ++++ b/drivers/net/ethernet/renesas/ravb_main.c
193 +@@ -1,6 +1,6 @@
194 + /* Renesas Ethernet AVB device driver
195 + *
196 +- * Copyright (C) 2014-2015 Renesas Electronics Corporation
197 ++ * Copyright (C) 2014-2019 Renesas Electronics Corporation
198 + * Copyright (C) 2015 Renesas Solutions Corp.
199 + * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@××××××××××××××.com>
200 + *
201 +@@ -512,7 +512,10 @@ static void ravb_get_tx_tstamp(struct net_device *ndev)
202 + kfree(ts_skb);
203 + if (tag == tfa_tag) {
204 + skb_tstamp_tx(skb, &shhwtstamps);
205 ++ dev_consume_skb_any(skb);
206 + break;
207 ++ } else {
208 ++ dev_kfree_skb_any(skb);
209 + }
210 + }
211 + ravb_modify(ndev, TCCR, TCCR_TFR, TCCR_TFR);
212 +@@ -1537,7 +1540,7 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev)
213 + DMA_TO_DEVICE);
214 + goto unmap;
215 + }
216 +- ts_skb->skb = skb;
217 ++ ts_skb->skb = skb_get(skb);
218 + ts_skb->tag = priv->ts_skb_tag++;
219 + priv->ts_skb_tag &= 0x3ff;
220 + list_add_tail(&ts_skb->list, &priv->ts_skb_list);
221 +@@ -1665,6 +1668,7 @@ static int ravb_close(struct net_device *ndev)
222 + /* Clear the timestamp list */
223 + list_for_each_entry_safe(ts_skb, ts_skb2, &priv->ts_skb_list, list) {
224 + list_del(&ts_skb->list);
225 ++ kfree_skb(ts_skb->skb);
226 + kfree(ts_skb);
227 + }
228 +
229 +diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
230 +index 6e61bccc90b3..15c063880f88 100644
231 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
232 ++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
233 +@@ -771,10 +771,8 @@ static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
234 + int ret;
235 + struct device *dev = &bsp_priv->pdev->dev;
236 +
237 +- if (!ldo) {
238 +- dev_err(dev, "no regulator found\n");
239 +- return -1;
240 +- }
241 ++ if (!ldo)
242 ++ return 0;
243 +
244 + if (enable) {
245 + ret = regulator_enable(ldo);
246 +diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c
247 +index 5b01b3fa9fec..47ebac456ae5 100644
248 +--- a/drivers/net/ethernet/toshiba/tc35815.c
249 ++++ b/drivers/net/ethernet/toshiba/tc35815.c
250 +@@ -1498,7 +1498,7 @@ tc35815_rx(struct net_device *dev, int limit)
251 + pci_unmap_single(lp->pci_dev,
252 + lp->rx_skbs[cur_bd].skb_dma,
253 + RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
254 +- if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN)
255 ++ if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN != 0)
256 + memmove(skb->data, skb->data - NET_IP_ALIGN,
257 + pkt_len);
258 + data = skb_put(skb, pkt_len);
259 +diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c
260 +index 8fd131207ee1..499abe9108fa 100644
261 +--- a/drivers/net/ethernet/tundra/tsi108_eth.c
262 ++++ b/drivers/net/ethernet/tundra/tsi108_eth.c
263 +@@ -381,9 +381,10 @@ tsi108_stat_carry_one(int carry, int carry_bit, int carry_shift,
264 + static void tsi108_stat_carry(struct net_device *dev)
265 + {
266 + struct tsi108_prv_data *data = netdev_priv(dev);
267 ++ unsigned long flags;
268 + u32 carry1, carry2;
269 +
270 +- spin_lock_irq(&data->misclock);
271 ++ spin_lock_irqsave(&data->misclock, flags);
272 +
273 + carry1 = TSI_READ(TSI108_STAT_CARRY1);
274 + carry2 = TSI_READ(TSI108_STAT_CARRY2);
275 +@@ -451,7 +452,7 @@ static void tsi108_stat_carry(struct net_device *dev)
276 + TSI108_STAT_TXPAUSEDROP_CARRY,
277 + &data->tx_pause_drop);
278 +
279 +- spin_unlock_irq(&data->misclock);
280 ++ spin_unlock_irqrestore(&data->misclock, flags);
281 + }
282 +
283 + /* Read a stat counter atomically with respect to carries.
284 +diff --git a/drivers/net/usb/cx82310_eth.c b/drivers/net/usb/cx82310_eth.c
285 +index 947bea81d924..dfbdea22fbad 100644
286 +--- a/drivers/net/usb/cx82310_eth.c
287 ++++ b/drivers/net/usb/cx82310_eth.c
288 +@@ -175,7 +175,8 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf)
289 + }
290 + if (!timeout) {
291 + dev_err(&udev->dev, "firmware not ready in time\n");
292 +- return -ETIMEDOUT;
293 ++ ret = -ETIMEDOUT;
294 ++ goto err;
295 + }
296 +
297 + /* enable ethernet mode (?) */
298 +diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c
299 +index 3e37724d30ae..0c4f4190c58e 100644
300 +--- a/drivers/net/usb/kalmia.c
301 ++++ b/drivers/net/usb/kalmia.c
302 +@@ -117,16 +117,16 @@ kalmia_init_and_get_ethernet_addr(struct usbnet *dev, u8 *ethernet_addr)
303 + status = kalmia_send_init_packet(dev, usb_buf, sizeof(init_msg_1)
304 + / sizeof(init_msg_1[0]), usb_buf, 24);
305 + if (status != 0)
306 +- return status;
307 ++ goto out;
308 +
309 + memcpy(usb_buf, init_msg_2, 12);
310 + status = kalmia_send_init_packet(dev, usb_buf, sizeof(init_msg_2)
311 + / sizeof(init_msg_2[0]), usb_buf, 28);
312 + if (status != 0)
313 +- return status;
314 ++ goto out;
315 +
316 + memcpy(ethernet_addr, usb_buf + 10, ETH_ALEN);
317 +-
318 ++out:
319 + kfree(usb_buf);
320 + return status;
321 + }
322 +diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c
323 +index c9c711dcd0e6..0e6c665a4de8 100644
324 +--- a/drivers/net/wimax/i2400m/fw.c
325 ++++ b/drivers/net/wimax/i2400m/fw.c
326 +@@ -351,13 +351,15 @@ int i2400m_barker_db_init(const char *_options)
327 + }
328 + result = i2400m_barker_db_add(barker);
329 + if (result < 0)
330 +- goto error_add;
331 ++ goto error_parse_add;
332 + }
333 + kfree(options_orig);
334 + }
335 + return 0;
336 +
337 ++error_parse_add:
338 + error_parse:
339 ++ kfree(options_orig);
340 + error_add:
341 + kfree(i2400m_barker_db);
342 + return result;
343 +diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c
344 +index 7428091d3f5b..5c89bbb05441 100644
345 +--- a/drivers/spi/spi-bcm2835aux.c
346 ++++ b/drivers/spi/spi-bcm2835aux.c
347 +@@ -178,19 +178,14 @@ static void bcm2835aux_spi_reset_hw(struct bcm2835aux_spi *bs)
348 + BCM2835_AUX_SPI_CNTL0_CLEARFIFO);
349 + }
350 +
351 +-static irqreturn_t bcm2835aux_spi_interrupt(int irq, void *dev_id)
352 ++static void bcm2835aux_spi_transfer_helper(struct bcm2835aux_spi *bs)
353 + {
354 +- struct spi_master *master = dev_id;
355 +- struct bcm2835aux_spi *bs = spi_master_get_devdata(master);
356 +- irqreturn_t ret = IRQ_NONE;
357 ++ u32 stat = bcm2835aux_rd(bs, BCM2835_AUX_SPI_STAT);
358 +
359 + /* check if we have data to read */
360 +- while (bs->rx_len &&
361 +- (!(bcm2835aux_rd(bs, BCM2835_AUX_SPI_STAT) &
362 +- BCM2835_AUX_SPI_STAT_RX_EMPTY))) {
363 ++ for (; bs->rx_len && (stat & BCM2835_AUX_SPI_STAT_RX_LVL);
364 ++ stat = bcm2835aux_rd(bs, BCM2835_AUX_SPI_STAT))
365 + bcm2835aux_rd_fifo(bs);
366 +- ret = IRQ_HANDLED;
367 +- }
368 +
369 + /* check if we have data to write */
370 + while (bs->tx_len &&
371 +@@ -198,16 +193,21 @@ static irqreturn_t bcm2835aux_spi_interrupt(int irq, void *dev_id)
372 + (!(bcm2835aux_rd(bs, BCM2835_AUX_SPI_STAT) &
373 + BCM2835_AUX_SPI_STAT_TX_FULL))) {
374 + bcm2835aux_wr_fifo(bs);
375 +- ret = IRQ_HANDLED;
376 + }
377 ++}
378 +
379 +- /* and check if we have reached "done" */
380 +- while (bs->rx_len &&
381 +- (!(bcm2835aux_rd(bs, BCM2835_AUX_SPI_STAT) &
382 +- BCM2835_AUX_SPI_STAT_BUSY))) {
383 +- bcm2835aux_rd_fifo(bs);
384 +- ret = IRQ_HANDLED;
385 +- }
386 ++static irqreturn_t bcm2835aux_spi_interrupt(int irq, void *dev_id)
387 ++{
388 ++ struct spi_master *master = dev_id;
389 ++ struct bcm2835aux_spi *bs = spi_master_get_devdata(master);
390 ++
391 ++ /* IRQ may be shared, so return if our interrupts are disabled */
392 ++ if (!(bcm2835aux_rd(bs, BCM2835_AUX_SPI_CNTL1) &
393 ++ (BCM2835_AUX_SPI_CNTL1_TXEMPTY | BCM2835_AUX_SPI_CNTL1_IDLE)))
394 ++ return IRQ_NONE;
395 ++
396 ++ /* do common fifo handling */
397 ++ bcm2835aux_spi_transfer_helper(bs);
398 +
399 + if (!bs->tx_len) {
400 + /* disable tx fifo empty interrupt */
401 +@@ -221,8 +221,7 @@ static irqreturn_t bcm2835aux_spi_interrupt(int irq, void *dev_id)
402 + complete(&master->xfer_completion);
403 + }
404 +
405 +- /* and return */
406 +- return ret;
407 ++ return IRQ_HANDLED;
408 + }
409 +
410 + static int __bcm2835aux_spi_transfer_one_irq(struct spi_master *master,
411 +@@ -268,7 +267,6 @@ static int bcm2835aux_spi_transfer_one_poll(struct spi_master *master,
412 + {
413 + struct bcm2835aux_spi *bs = spi_master_get_devdata(master);
414 + unsigned long timeout;
415 +- u32 stat;
416 +
417 + /* configure spi */
418 + bcm2835aux_wr(bs, BCM2835_AUX_SPI_CNTL1, bs->cntl[1]);
419 +@@ -279,24 +277,9 @@ static int bcm2835aux_spi_transfer_one_poll(struct spi_master *master,
420 +
421 + /* loop until finished the transfer */
422 + while (bs->rx_len) {
423 +- /* read status */
424 +- stat = bcm2835aux_rd(bs, BCM2835_AUX_SPI_STAT);
425 +
426 +- /* fill in tx fifo with remaining data */
427 +- if ((bs->tx_len) && (!(stat & BCM2835_AUX_SPI_STAT_TX_FULL))) {
428 +- bcm2835aux_wr_fifo(bs);
429 +- continue;
430 +- }
431 +-
432 +- /* read data from fifo for both cases */
433 +- if (!(stat & BCM2835_AUX_SPI_STAT_RX_EMPTY)) {
434 +- bcm2835aux_rd_fifo(bs);
435 +- continue;
436 +- }
437 +- if (!(stat & BCM2835_AUX_SPI_STAT_BUSY)) {
438 +- bcm2835aux_rd_fifo(bs);
439 +- continue;
440 +- }
441 ++ /* do common fifo handling */
442 ++ bcm2835aux_spi_transfer_helper(bs);
443 +
444 + /* there is still data pending to read check the timeout */
445 + if (bs->rx_len && time_after(jiffies, timeout)) {
446 +diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
447 +index 7a4052501866..339fdf6355df 100644
448 +--- a/fs/ceph/inode.c
449 ++++ b/fs/ceph/inode.c
450 +@@ -741,6 +741,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
451 + int issued = 0, implemented, new_issued;
452 + struct timespec mtime, atime, ctime;
453 + struct ceph_buffer *xattr_blob = NULL;
454 ++ struct ceph_buffer *old_blob = NULL;
455 + struct ceph_string *pool_ns = NULL;
456 + struct ceph_cap *new_cap = NULL;
457 + int err = 0;
458 +@@ -858,7 +859,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
459 + if ((ci->i_xattrs.version == 0 || !(issued & CEPH_CAP_XATTR_EXCL)) &&
460 + le64_to_cpu(info->xattr_version) > ci->i_xattrs.version) {
461 + if (ci->i_xattrs.blob)
462 +- ceph_buffer_put(ci->i_xattrs.blob);
463 ++ old_blob = ci->i_xattrs.blob;
464 + ci->i_xattrs.blob = xattr_blob;
465 + if (xattr_blob)
466 + memcpy(ci->i_xattrs.blob->vec.iov_base,
467 +@@ -1004,8 +1005,8 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
468 + out:
469 + if (new_cap)
470 + ceph_put_cap(mdsc, new_cap);
471 +- if (xattr_blob)
472 +- ceph_buffer_put(xattr_blob);
473 ++ ceph_buffer_put(old_blob);
474 ++ ceph_buffer_put(xattr_blob);
475 + ceph_put_string(pool_ns);
476 + return err;
477 + }
478 +diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
479 +index 81144a8c0927..18b999deed03 100644
480 +--- a/fs/ceph/xattr.c
481 ++++ b/fs/ceph/xattr.c
482 +@@ -951,6 +951,7 @@ int __ceph_setxattr(struct inode *inode, const char *name,
483 + struct ceph_inode_info *ci = ceph_inode(inode);
484 + struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
485 + struct ceph_cap_flush *prealloc_cf = NULL;
486 ++ struct ceph_buffer *old_blob = NULL;
487 + int issued;
488 + int err;
489 + int dirty = 0;
490 +@@ -1019,13 +1020,15 @@ retry:
491 + struct ceph_buffer *blob;
492 +
493 + spin_unlock(&ci->i_ceph_lock);
494 +- dout(" preaallocating new blob size=%d\n", required_blob_size);
495 ++ ceph_buffer_put(old_blob); /* Shouldn't be required */
496 ++ dout(" pre-allocating new blob size=%d\n", required_blob_size);
497 + blob = ceph_buffer_new(required_blob_size, GFP_NOFS);
498 + if (!blob)
499 + goto do_sync_unlocked;
500 + spin_lock(&ci->i_ceph_lock);
501 ++ /* prealloc_blob can't be released while holding i_ceph_lock */
502 + if (ci->i_xattrs.prealloc_blob)
503 +- ceph_buffer_put(ci->i_xattrs.prealloc_blob);
504 ++ old_blob = ci->i_xattrs.prealloc_blob;
505 + ci->i_xattrs.prealloc_blob = blob;
506 + goto retry;
507 + }
508 +@@ -1041,6 +1044,7 @@ retry:
509 + }
510 +
511 + spin_unlock(&ci->i_ceph_lock);
512 ++ ceph_buffer_put(old_blob);
513 + if (lock_snap_rwsem)
514 + up_read(&mdsc->snap_rwsem);
515 + if (dirty)
516 +diff --git a/include/linux/ceph/buffer.h b/include/linux/ceph/buffer.h
517 +index 07ca15e76100..dada47a4360f 100644
518 +--- a/include/linux/ceph/buffer.h
519 ++++ b/include/linux/ceph/buffer.h
520 +@@ -29,7 +29,8 @@ static inline struct ceph_buffer *ceph_buffer_get(struct ceph_buffer *b)
521 +
522 + static inline void ceph_buffer_put(struct ceph_buffer *b)
523 + {
524 +- kref_put(&b->kref, ceph_buffer_release);
525 ++ if (b)
526 ++ kref_put(&b->kref, ceph_buffer_release);
527 + }
528 +
529 + extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end);
530 +diff --git a/include/linux/gpio.h b/include/linux/gpio.h
531 +index d12b5d566e4b..11555bd821b7 100644
532 +--- a/include/linux/gpio.h
533 ++++ b/include/linux/gpio.h
534 +@@ -229,30 +229,6 @@ static inline int irq_to_gpio(unsigned irq)
535 + return -EINVAL;
536 + }
537 +
538 +-static inline int
539 +-gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
540 +- unsigned int gpio_offset, unsigned int pin_offset,
541 +- unsigned int npins)
542 +-{
543 +- WARN_ON(1);
544 +- return -EINVAL;
545 +-}
546 +-
547 +-static inline int
548 +-gpiochip_add_pingroup_range(struct gpio_chip *chip,
549 +- struct pinctrl_dev *pctldev,
550 +- unsigned int gpio_offset, const char *pin_group)
551 +-{
552 +- WARN_ON(1);
553 +- return -EINVAL;
554 +-}
555 +-
556 +-static inline void
557 +-gpiochip_remove_pin_ranges(struct gpio_chip *chip)
558 +-{
559 +- WARN_ON(1);
560 +-}
561 +-
562 + static inline int devm_gpio_request(struct device *dev, unsigned gpio,
563 + const char *label)
564 + {
565 +diff --git a/net/core/netpoll.c b/net/core/netpoll.c
566 +index 9b2d61120c0d..5de180a9b7f5 100644
567 +--- a/net/core/netpoll.c
568 ++++ b/net/core/netpoll.c
569 +@@ -122,7 +122,7 @@ static void queue_process(struct work_struct *work)
570 + txq = netdev_get_tx_queue(dev, q_index);
571 + HARD_TX_LOCK(dev, txq, smp_processor_id());
572 + if (netif_xmit_frozen_or_stopped(txq) ||
573 +- netpoll_start_xmit(skb, dev, txq) != NETDEV_TX_OK) {
574 ++ !dev_xmit_complete(netpoll_start_xmit(skb, dev, txq))) {
575 + skb_queue_head(&npinfo->txq, skb);
576 + HARD_TX_UNLOCK(dev, txq);
577 + local_irq_restore(flags);
578 +@@ -357,7 +357,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
579 +
580 + HARD_TX_UNLOCK(dev, txq);
581 +
582 +- if (status == NETDEV_TX_OK)
583 ++ if (dev_xmit_complete(status))
584 + break;
585 +
586 + }
587 +@@ -374,7 +374,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
588 +
589 + }
590 +
591 +- if (status != NETDEV_TX_OK) {
592 ++ if (!dev_xmit_complete(status)) {
593 + skb_queue_tail(&npinfo->txq, skb);
594 + schedule_delayed_work(&npinfo->tx_work,0);
595 + }
596 +diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
597 +index 9ddb05b98312..2e77e78ab226 100644
598 +--- a/net/ipv4/tcp_output.c
599 ++++ b/net/ipv4/tcp_output.c
600 +@@ -1943,7 +1943,7 @@ static bool tcp_can_coalesce_send_queue_head(struct sock *sk, int len)
601 + if (len <= skb->len)
602 + break;
603 +
604 +- if (unlikely(TCP_SKB_CB(skb)->eor))
605 ++ if (unlikely(TCP_SKB_CB(skb)->eor) || tcp_has_tx_tstamp(skb))
606 + return false;
607 +
608 + len -= skb->len;
609 +@@ -2066,6 +2066,7 @@ static int tcp_mtu_probe(struct sock *sk)
610 + * we need to propagate it to the new skb.
611 + */
612 + TCP_SKB_CB(nskb)->eor = TCP_SKB_CB(skb)->eor;
613 ++ tcp_skb_collapse_tstamp(nskb, skb);
614 + tcp_unlink_write_queue(skb, sk);
615 + sk_wmem_free_skb(sk, skb);
616 + } else {
617 +diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
618 +index 40262abb15db..e065d48b31b9 100644
619 +--- a/net/ipv6/mcast.c
620 ++++ b/net/ipv6/mcast.c
621 +@@ -772,12 +772,13 @@ static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
622 + im->idev = pmc->idev;
623 + im->mca_crcount = idev->mc_qrv;
624 + if (im->mca_sfmode == MCAST_INCLUDE) {
625 +- im->mca_tomb = pmc->mca_tomb;
626 +- im->mca_sources = pmc->mca_sources;
627 ++ swap(im->mca_tomb, pmc->mca_tomb);
628 ++ swap(im->mca_sources, pmc->mca_sources);
629 + for (psf = im->mca_sources; psf; psf = psf->sf_next)
630 + psf->sf_crcount = im->mca_crcount;
631 + }
632 + in6_dev_put(pmc->idev);
633 ++ ip6_mc_clear_src(pmc);
634 + kfree(pmc);
635 + }
636 + spin_unlock_bh(&im->mca_lock);
637 +diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
638 +index fffc7c418459..834008639c4b 100644
639 +--- a/tools/hv/hv_kvp_daemon.c
640 ++++ b/tools/hv/hv_kvp_daemon.c
641 +@@ -878,7 +878,7 @@ kvp_get_ip_info(int family, char *if_name, int op,
642 + int sn_offset = 0;
643 + int error = 0;
644 + char *buffer;
645 +- struct hv_kvp_ipaddr_value *ip_buffer;
646 ++ struct hv_kvp_ipaddr_value *ip_buffer = NULL;
647 + char cidr_mask[5]; /* /xyz */
648 + int weight;
649 + int i;