diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-31 03:10:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-31 03:10:35 -0400 |
commit | 92b4522f72916ff2675060e29e4b24cf26ab59ce (patch) | |
tree | 8424a1c550a98ce09f127425fde9b7b5f2f5027a | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) | |
parent | 2903037400a26e7c0cc93ab75a7d62abfacdf485 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcsusb.c | 4 | ||||
-rw-r--r-- | drivers/net/benet/be_cmds.c | 11 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-fcc.c | 49 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ar9170/usb.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/rx.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 2 | ||||
-rw-r--r-- | drivers/ssb/pci.c | 9 | ||||
-rw-r--r-- | drivers/ssb/sprom.c | 1 | ||||
-rw-r--r-- | include/linux/skbuff.h | 2 | ||||
-rw-r--r-- | net/caif/cfserl.c | 6 | ||||
-rw-r--r-- | net/core/skbuff.c | 16 | ||||
-rw-r--r-- | net/ipv4/udp.c | 2 | ||||
-rw-r--r-- | net/ipv6/route.c | 2 | ||||
-rw-r--r-- | net/ipv6/udp.c | 6 | ||||
-rw-r--r-- | net/mac80211/chan.c | 2 | ||||
-rw-r--r-- | net/phonet/pep.c | 6 | ||||
-rw-r--r-- | net/rds/ib_cm.c | 1 | ||||
-rw-r--r-- | net/rds/iw_cm.c | 1 |
19 files changed, 107 insertions, 38 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/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 9d11dbf5e4da..9e305d7fb4bd 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; |
@@ -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/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/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/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/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..4e7ac09c281a 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 | ||
@@ -2996,7 +2996,11 @@ void skb_tstamp_tx(struct sk_buff *orig_skb, | |||
2996 | memset(serr, 0, sizeof(*serr)); | 2996 | memset(serr, 0, sizeof(*serr)); |
2997 | serr->ee.ee_errno = ENOMSG; | 2997 | serr->ee.ee_errno = ENOMSG; |
2998 | serr->ee.ee_origin = SO_EE_ORIGIN_TIMESTAMPING; | 2998 | serr->ee.ee_origin = SO_EE_ORIGIN_TIMESTAMPING; |
2999 | |||
3000 | bh_lock_sock(sk); | ||
2999 | err = sock_queue_err_skb(sk, skb); | 3001 | err = sock_queue_err_skb(sk, skb); |
3002 | bh_unlock_sock(sk); | ||
3003 | |||
3000 | if (err) | 3004 | if (err) |
3001 | kfree_skb(skb); | 3005 | kfree_skb(skb); |
3002 | } | 3006 | } |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 58585748bdac..50678f9a2763 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -634,7 +634,9 @@ void __udp4_lib_err(struct sk_buff *skb, u32 info, struct udp_table *udptable) | |||
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 | bh_lock_sock(sk); | ||
637 | ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1)); | 638 | ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1)); |
639 | bh_unlock_sock(sk); | ||
638 | } | 640 | } |
639 | sk->sk_err = err; | 641 | sk->sk_err = err; |
640 | sk->sk_error_report(sk); | 642 | sk->sk_error_report(sk); |
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/ipv6/udp.c b/net/ipv6/udp.c index 87be58673b55..3048f906c042 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -466,9 +466,11 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
466 | if (sk->sk_state != TCP_ESTABLISHED && !np->recverr) | 466 | if (sk->sk_state != TCP_ESTABLISHED && !np->recverr) |
467 | goto out; | 467 | goto out; |
468 | 468 | ||
469 | if (np->recverr) | 469 | if (np->recverr) { |
470 | bh_lock_sock(sk); | ||
470 | ipv6_icmp_error(sk, skb, err, uh->dest, ntohl(info), (u8 *)(uh+1)); | 471 | ipv6_icmp_error(sk, skb, err, uh->dest, ntohl(info), (u8 *)(uh+1)); |
471 | 472 | bh_unlock_sock(sk); | |
473 | } | ||
472 | sk->sk_err = err; | 474 | sk->sk_err = err; |
473 | sk->sk_error_report(sk); | 475 | sk->sk_error_report(sk); |
474 | out: | 476 | out: |
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/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 | ||