Magellan Linux

Contents of /trunk/kernel-alx/patches-4.9/0291-4.9.192-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


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