diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-01 11:13:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-01 11:13:20 -0400 |
commit | 076dab234d29d1c0d60e26a5fa48aabb7fa58f79 (patch) | |
tree | 4dbd92007635b59830e1a73bb355f74b4b2d79f0 | |
parent | e30c7c3b306312c157d67eedd6a01920518b756c (diff) | |
parent | b42d9165e1e3d92e4e3318642463dbe592a12568 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (28 commits)
drivers/isdn/hardware/mISDN: Use GFP_ATOMIC when a lock is held
ksz884x: Add missing validate_addr hook
ksz884x: convert to netdev_tx_t
virtio-net: pass gfp to add_buf
be2net: convert hdr.timeout in be_cmd_loopback_test() to le32
can: mpc5xxx_can.c: Fix build failure
net/ipv4/tcp_input.c: fix compilation breakage when FASTRETRANS_DEBUG > 1
net: sock_queue_err_skb() dont mess with sk_forward_alloc
netfilter: xtables: stackptr should be percpu
netfilter: don't xt_jumpstack_alloc twice in xt_register_table
greth: Fix build after OF device conversions.
net: fix sk_forward_alloc corruptions
Phonet: listening socket lock protects the connected socket list
caif: unlock on error path in cfserl_receive()
be2net: remove superfluous externs
be2net: add unlock on error path
net/rds: Add missing mutex_unlock
drivers/isdn/hardware/mISDN: Add missing spin_unlock
fs_enet: Adjust BDs after tx error
skb: make skb_recycle_check() return a bool value
...
29 files changed, 157 insertions, 90 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c index b3b7e2879bac..8700474747e8 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.c +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c | |||
@@ -97,8 +97,10 @@ static int write_reg(struct hfcsusb *hw, __u8 reg, __u8 val) | |||
97 | hw->name, __func__, reg, val); | 97 | hw->name, __func__, reg, val); |
98 | 98 | ||
99 | spin_lock(&hw->ctrl_lock); | 99 | spin_lock(&hw->ctrl_lock); |
100 | if (hw->ctrl_cnt >= HFC_CTRL_BUFSIZE) | 100 | if (hw->ctrl_cnt >= HFC_CTRL_BUFSIZE) { |
101 | spin_unlock(&hw->ctrl_lock); | ||
101 | return 1; | 102 | return 1; |
103 | } | ||
102 | buf = &hw->ctrl_buff[hw->ctrl_in_idx]; | 104 | buf = &hw->ctrl_buff[hw->ctrl_in_idx]; |
103 | buf->hfcs_reg = reg; | 105 | buf->hfcs_reg = reg; |
104 | buf->reg_val = val; | 106 | buf->reg_val = val; |
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index 0a3553df065f..54ae71a907f9 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c | |||
@@ -320,12 +320,12 @@ inittiger(struct tiger_hw *card) | |||
320 | return -ENOMEM; | 320 | return -ENOMEM; |
321 | } | 321 | } |
322 | for (i = 0; i < 2; i++) { | 322 | for (i = 0; i < 2; i++) { |
323 | card->bc[i].hsbuf = kmalloc(NJ_DMA_TXSIZE, GFP_KERNEL); | 323 | card->bc[i].hsbuf = kmalloc(NJ_DMA_TXSIZE, GFP_ATOMIC); |
324 | if (!card->bc[i].hsbuf) { | 324 | if (!card->bc[i].hsbuf) { |
325 | pr_info("%s: no B%d send buffer\n", card->name, i + 1); | 325 | pr_info("%s: no B%d send buffer\n", card->name, i + 1); |
326 | return -ENOMEM; | 326 | return -ENOMEM; |
327 | } | 327 | } |
328 | card->bc[i].hrbuf = kmalloc(NJ_DMA_RXSIZE, GFP_KERNEL); | 328 | card->bc[i].hrbuf = kmalloc(NJ_DMA_RXSIZE, GFP_ATOMIC); |
329 | if (!card->bc[i].hrbuf) { | 329 | if (!card->bc[i].hrbuf) { |
330 | pr_info("%s: no B%d recv buffer\n", card->name, i + 1); | 330 | pr_info("%s: no B%d recv buffer\n", card->name, i + 1); |
331 | return -ENOMEM; | 331 | return -ENOMEM; |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 9d11dbf5e4da..b9ad799c719f 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
@@ -1429,7 +1429,7 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd, | |||
1429 | wrb = wrb_from_mccq(adapter); | 1429 | wrb = wrb_from_mccq(adapter); |
1430 | if (!wrb) { | 1430 | if (!wrb) { |
1431 | status = -EBUSY; | 1431 | status = -EBUSY; |
1432 | goto err; | 1432 | goto err_unlock; |
1433 | } | 1433 | } |
1434 | req = cmd->va; | 1434 | req = cmd->va; |
1435 | sge = nonembedded_sgl(wrb); | 1435 | sge = nonembedded_sgl(wrb); |
@@ -1457,7 +1457,10 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd, | |||
1457 | else | 1457 | else |
1458 | status = adapter->flash_status; | 1458 | status = adapter->flash_status; |
1459 | 1459 | ||
1460 | err: | 1460 | return status; |
1461 | |||
1462 | err_unlock: | ||
1463 | spin_unlock_bh(&adapter->mcc_lock); | ||
1461 | return status; | 1464 | return status; |
1462 | } | 1465 | } |
1463 | 1466 | ||
@@ -1497,7 +1500,7 @@ err: | |||
1497 | return status; | 1500 | return status; |
1498 | } | 1501 | } |
1499 | 1502 | ||
1500 | extern int be_cmd_enable_magic_wol(struct be_adapter *adapter, u8 *mac, | 1503 | int be_cmd_enable_magic_wol(struct be_adapter *adapter, u8 *mac, |
1501 | struct be_dma_mem *nonemb_cmd) | 1504 | struct be_dma_mem *nonemb_cmd) |
1502 | { | 1505 | { |
1503 | struct be_mcc_wrb *wrb; | 1506 | struct be_mcc_wrb *wrb; |
@@ -1590,7 +1593,7 @@ int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num, | |||
1590 | 1593 | ||
1591 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_LOWLEVEL, | 1594 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_LOWLEVEL, |
1592 | OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req)); | 1595 | OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req)); |
1593 | req->hdr.timeout = 4; | 1596 | req->hdr.timeout = cpu_to_le32(4); |
1594 | 1597 | ||
1595 | req->pattern = cpu_to_le64(pattern); | 1598 | req->pattern = cpu_to_le64(pattern); |
1596 | req->src_port = cpu_to_le32(port_num); | 1599 | req->src_port = cpu_to_le32(port_num); |
@@ -1662,7 +1665,7 @@ err: | |||
1662 | return status; | 1665 | return status; |
1663 | } | 1666 | } |
1664 | 1667 | ||
1665 | extern int be_cmd_get_seeprom_data(struct be_adapter *adapter, | 1668 | int be_cmd_get_seeprom_data(struct be_adapter *adapter, |
1666 | struct be_dma_mem *nonemb_cmd) | 1669 | struct be_dma_mem *nonemb_cmd) |
1667 | { | 1670 | { |
1668 | struct be_mcc_wrb *wrb; | 1671 | struct be_mcc_wrb *wrb; |
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index 8af8442c694a..af753936e835 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c | |||
@@ -73,7 +73,7 @@ static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, | |||
73 | else | 73 | else |
74 | *mscan_clksrc = MSCAN_CLKSRC_XTAL; | 74 | *mscan_clksrc = MSCAN_CLKSRC_XTAL; |
75 | 75 | ||
76 | freq = mpc5xxx_get_bus_frequency(ofdev->node); | 76 | freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node); |
77 | if (!freq) | 77 | if (!freq) |
78 | return 0; | 78 | return 0; |
79 | 79 | ||
@@ -152,7 +152,7 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, | |||
152 | } | 152 | } |
153 | 153 | ||
154 | /* Determine the MSCAN device index from the physical address */ | 154 | /* Determine the MSCAN device index from the physical address */ |
155 | pval = of_get_property(ofdev->node, "reg", &plen); | 155 | pval = of_get_property(ofdev->dev.of_node, "reg", &plen); |
156 | BUG_ON(!pval || plen < sizeof(*pval)); | 156 | BUG_ON(!pval || plen < sizeof(*pval)); |
157 | clockidx = (*pval & 0x80) ? 1 : 0; | 157 | clockidx = (*pval & 0x80) ? 1 : 0; |
158 | if (*pval & 0x2000) | 158 | if (*pval & 0x2000) |
@@ -168,11 +168,11 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, | |||
168 | */ | 168 | */ |
169 | if (clock_name && !strcmp(clock_name, "ip")) { | 169 | if (clock_name && !strcmp(clock_name, "ip")) { |
170 | *mscan_clksrc = MSCAN_CLKSRC_IPS; | 170 | *mscan_clksrc = MSCAN_CLKSRC_IPS; |
171 | freq = mpc5xxx_get_bus_frequency(ofdev->node); | 171 | freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node); |
172 | } else { | 172 | } else { |
173 | *mscan_clksrc = MSCAN_CLKSRC_BUS; | 173 | *mscan_clksrc = MSCAN_CLKSRC_BUS; |
174 | 174 | ||
175 | pval = of_get_property(ofdev->node, | 175 | pval = of_get_property(ofdev->dev.of_node, |
176 | "fsl,mscan-clock-divider", &plen); | 176 | "fsl,mscan-clock-divider", &plen); |
177 | if (pval && plen == sizeof(*pval)) | 177 | if (pval && plen == sizeof(*pval)) |
178 | clockdiv = *pval; | 178 | clockdiv = *pval; |
@@ -251,7 +251,7 @@ static int __devinit mpc5xxx_can_probe(struct of_device *ofdev, | |||
251 | const struct of_device_id *id) | 251 | const struct of_device_id *id) |
252 | { | 252 | { |
253 | struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; | 253 | struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; |
254 | struct device_node *np = ofdev->node; | 254 | struct device_node *np = ofdev->dev.of_node; |
255 | struct net_device *dev; | 255 | struct net_device *dev; |
256 | struct mscan_priv *priv; | 256 | struct mscan_priv *priv; |
257 | void __iomem *base; | 257 | void __iomem *base; |
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index 5d45084b287d..48e91b6242ce 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
@@ -504,17 +504,54 @@ static int get_regs_len(struct net_device *dev) | |||
504 | } | 504 | } |
505 | 505 | ||
506 | /* Some transmit errors cause the transmitter to shut | 506 | /* Some transmit errors cause the transmitter to shut |
507 | * down. We now issue a restart transmit. Since the | 507 | * down. We now issue a restart transmit. |
508 | * errors close the BD and update the pointers, the restart | 508 | * Also, to workaround 8260 device erratum CPM37, we must |
509 | * _should_ pick up without having to reset any of our | 509 | * disable and then re-enable the transmitterfollowing a |
510 | * pointers either. Also, To workaround 8260 device erratum | 510 | * Late Collision, Underrun, or Retry Limit error. |
511 | * CPM37, we must disable and then re-enable the transmitter | 511 | * In addition, tbptr may point beyond BDs beyond still marked |
512 | * following a Late Collision, Underrun, or Retry Limit error. | 512 | * as ready due to internal pipelining, so we need to look back |
513 | * through the BDs and adjust tbptr to point to the last BD | ||
514 | * marked as ready. This may result in some buffers being | ||
515 | * retransmitted. | ||
513 | */ | 516 | */ |
514 | static void tx_restart(struct net_device *dev) | 517 | static void tx_restart(struct net_device *dev) |
515 | { | 518 | { |
516 | struct fs_enet_private *fep = netdev_priv(dev); | 519 | struct fs_enet_private *fep = netdev_priv(dev); |
517 | fcc_t __iomem *fccp = fep->fcc.fccp; | 520 | fcc_t __iomem *fccp = fep->fcc.fccp; |
521 | const struct fs_platform_info *fpi = fep->fpi; | ||
522 | fcc_enet_t __iomem *ep = fep->fcc.ep; | ||
523 | cbd_t __iomem *curr_tbptr; | ||
524 | cbd_t __iomem *recheck_bd; | ||
525 | cbd_t __iomem *prev_bd; | ||
526 | cbd_t __iomem *last_tx_bd; | ||
527 | |||
528 | last_tx_bd = fep->tx_bd_base + (fpi->tx_ring * sizeof(cbd_t)); | ||
529 | |||
530 | /* get the current bd held in TBPTR and scan back from this point */ | ||
531 | recheck_bd = curr_tbptr = (cbd_t __iomem *) | ||
532 | ((R32(ep, fen_genfcc.fcc_tbptr) - fep->ring_mem_addr) + | ||
533 | fep->ring_base); | ||
534 | |||
535 | prev_bd = (recheck_bd == fep->tx_bd_base) ? last_tx_bd : recheck_bd - 1; | ||
536 | |||
537 | /* Move through the bds in reverse, look for the earliest buffer | ||
538 | * that is not ready. Adjust TBPTR to the following buffer */ | ||
539 | while ((CBDR_SC(prev_bd) & BD_ENET_TX_READY) != 0) { | ||
540 | /* Go back one buffer */ | ||
541 | recheck_bd = prev_bd; | ||
542 | |||
543 | /* update the previous buffer */ | ||
544 | prev_bd = (prev_bd == fep->tx_bd_base) ? last_tx_bd : prev_bd - 1; | ||
545 | |||
546 | /* We should never see all bds marked as ready, check anyway */ | ||
547 | if (recheck_bd == curr_tbptr) | ||
548 | break; | ||
549 | } | ||
550 | /* Now update the TBPTR and dirty flag to the current buffer */ | ||
551 | W32(ep, fen_genfcc.fcc_tbptr, | ||
552 | (uint) (((void *)recheck_bd - fep->ring_base) + | ||
553 | fep->ring_mem_addr)); | ||
554 | fep->dirty_tx = recheck_bd; | ||
518 | 555 | ||
519 | C32(fccp, fcc_gfmr, FCC_GFMR_ENT); | 556 | C32(fccp, fcc_gfmr, FCC_GFMR_ENT); |
520 | udelay(10); | 557 | udelay(10); |
diff --git a/drivers/net/greth.c b/drivers/net/greth.c index f37a4c143ddd..3a029d02c2b4 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c | |||
@@ -1607,14 +1607,13 @@ static struct of_device_id greth_of_match[] = { | |||
1607 | MODULE_DEVICE_TABLE(of, greth_of_match); | 1607 | MODULE_DEVICE_TABLE(of, greth_of_match); |
1608 | 1608 | ||
1609 | static struct of_platform_driver greth_of_driver = { | 1609 | static struct of_platform_driver greth_of_driver = { |
1610 | .name = "grlib-greth", | 1610 | .driver = { |
1611 | .match_table = greth_of_match, | 1611 | .name = "grlib-greth", |
1612 | .owner = THIS_MODULE, | ||
1613 | .of_match_table = greth_of_match, | ||
1614 | }, | ||
1612 | .probe = greth_of_probe, | 1615 | .probe = greth_of_probe, |
1613 | .remove = __devexit_p(greth_of_remove), | 1616 | .remove = __devexit_p(greth_of_remove), |
1614 | .driver = { | ||
1615 | .owner = THIS_MODULE, | ||
1616 | .name = "grlib-greth", | ||
1617 | }, | ||
1618 | }; | 1617 | }; |
1619 | 1618 | ||
1620 | static int __init greth_init(void) | 1619 | static int __init greth_init(void) |
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c index c80ca64277b2..7805bbf1d53a 100644 --- a/drivers/net/ksz884x.c +++ b/drivers/net/ksz884x.c | |||
@@ -4854,7 +4854,7 @@ static inline void copy_old_skb(struct sk_buff *old, struct sk_buff *skb) | |||
4854 | * | 4854 | * |
4855 | * Return 0 if successful; otherwise an error code indicating failure. | 4855 | * Return 0 if successful; otherwise an error code indicating failure. |
4856 | */ | 4856 | */ |
4857 | static int netdev_tx(struct sk_buff *skb, struct net_device *dev) | 4857 | static netdev_tx_t netdev_tx(struct sk_buff *skb, struct net_device *dev) |
4858 | { | 4858 | { |
4859 | struct dev_priv *priv = netdev_priv(dev); | 4859 | struct dev_priv *priv = netdev_priv(dev); |
4860 | struct dev_info *hw_priv = priv->adapter; | 4860 | struct dev_info *hw_priv = priv->adapter; |
@@ -6863,6 +6863,7 @@ static const struct net_device_ops netdev_ops = { | |||
6863 | .ndo_tx_timeout = netdev_tx_timeout, | 6863 | .ndo_tx_timeout = netdev_tx_timeout, |
6864 | .ndo_change_mtu = netdev_change_mtu, | 6864 | .ndo_change_mtu = netdev_change_mtu, |
6865 | .ndo_set_mac_address = netdev_set_mac_address, | 6865 | .ndo_set_mac_address = netdev_set_mac_address, |
6866 | .ndo_validate_addr = eth_validate_addr, | ||
6866 | .ndo_do_ioctl = netdev_ioctl, | 6867 | .ndo_do_ioctl = netdev_ioctl, |
6867 | .ndo_set_rx_mode = netdev_set_rx_mode, | 6868 | .ndo_set_rx_mode = netdev_set_rx_mode, |
6868 | #ifdef CONFIG_NET_POLL_CONTROLLER | 6869 | #ifdef CONFIG_NET_POLL_CONTROLLER |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 78eb3190b9b1..1edb7a61983c 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -340,7 +340,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, gfp_t gfp) | |||
340 | 340 | ||
341 | skb_to_sgvec(skb, vi->rx_sg + 1, 0, skb->len); | 341 | skb_to_sgvec(skb, vi->rx_sg + 1, 0, skb->len); |
342 | 342 | ||
343 | err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 2, skb); | 343 | err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 2, skb, gfp); |
344 | if (err < 0) | 344 | if (err < 0) |
345 | dev_kfree_skb(skb); | 345 | dev_kfree_skb(skb); |
346 | 346 | ||
@@ -385,8 +385,8 @@ static int add_recvbuf_big(struct virtnet_info *vi, gfp_t gfp) | |||
385 | 385 | ||
386 | /* chain first in list head */ | 386 | /* chain first in list head */ |
387 | first->private = (unsigned long)list; | 387 | first->private = (unsigned long)list; |
388 | err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, MAX_SKB_FRAGS + 2, | 388 | err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, MAX_SKB_FRAGS + 2, |
389 | first); | 389 | first, gfp); |
390 | if (err < 0) | 390 | if (err < 0) |
391 | give_pages(vi, first); | 391 | give_pages(vi, first); |
392 | 392 | ||
@@ -404,7 +404,7 @@ static int add_recvbuf_mergeable(struct virtnet_info *vi, gfp_t gfp) | |||
404 | 404 | ||
405 | sg_init_one(vi->rx_sg, page_address(page), PAGE_SIZE); | 405 | sg_init_one(vi->rx_sg, page_address(page), PAGE_SIZE); |
406 | 406 | ||
407 | err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 1, page); | 407 | err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 1, page, gfp); |
408 | if (err < 0) | 408 | if (err < 0) |
409 | give_pages(vi, page); | 409 | give_pages(vi, page); |
410 | 410 | ||
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c index 82ab532a4923..a93dc18a45c3 100644 --- a/drivers/net/wireless/ath/ar9170/usb.c +++ b/drivers/net/wireless/ath/ar9170/usb.c | |||
@@ -739,17 +739,27 @@ err_out: | |||
739 | static void ar9170_usb_firmware_failed(struct ar9170_usb *aru) | 739 | static void ar9170_usb_firmware_failed(struct ar9170_usb *aru) |
740 | { | 740 | { |
741 | struct device *parent = aru->udev->dev.parent; | 741 | struct device *parent = aru->udev->dev.parent; |
742 | struct usb_device *udev; | ||
743 | |||
744 | /* | ||
745 | * Store a copy of the usb_device pointer locally. | ||
746 | * This is because device_release_driver initiates | ||
747 | * ar9170_usb_disconnect, which in turn frees our | ||
748 | * driver context (aru). | ||
749 | */ | ||
750 | udev = aru->udev; | ||
742 | 751 | ||
743 | complete(&aru->firmware_loading_complete); | 752 | complete(&aru->firmware_loading_complete); |
744 | 753 | ||
745 | /* unbind anything failed */ | 754 | /* unbind anything failed */ |
746 | if (parent) | 755 | if (parent) |
747 | device_lock(parent); | 756 | device_lock(parent); |
748 | device_release_driver(&aru->udev->dev); | 757 | |
758 | device_release_driver(&udev->dev); | ||
749 | if (parent) | 759 | if (parent) |
750 | device_unlock(parent); | 760 | device_unlock(parent); |
751 | 761 | ||
752 | usb_put_dev(aru->udev); | 762 | usb_put_dev(udev); |
753 | } | 763 | } |
754 | 764 | ||
755 | static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context) | 765 | static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context) |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 3db19172b43b..859aa4ab0769 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1198,7 +1198,7 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx) | |||
1198 | int r; | 1198 | int r; |
1199 | 1199 | ||
1200 | ath_print(common, ATH_DBG_FATAL, | 1200 | ath_print(common, ATH_DBG_FATAL, |
1201 | "Unable to stop TxDMA. Reset HAL!\n"); | 1201 | "Failed to stop TX DMA. Resetting hardware!\n"); |
1202 | 1202 | ||
1203 | spin_lock_bh(&sc->sc_resetlock); | 1203 | spin_lock_bh(&sc->sc_resetlock); |
1204 | r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false); | 1204 | r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false); |
@@ -1728,6 +1728,8 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, | |||
1728 | } else | 1728 | } else |
1729 | bf->bf_isnullfunc = false; | 1729 | bf->bf_isnullfunc = false; |
1730 | 1730 | ||
1731 | bf->bf_tx_aborted = false; | ||
1732 | |||
1731 | return 0; | 1733 | return 0; |
1732 | } | 1734 | } |
1733 | 1735 | ||
@@ -1989,7 +1991,7 @@ static int ath_tx_num_badfrms(struct ath_softc *sc, struct ath_buf *bf, | |||
1989 | int nbad = 0; | 1991 | int nbad = 0; |
1990 | int isaggr = 0; | 1992 | int isaggr = 0; |
1991 | 1993 | ||
1992 | if (bf->bf_tx_aborted) | 1994 | if (bf->bf_lastbf->bf_tx_aborted) |
1993 | return 0; | 1995 | return 0; |
1994 | 1996 | ||
1995 | isaggr = bf_isaggr(bf); | 1997 | isaggr = bf_isaggr(bf); |
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index a115bfa9513a..7a377f5b7662 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -329,9 +329,8 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, | |||
329 | /* create the exported radio header */ | 329 | /* create the exported radio header */ |
330 | 330 | ||
331 | /* radiotap header */ | 331 | /* radiotap header */ |
332 | radiotap_hdr.hdr.it_version = 0; | 332 | memset(&radiotap_hdr, 0, sizeof(radiotap_hdr)); |
333 | /* XXX must check this value for pad */ | 333 | /* XXX must check radiotap_hdr.hdr.it_pad for pad */ |
334 | radiotap_hdr.hdr.it_pad = 0; | ||
335 | radiotap_hdr.hdr.it_len = cpu_to_le16 (sizeof(struct rx_radiotap_hdr)); | 334 | radiotap_hdr.hdr.it_len = cpu_to_le16 (sizeof(struct rx_radiotap_hdr)); |
336 | radiotap_hdr.hdr.it_present = cpu_to_le32 (RX_RADIOTAP_PRESENT); | 335 | radiotap_hdr.hdr.it_present = cpu_to_le32 (RX_RADIOTAP_PRESENT); |
337 | radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->rx_rate); | 336 | radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->rx_rate); |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 699161327d65..0f8b84b7224c 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -413,7 +413,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
413 | */ | 413 | */ |
414 | rt2x00_desc_read(txi, 0, &word); | 414 | rt2x00_desc_read(txi, 0, &word); |
415 | rt2x00_set_field32(&word, TXINFO_W0_USB_DMA_TX_PKT_LEN, | 415 | rt2x00_set_field32(&word, TXINFO_W0_USB_DMA_TX_PKT_LEN, |
416 | skb->len - TXINFO_DESC_SIZE); | 416 | skb->len + TXWI_DESC_SIZE); |
417 | rt2x00_set_field32(&word, TXINFO_W0_WIV, | 417 | rt2x00_set_field32(&word, TXINFO_W0_WIV, |
418 | !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags)); | 418 | !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags)); |
419 | rt2x00_set_field32(&word, TXINFO_W0_QSEL, 2); | 419 | rt2x00_set_field32(&word, TXINFO_W0_QSEL, 2); |
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 989e2752cc36..6dcda86be6eb 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c | |||
@@ -625,9 +625,12 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus, | |||
625 | ssb_printk(KERN_ERR PFX "No SPROM available!\n"); | 625 | ssb_printk(KERN_ERR PFX "No SPROM available!\n"); |
626 | return -ENODEV; | 626 | return -ENODEV; |
627 | } | 627 | } |
628 | 628 | if (bus->chipco.dev) { /* can be unavailible! */ | |
629 | bus->sprom_offset = (bus->chipco.dev->id.revision < 31) ? | 629 | bus->sprom_offset = (bus->chipco.dev->id.revision < 31) ? |
630 | SSB_SPROM_BASE1 : SSB_SPROM_BASE31; | 630 | SSB_SPROM_BASE1 : SSB_SPROM_BASE31; |
631 | } else { | ||
632 | bus->sprom_offset = SSB_SPROM_BASE1; | ||
633 | } | ||
631 | 634 | ||
632 | buf = kcalloc(SSB_SPROMSIZE_WORDS_R123, sizeof(u16), GFP_KERNEL); | 635 | buf = kcalloc(SSB_SPROMSIZE_WORDS_R123, sizeof(u16), GFP_KERNEL); |
633 | if (!buf) | 636 | if (!buf) |
diff --git a/drivers/ssb/sprom.c b/drivers/ssb/sprom.c index 007bc3a03486..4f7cc8d13277 100644 --- a/drivers/ssb/sprom.c +++ b/drivers/ssb/sprom.c | |||
@@ -185,6 +185,7 @@ bool ssb_is_sprom_available(struct ssb_bus *bus) | |||
185 | /* this routine differs from specs as we do not access SPROM directly | 185 | /* this routine differs from specs as we do not access SPROM directly |
186 | on PCMCIA */ | 186 | on PCMCIA */ |
187 | if (bus->bustype == SSB_BUSTYPE_PCI && | 187 | if (bus->bustype == SSB_BUSTYPE_PCI && |
188 | bus->chipco.dev && /* can be unavailible! */ | ||
188 | bus->chipco.dev->id.revision >= 31) | 189 | bus->chipco.dev->id.revision >= 31) |
189 | return bus->chipco.capabilities & SSB_CHIPCO_CAP_SPROM; | 190 | return bus->chipco.capabilities & SSB_CHIPCO_CAP_SPROM; |
190 | 191 | ||
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index c00cc0c4d0b7..24e5d01d27d0 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -397,7 +397,7 @@ struct xt_table_info { | |||
397 | * @stacksize jumps (number of user chains) can possibly be made. | 397 | * @stacksize jumps (number of user chains) can possibly be made. |
398 | */ | 398 | */ |
399 | unsigned int stacksize; | 399 | unsigned int stacksize; |
400 | unsigned int *stackptr; | 400 | unsigned int __percpu *stackptr; |
401 | void ***jumpstack; | 401 | void ***jumpstack; |
402 | /* ipt_entry tables: one per CPU */ | 402 | /* ipt_entry tables: one per CPU */ |
403 | /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */ | 403 | /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 7cdfb4d52847..bf243fc54959 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -501,7 +501,7 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | |||
501 | return __alloc_skb(size, priority, 1, -1); | 501 | return __alloc_skb(size, priority, 1, -1); |
502 | } | 502 | } |
503 | 503 | ||
504 | extern int skb_recycle_check(struct sk_buff *skb, int skb_size); | 504 | extern bool skb_recycle_check(struct sk_buff *skb, int skb_size); |
505 | 505 | ||
506 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); | 506 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); |
507 | extern struct sk_buff *skb_clone(struct sk_buff *skb, | 507 | extern struct sk_buff *skb_clone(struct sk_buff *skb, |
diff --git a/include/net/sock.h b/include/net/sock.h index ca241ea14875..731150d52799 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1524,20 +1524,7 @@ extern void sk_stop_timer(struct sock *sk, struct timer_list* timer); | |||
1524 | 1524 | ||
1525 | extern int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); | 1525 | extern int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); |
1526 | 1526 | ||
1527 | static inline int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) | 1527 | extern int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb); |
1528 | { | ||
1529 | /* Cast skb->rcvbuf to unsigned... It's pointless, but reduces | ||
1530 | number of warnings when compiling with -W --ANK | ||
1531 | */ | ||
1532 | if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= | ||
1533 | (unsigned)sk->sk_rcvbuf) | ||
1534 | return -ENOMEM; | ||
1535 | skb_set_owner_r(skb, sk); | ||
1536 | skb_queue_tail(&sk->sk_error_queue, skb); | ||
1537 | if (!sock_flag(sk, SOCK_DEAD)) | ||
1538 | sk->sk_data_ready(sk, skb->len); | ||
1539 | return 0; | ||
1540 | } | ||
1541 | 1528 | ||
1542 | /* | 1529 | /* |
1543 | * Recover an error report and clear atomically | 1530 | * Recover an error report and clear atomically |
diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c index cb4325a3dc83..965c5baace40 100644 --- a/net/caif/cfserl.c +++ b/net/caif/cfserl.c | |||
@@ -59,16 +59,18 @@ static int cfserl_receive(struct cflayer *l, struct cfpkt *newpkt) | |||
59 | u8 stx = CFSERL_STX; | 59 | u8 stx = CFSERL_STX; |
60 | int ret; | 60 | int ret; |
61 | u16 expectlen = 0; | 61 | u16 expectlen = 0; |
62 | |||
62 | caif_assert(newpkt != NULL); | 63 | caif_assert(newpkt != NULL); |
63 | spin_lock(&layr->sync); | 64 | spin_lock(&layr->sync); |
64 | 65 | ||
65 | if (layr->incomplete_frm != NULL) { | 66 | if (layr->incomplete_frm != NULL) { |
66 | |||
67 | layr->incomplete_frm = | 67 | layr->incomplete_frm = |
68 | cfpkt_append(layr->incomplete_frm, newpkt, expectlen); | 68 | cfpkt_append(layr->incomplete_frm, newpkt, expectlen); |
69 | pkt = layr->incomplete_frm; | 69 | pkt = layr->incomplete_frm; |
70 | if (pkt == NULL) | 70 | if (pkt == NULL) { |
71 | spin_unlock(&layr->sync); | ||
71 | return -ENOMEM; | 72 | return -ENOMEM; |
73 | } | ||
72 | } else { | 74 | } else { |
73 | pkt = newpkt; | 75 | pkt = newpkt; |
74 | } | 76 | } |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f8abf68e3988..9f07e749d7b1 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -482,22 +482,22 @@ EXPORT_SYMBOL(consume_skb); | |||
482 | * reference count dropping and cleans up the skbuff as if it | 482 | * reference count dropping and cleans up the skbuff as if it |
483 | * just came from __alloc_skb(). | 483 | * just came from __alloc_skb(). |
484 | */ | 484 | */ |
485 | int skb_recycle_check(struct sk_buff *skb, int skb_size) | 485 | bool skb_recycle_check(struct sk_buff *skb, int skb_size) |
486 | { | 486 | { |
487 | struct skb_shared_info *shinfo; | 487 | struct skb_shared_info *shinfo; |
488 | 488 | ||
489 | if (irqs_disabled()) | 489 | if (irqs_disabled()) |
490 | return 0; | 490 | return false; |
491 | 491 | ||
492 | if (skb_is_nonlinear(skb) || skb->fclone != SKB_FCLONE_UNAVAILABLE) | 492 | if (skb_is_nonlinear(skb) || skb->fclone != SKB_FCLONE_UNAVAILABLE) |
493 | return 0; | 493 | return false; |
494 | 494 | ||
495 | skb_size = SKB_DATA_ALIGN(skb_size + NET_SKB_PAD); | 495 | skb_size = SKB_DATA_ALIGN(skb_size + NET_SKB_PAD); |
496 | if (skb_end_pointer(skb) - skb->head < skb_size) | 496 | if (skb_end_pointer(skb) - skb->head < skb_size) |
497 | return 0; | 497 | return false; |
498 | 498 | ||
499 | if (skb_shared(skb) || skb_cloned(skb)) | 499 | if (skb_shared(skb) || skb_cloned(skb)) |
500 | return 0; | 500 | return false; |
501 | 501 | ||
502 | skb_release_head_state(skb); | 502 | skb_release_head_state(skb); |
503 | 503 | ||
@@ -509,7 +509,7 @@ int skb_recycle_check(struct sk_buff *skb, int skb_size) | |||
509 | skb->data = skb->head + NET_SKB_PAD; | 509 | skb->data = skb->head + NET_SKB_PAD; |
510 | skb_reset_tail_pointer(skb); | 510 | skb_reset_tail_pointer(skb); |
511 | 511 | ||
512 | return 1; | 512 | return true; |
513 | } | 513 | } |
514 | EXPORT_SYMBOL(skb_recycle_check); | 514 | EXPORT_SYMBOL(skb_recycle_check); |
515 | 515 | ||
@@ -2965,6 +2965,34 @@ int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer) | |||
2965 | } | 2965 | } |
2966 | EXPORT_SYMBOL_GPL(skb_cow_data); | 2966 | EXPORT_SYMBOL_GPL(skb_cow_data); |
2967 | 2967 | ||
2968 | static void sock_rmem_free(struct sk_buff *skb) | ||
2969 | { | ||
2970 | struct sock *sk = skb->sk; | ||
2971 | |||
2972 | atomic_sub(skb->truesize, &sk->sk_rmem_alloc); | ||
2973 | } | ||
2974 | |||
2975 | /* | ||
2976 | * Note: We dont mem charge error packets (no sk_forward_alloc changes) | ||
2977 | */ | ||
2978 | int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) | ||
2979 | { | ||
2980 | if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= | ||
2981 | (unsigned)sk->sk_rcvbuf) | ||
2982 | return -ENOMEM; | ||
2983 | |||
2984 | skb_orphan(skb); | ||
2985 | skb->sk = sk; | ||
2986 | skb->destructor = sock_rmem_free; | ||
2987 | atomic_add(skb->truesize, &sk->sk_rmem_alloc); | ||
2988 | |||
2989 | skb_queue_tail(&sk->sk_error_queue, skb); | ||
2990 | if (!sock_flag(sk, SOCK_DEAD)) | ||
2991 | sk->sk_data_ready(sk, skb->len); | ||
2992 | return 0; | ||
2993 | } | ||
2994 | EXPORT_SYMBOL(sock_queue_err_skb); | ||
2995 | |||
2968 | void skb_tstamp_tx(struct sk_buff *orig_skb, | 2996 | void skb_tstamp_tx(struct sk_buff *orig_skb, |
2969 | struct skb_shared_hwtstamps *hwtstamps) | 2997 | struct skb_shared_hwtstamps *hwtstamps) |
2970 | { | 2998 | { |
@@ -2996,7 +3024,9 @@ void skb_tstamp_tx(struct sk_buff *orig_skb, | |||
2996 | memset(serr, 0, sizeof(*serr)); | 3024 | memset(serr, 0, sizeof(*serr)); |
2997 | serr->ee.ee_errno = ENOMSG; | 3025 | serr->ee.ee_errno = ENOMSG; |
2998 | serr->ee.ee_origin = SO_EE_ORIGIN_TIMESTAMPING; | 3026 | serr->ee.ee_origin = SO_EE_ORIGIN_TIMESTAMPING; |
3027 | |||
2999 | err = sock_queue_err_skb(sk, skb); | 3028 | err = sock_queue_err_skb(sk, skb); |
3029 | |||
3000 | if (err) | 3030 | if (err) |
3001 | kfree_skb(skb); | 3031 | kfree_skb(skb); |
3002 | } | 3032 | } |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 63958f3394a5..4b6c5ca610fc 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -336,7 +336,7 @@ ipt_do_table(struct sk_buff *skb, | |||
336 | cpu = smp_processor_id(); | 336 | cpu = smp_processor_id(); |
337 | table_base = private->entries[cpu]; | 337 | table_base = private->entries[cpu]; |
338 | jumpstack = (struct ipt_entry **)private->jumpstack[cpu]; | 338 | jumpstack = (struct ipt_entry **)private->jumpstack[cpu]; |
339 | stackptr = &private->stackptr[cpu]; | 339 | stackptr = per_cpu_ptr(private->stackptr, cpu); |
340 | origptr = *stackptr; | 340 | origptr = *stackptr; |
341 | 341 | ||
342 | e = get_entry(table_base, private->hook_entry[hook]); | 342 | e = get_entry(table_base, private->hook_entry[hook]); |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 3e6dafcb1071..548d575e6cc6 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2639,7 +2639,7 @@ static void DBGUNDO(struct sock *sk, const char *msg) | |||
2639 | if (sk->sk_family == AF_INET) { | 2639 | if (sk->sk_family == AF_INET) { |
2640 | printk(KERN_DEBUG "Undo %s %pI4/%u c%u l%u ss%u/%u p%u\n", | 2640 | printk(KERN_DEBUG "Undo %s %pI4/%u c%u l%u ss%u/%u p%u\n", |
2641 | msg, | 2641 | msg, |
2642 | &inet->daddr, ntohs(inet->dport), | 2642 | &inet->inet_daddr, ntohs(inet->inet_dport), |
2643 | tp->snd_cwnd, tcp_left_out(tp), | 2643 | tp->snd_cwnd, tcp_left_out(tp), |
2644 | tp->snd_ssthresh, tp->prior_ssthresh, | 2644 | tp->snd_ssthresh, tp->prior_ssthresh, |
2645 | tp->packets_out); | 2645 | tp->packets_out); |
@@ -2649,7 +2649,7 @@ static void DBGUNDO(struct sock *sk, const char *msg) | |||
2649 | struct ipv6_pinfo *np = inet6_sk(sk); | 2649 | struct ipv6_pinfo *np = inet6_sk(sk); |
2650 | printk(KERN_DEBUG "Undo %s %pI6/%u c%u l%u ss%u/%u p%u\n", | 2650 | printk(KERN_DEBUG "Undo %s %pI6/%u c%u l%u ss%u/%u p%u\n", |
2651 | msg, | 2651 | msg, |
2652 | &np->daddr, ntohs(inet->dport), | 2652 | &np->daddr, ntohs(inet->inet_dport), |
2653 | tp->snd_cwnd, tcp_left_out(tp), | 2653 | tp->snd_cwnd, tcp_left_out(tp), |
2654 | tp->snd_ssthresh, tp->prior_ssthresh, | 2654 | tp->snd_ssthresh, tp->prior_ssthresh, |
2655 | tp->packets_out); | 2655 | tp->packets_out); |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 58585748bdac..eec4ff456e33 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -633,9 +633,9 @@ void __udp4_lib_err(struct sk_buff *skb, u32 info, struct udp_table *udptable) | |||
633 | if (!inet->recverr) { | 633 | if (!inet->recverr) { |
634 | if (!harderr || sk->sk_state != TCP_ESTABLISHED) | 634 | if (!harderr || sk->sk_state != TCP_ESTABLISHED) |
635 | goto out; | 635 | goto out; |
636 | } else { | 636 | } else |
637 | ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1)); | 637 | ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1)); |
638 | } | 638 | |
639 | sk->sk_err = err; | 639 | sk->sk_err = err; |
640 | sk->sk_error_report(sk); | 640 | sk->sk_error_report(sk); |
641 | out: | 641 | out: |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 6f517bd83692..9d2d68f0e605 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -363,7 +363,7 @@ ip6t_do_table(struct sk_buff *skb, | |||
363 | cpu = smp_processor_id(); | 363 | cpu = smp_processor_id(); |
364 | table_base = private->entries[cpu]; | 364 | table_base = private->entries[cpu]; |
365 | jumpstack = (struct ip6t_entry **)private->jumpstack[cpu]; | 365 | jumpstack = (struct ip6t_entry **)private->jumpstack[cpu]; |
366 | stackptr = &private->stackptr[cpu]; | 366 | stackptr = per_cpu_ptr(private->stackptr, cpu); |
367 | origptr = *stackptr; | 367 | origptr = *stackptr; |
368 | 368 | ||
369 | e = get_entry(table_base, private->hook_entry[hook]); | 369 | e = get_entry(table_base, private->hook_entry[hook]); |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 294cbe8b0725..252d76199c41 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -814,7 +814,7 @@ struct dst_entry * ip6_route_output(struct net *net, struct sock *sk, | |||
814 | { | 814 | { |
815 | int flags = 0; | 815 | int flags = 0; |
816 | 816 | ||
817 | if (fl->oif || rt6_need_strict(&fl->fl6_dst)) | 817 | if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl->fl6_dst)) |
818 | flags |= RT6_LOOKUP_F_IFACE; | 818 | flags |= RT6_LOOKUP_F_IFACE; |
819 | 819 | ||
820 | if (!ipv6_addr_any(&fl->fl6_src)) | 820 | if (!ipv6_addr_any(&fl->fl6_src)) |
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 5d218c530a4e..32be11e4c4d9 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/nl80211.h> | 5 | #include <linux/nl80211.h> |
6 | #include "ieee80211_i.h" | 6 | #include "ieee80211_i.h" |
7 | 7 | ||
8 | enum ieee80211_chan_mode | 8 | static enum ieee80211_chan_mode |
9 | __ieee80211_get_channel_mode(struct ieee80211_local *local, | 9 | __ieee80211_get_channel_mode(struct ieee80211_local *local, |
10 | struct ieee80211_sub_if_data *ignore) | 10 | struct ieee80211_sub_if_data *ignore) |
11 | { | 11 | { |
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 445de702b8b7..e34622fa0003 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -699,10 +699,8 @@ void xt_free_table_info(struct xt_table_info *info) | |||
699 | vfree(info->jumpstack); | 699 | vfree(info->jumpstack); |
700 | else | 700 | else |
701 | kfree(info->jumpstack); | 701 | kfree(info->jumpstack); |
702 | if (sizeof(unsigned int) * nr_cpu_ids > PAGE_SIZE) | 702 | |
703 | vfree(info->stackptr); | 703 | free_percpu(info->stackptr); |
704 | else | ||
705 | kfree(info->stackptr); | ||
706 | 704 | ||
707 | kfree(info); | 705 | kfree(info); |
708 | } | 706 | } |
@@ -753,14 +751,9 @@ static int xt_jumpstack_alloc(struct xt_table_info *i) | |||
753 | unsigned int size; | 751 | unsigned int size; |
754 | int cpu; | 752 | int cpu; |
755 | 753 | ||
756 | size = sizeof(unsigned int) * nr_cpu_ids; | 754 | i->stackptr = alloc_percpu(unsigned int); |
757 | if (size > PAGE_SIZE) | ||
758 | i->stackptr = vmalloc(size); | ||
759 | else | ||
760 | i->stackptr = kmalloc(size, GFP_KERNEL); | ||
761 | if (i->stackptr == NULL) | 755 | if (i->stackptr == NULL) |
762 | return -ENOMEM; | 756 | return -ENOMEM; |
763 | memset(i->stackptr, 0, size); | ||
764 | 757 | ||
765 | size = sizeof(void **) * nr_cpu_ids; | 758 | size = sizeof(void **) * nr_cpu_ids; |
766 | if (size > PAGE_SIZE) | 759 | if (size > PAGE_SIZE) |
@@ -844,10 +837,6 @@ struct xt_table *xt_register_table(struct net *net, | |||
844 | struct xt_table_info *private; | 837 | struct xt_table_info *private; |
845 | struct xt_table *t, *table; | 838 | struct xt_table *t, *table; |
846 | 839 | ||
847 | ret = xt_jumpstack_alloc(newinfo); | ||
848 | if (ret < 0) | ||
849 | return ERR_PTR(ret); | ||
850 | |||
851 | /* Don't add one object to multiple lists. */ | 840 | /* Don't add one object to multiple lists. */ |
852 | table = kmemdup(input_table, sizeof(struct xt_table), GFP_KERNEL); | 841 | table = kmemdup(input_table, sizeof(struct xt_table), GFP_KERNEL); |
853 | if (!table) { | 842 | if (!table) { |
diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 7b048a35ca58..94d72e85a475 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c | |||
@@ -1045,12 +1045,12 @@ static void pep_sock_unhash(struct sock *sk) | |||
1045 | lock_sock(sk); | 1045 | lock_sock(sk); |
1046 | if ((1 << sk->sk_state) & ~(TCPF_CLOSE|TCPF_LISTEN)) { | 1046 | if ((1 << sk->sk_state) & ~(TCPF_CLOSE|TCPF_LISTEN)) { |
1047 | skparent = pn->listener; | 1047 | skparent = pn->listener; |
1048 | sk_del_node_init(sk); | ||
1049 | release_sock(sk); | 1048 | release_sock(sk); |
1050 | 1049 | ||
1051 | sk = skparent; | ||
1052 | pn = pep_sk(skparent); | 1050 | pn = pep_sk(skparent); |
1053 | lock_sock(sk); | 1051 | lock_sock(skparent); |
1052 | sk_del_node_init(sk); | ||
1053 | sk = skparent; | ||
1054 | } | 1054 | } |
1055 | /* Unhash a listening sock only when it is closed | 1055 | /* Unhash a listening sock only when it is closed |
1056 | * and all of its active connected pipes are closed. */ | 1056 | * and all of its active connected pipes are closed. */ |
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 10ed0d55f759..f68832798db2 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c | |||
@@ -475,6 +475,7 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id, | |||
475 | err = rds_ib_setup_qp(conn); | 475 | err = rds_ib_setup_qp(conn); |
476 | if (err) { | 476 | if (err) { |
477 | rds_ib_conn_error(conn, "rds_ib_setup_qp failed (%d)\n", err); | 477 | rds_ib_conn_error(conn, "rds_ib_setup_qp failed (%d)\n", err); |
478 | mutex_unlock(&conn->c_cm_lock); | ||
478 | goto out; | 479 | goto out; |
479 | } | 480 | } |
480 | 481 | ||
diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c index a9d951b4fbae..b5dd6ac39be8 100644 --- a/net/rds/iw_cm.c +++ b/net/rds/iw_cm.c | |||
@@ -452,6 +452,7 @@ int rds_iw_cm_handle_connect(struct rdma_cm_id *cm_id, | |||
452 | err = rds_iw_setup_qp(conn); | 452 | err = rds_iw_setup_qp(conn); |
453 | if (err) { | 453 | if (err) { |
454 | rds_iw_conn_error(conn, "rds_iw_setup_qp failed (%d)\n", err); | 454 | rds_iw_conn_error(conn, "rds_iw_setup_qp failed (%d)\n", err); |
455 | mutex_unlock(&conn->c_cm_lock); | ||
455 | goto out; | 456 | goto out; |
456 | } | 457 | } |
457 | 458 | ||