Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.4 commit in: /
Date: Tue, 10 Sep 2019 11:10:25
Message-Id: 1568113789.d731d8da8be6481eb8662677c5b956b017df6240.mpagano@gentoo
1 commit: d731d8da8be6481eb8662677c5b956b017df6240
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 10 11:09:49 2019 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 10 11:09:49 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d731d8da
7
8 Linux patch 4.4.192
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1191_linux-4.4.192.patch | 539 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 543 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index af92bf6..c4cc1b6 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -807,6 +807,10 @@ Patch: 1190_linux-4.4.191.patch
21 From: http://www.kernel.org
22 Desc: Linux 4.4.191
23
24 +Patch: 1191_linux-4.4.192.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 4.4.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.4.192.patch b/1191_linux-4.4.192.patch
33 new file mode 100644
34 index 0000000..7cff433
35 --- /dev/null
36 +++ b/1191_linux-4.4.192.patch
37 @@ -0,0 +1,539 @@
38 +diff --git a/Makefile b/Makefile
39 +index 266c3d7e0120..18889fbbebb1 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,6 +1,6 @@
43 + VERSION = 4
44 + PATCHLEVEL = 4
45 +-SUBLEVEL = 191
46 ++SUBLEVEL = 192
47 + EXTRAVERSION =
48 + NAME = Blurry Fish Butt
49 +
50 +diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
51 +index ae61e2ea7255..d2efc033ef8b 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 +@@ -206,6 +212,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 80c94fc8ad5a..834d1b5b4355 100644
77 +--- a/arch/x86/kernel/apic/apic.c
78 ++++ b/arch/x86/kernel/apic/apic.c
79 +@@ -1031,10 +1031,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 4a6208168850..593fc2a5be0f 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 199a9cdd0d12..531c985f6fd7 100644
106 +--- a/drivers/infiniband/hw/mlx4/mad.c
107 ++++ b/drivers/infiniband/hw/mlx4/mad.c
108 +@@ -1526,8 +1526,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 +@@ -1536,6 +1534,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 4269944c5db5..129d6095749a 100644
128 +--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
129 ++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
130 +@@ -2673,8 +2673,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 70b3253e7ed5..b46fc37c1a94 100644
144 +--- a/drivers/net/ethernet/ibm/ibmveth.c
145 ++++ b/drivers/net/ethernet/ibm/ibmveth.c
146 +@@ -1555,7 +1555,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 +@@ -1577,8 +1577,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 +@@ -1595,7 +1596,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 83651ac8ddb9..8ebf3611aba3 100644
178 +--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
179 ++++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
180 +@@ -4114,7 +4114,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 29d31eb995d7..fedfd94699cb 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 Cogent Embedded, Inc. <source@××××××××××××××.com>
200 + *
201 +@@ -501,7 +501,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_write(ndev, ravb_read(ndev, TCCR) | TCCR_TFR, TCCR);
212 +@@ -1382,7 +1385,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 +@@ -1514,6 +1517,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 398b08e07149..68a58333bd74 100644
231 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
232 ++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
233 +@@ -429,10 +429,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 45ac38d29ed8..868fb6306df0 100644
248 +--- a/drivers/net/ethernet/toshiba/tc35815.c
249 ++++ b/drivers/net/ethernet/toshiba/tc35815.c
250 +@@ -1528,7 +1528,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 520cf50a3d5a..93fe0da0f15e 100644
261 +--- a/drivers/net/ethernet/tundra/tsi108_eth.c
262 ++++ b/drivers/net/ethernet/tundra/tsi108_eth.c
263 +@@ -379,9 +379,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 +@@ -449,7 +450,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 5662babf0583..d385b67258c7 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 7de6f8472a81..ca655593c5e0 100644
345 +--- a/drivers/spi/spi-bcm2835aux.c
346 ++++ b/drivers/spi/spi-bcm2835aux.c
347 +@@ -181,19 +181,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 +@@ -201,16 +196,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 + /* and if rx_len is 0 then wake up completion and disable spi */
400 + if (!bs->rx_len) {
401 +@@ -218,8 +218,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 +@@ -265,7 +264,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 +@@ -276,24 +274,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/xattr.c b/fs/ceph/xattr.c
447 +index b24275ef97f7..22e5f3432abb 100644
448 +--- a/fs/ceph/xattr.c
449 ++++ b/fs/ceph/xattr.c
450 +@@ -916,6 +916,7 @@ int __ceph_setxattr(struct dentry *dentry, const char *name,
451 + struct ceph_inode_info *ci = ceph_inode(inode);
452 + struct ceph_mds_client *mdsc = ceph_sb_to_client(dentry->d_sb)->mdsc;
453 + struct ceph_cap_flush *prealloc_cf = NULL;
454 ++ struct ceph_buffer *old_blob = NULL;
455 + int issued;
456 + int err;
457 + int dirty = 0;
458 +@@ -984,13 +985,15 @@ retry:
459 + struct ceph_buffer *blob;
460 +
461 + spin_unlock(&ci->i_ceph_lock);
462 +- dout(" preaallocating new blob size=%d\n", required_blob_size);
463 ++ ceph_buffer_put(old_blob); /* Shouldn't be required */
464 ++ dout(" pre-allocating new blob size=%d\n", required_blob_size);
465 + blob = ceph_buffer_new(required_blob_size, GFP_NOFS);
466 + if (!blob)
467 + goto do_sync_unlocked;
468 + spin_lock(&ci->i_ceph_lock);
469 ++ /* prealloc_blob can't be released while holding i_ceph_lock */
470 + if (ci->i_xattrs.prealloc_blob)
471 +- ceph_buffer_put(ci->i_xattrs.prealloc_blob);
472 ++ old_blob = ci->i_xattrs.prealloc_blob;
473 + ci->i_xattrs.prealloc_blob = blob;
474 + goto retry;
475 + }
476 +@@ -1006,6 +1009,7 @@ retry:
477 + }
478 +
479 + spin_unlock(&ci->i_ceph_lock);
480 ++ ceph_buffer_put(old_blob);
481 + if (lock_snap_rwsem)
482 + up_read(&mdsc->snap_rwsem);
483 + if (dirty)
484 +diff --git a/include/linux/ceph/buffer.h b/include/linux/ceph/buffer.h
485 +index 07ca15e76100..dada47a4360f 100644
486 +--- a/include/linux/ceph/buffer.h
487 ++++ b/include/linux/ceph/buffer.h
488 +@@ -29,7 +29,8 @@ static inline struct ceph_buffer *ceph_buffer_get(struct ceph_buffer *b)
489 +
490 + static inline void ceph_buffer_put(struct ceph_buffer *b)
491 + {
492 +- kref_put(&b->kref, ceph_buffer_release);
493 ++ if (b)
494 ++ kref_put(&b->kref, ceph_buffer_release);
495 + }
496 +
497 + extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end);
498 +diff --git a/include/linux/gpio.h b/include/linux/gpio.h
499 +index d12b5d566e4b..11555bd821b7 100644
500 +--- a/include/linux/gpio.h
501 ++++ b/include/linux/gpio.h
502 +@@ -229,30 +229,6 @@ static inline int irq_to_gpio(unsigned irq)
503 + return -EINVAL;
504 + }
505 +
506 +-static inline int
507 +-gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
508 +- unsigned int gpio_offset, unsigned int pin_offset,
509 +- unsigned int npins)
510 +-{
511 +- WARN_ON(1);
512 +- return -EINVAL;
513 +-}
514 +-
515 +-static inline int
516 +-gpiochip_add_pingroup_range(struct gpio_chip *chip,
517 +- struct pinctrl_dev *pctldev,
518 +- unsigned int gpio_offset, const char *pin_group)
519 +-{
520 +- WARN_ON(1);
521 +- return -EINVAL;
522 +-}
523 +-
524 +-static inline void
525 +-gpiochip_remove_pin_ranges(struct gpio_chip *chip)
526 +-{
527 +- WARN_ON(1);
528 +-}
529 +-
530 + static inline int devm_gpio_request(struct device *dev, unsigned gpio,
531 + const char *label)
532 + {
533 +diff --git a/net/core/netpoll.c b/net/core/netpoll.c
534 +index 440aa9f6e0a8..0d7c2cc1ff09 100644
535 +--- a/net/core/netpoll.c
536 ++++ b/net/core/netpoll.c
537 +@@ -122,7 +122,7 @@ static void queue_process(struct work_struct *work)
538 + txq = netdev_get_tx_queue(dev, q_index);
539 + HARD_TX_LOCK(dev, txq, smp_processor_id());
540 + if (netif_xmit_frozen_or_stopped(txq) ||
541 +- netpoll_start_xmit(skb, dev, txq) != NETDEV_TX_OK) {
542 ++ !dev_xmit_complete(netpoll_start_xmit(skb, dev, txq))) {
543 + skb_queue_head(&npinfo->txq, skb);
544 + HARD_TX_UNLOCK(dev, txq);
545 + local_irq_restore(flags);
546 +@@ -357,7 +357,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
547 +
548 + HARD_TX_UNLOCK(dev, txq);
549 +
550 +- if (status == NETDEV_TX_OK)
551 ++ if (dev_xmit_complete(status))
552 + break;
553 +
554 + }
555 +@@ -374,7 +374,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
556 +
557 + }
558 +
559 +- if (status != NETDEV_TX_OK) {
560 ++ if (!dev_xmit_complete(status)) {
561 + skb_queue_tail(&npinfo->txq, skb);
562 + schedule_delayed_work(&npinfo->tx_work,0);
563 + }
564 +diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
565 +index fffc7c418459..834008639c4b 100644
566 +--- a/tools/hv/hv_kvp_daemon.c
567 ++++ b/tools/hv/hv_kvp_daemon.c
568 +@@ -878,7 +878,7 @@ kvp_get_ip_info(int family, char *if_name, int op,
569 + int sn_offset = 0;
570 + int error = 0;
571 + char *buffer;
572 +- struct hv_kvp_ipaddr_value *ip_buffer;
573 ++ struct hv_kvp_ipaddr_value *ip_buffer = NULL;
574 + char cidr_mask[5]; /* /xyz */
575 + int weight;
576 + int i;