lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140327160938.c1a4f9a5df6f93e17b55d3cd@canb.auug.org.au>
Date:	Thu, 27 Mar 2014 16:09:38 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Greg KH <greg@...ah.com>, David Miller <davem@...emloft.net>,
	<netdev@...r.kernel.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Mathieu Maret <mathieu.maret@...il.com>,
	Jelena Bjelja <jelena.bjelja.ing@...il.com>
Subject: linux-next: manual merge of the staging tree with the net-next tree

Hi Greg,

Today's linux-next merge of the staging tree got a conflict in
drivers/staging/wlags49_h2/wl_netdev.c between commit 8d4ade284a41
("wlags49_h2: Call dev_kfree/consume_skb_any instead of dev_kfree_skb")
from the net-next tree and commit fed3ffd8f7ef ("staging: wlags49_h2:
reindent wl_netdev.c") (and maybe others) from the staging tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/staging/wlags49_h2/wl_netdev.c
index 69bc0a01ae14,77e4be21e44b..000000000000
--- a/drivers/staging/wlags49_h2/wl_netdev.c
+++ b/drivers/staging/wlags49_h2/wl_netdev.c
@@@ -626,103 -605,105 +605,105 @@@ void wl_tx_timeout(struct net_device *d
   *      1 on error
   *
   ******************************************************************************/
- int wl_send( struct wl_private *lp )
+ int wl_send(struct wl_private *lp)
  {
  
-     int                 status;
-     DESC_STRCT          *desc;
-     WVLAN_LFRAME        *txF = NULL;
-     struct list_head    *element;
-     int                 len;
+ 	int status;
+ 	DESC_STRCT *desc;
+ 	WVLAN_LFRAME *txF = NULL;
+ 	struct list_head *element;
+ 	int len;
      /*------------------------------------------------------------------------*/
  
-     if( lp == NULL ) {
-         DBG_ERROR( DbgInfo, "Private adapter struct is NULL\n" );
-         return FALSE;
-     }
-     if( lp->dev == NULL ) {
-         DBG_ERROR( DbgInfo, "net_device struct in wl_private is NULL\n" );
-         return FALSE;
-     }
- 
-     /* Check for the availability of FIDs; if none are available, don't take any
-        frames off the txQ */
-     if( lp->hcfCtx.IFB_RscInd == 0 ) {
-         return FALSE;
-     }
- 
-     /* Reclaim the TxQ Elements and place them back on the free queue */
-     if( !list_empty( &( lp->txQ[0] ))) {
-         element = lp->txQ[0].next;
- 
-         txF = (WVLAN_LFRAME * )list_entry( element, WVLAN_LFRAME, node );
-         if( txF != NULL ) {
-             lp->txF.skb  = txF->frame.skb;
-             lp->txF.port = txF->frame.port;
- 
-             txF->frame.skb  = NULL;
-             txF->frame.port = 0;
- 
-             list_del( &( txF->node ));
-             list_add( element, &( lp->txFree ));
- 
-             lp->txQ_count--;
- 
-             if( lp->txQ_count < TX_Q_LOW_WATER_MARK ) {
-                 if( lp->netif_queue_on == FALSE ) {
-                     DBG_TX( DbgInfo, "Kickstarting Q: %d\n", lp->txQ_count );
-                     netif_wake_queue( lp->dev );
-                     WL_WDS_NETIF_WAKE_QUEUE( lp );
-                     lp->netif_queue_on = TRUE;
-                 }
-             }
-         }
-     }
- 
-     if( lp->txF.skb == NULL ) {
-         return FALSE;
-     }
- 
-     /* If the device has resources (FIDs) available, then Tx the packet */
-     /* Format the TxRequest and send it to the adapter */
-     len = lp->txF.skb->len < ETH_ZLEN ? ETH_ZLEN : lp->txF.skb->len;
- 
-     desc                    = &( lp->desc_tx );
-     desc->buf_addr          = lp->txF.skb->data;
-     desc->BUF_CNT           = len;
-     desc->next_desc_addr    = NULL;
- 
-     status = hcf_send_msg( &( lp->hcfCtx ), desc, lp->txF.port );
- 
-     if( status == HCF_SUCCESS ) {
-         lp->dev->trans_start = jiffies;
- 
-         DBG_TX( DbgInfo, "Transmit...\n" );
- 
-         if( lp->txF.port == HCF_PORT_0 ) {
-             lp->stats.tx_packets++;
-             lp->stats.tx_bytes += lp->txF.skb->len;
-         }
+ 	if (lp == NULL) {
+ 		DBG_ERROR(DbgInfo, "Private adapter struct is NULL\n");
+ 		return FALSE;
+ 	}
+ 	if (lp->dev == NULL) {
+ 		DBG_ERROR(DbgInfo, "net_device struct in wl_private is NULL\n");
+ 		return FALSE;
+ 	}
+ 
+ 	/*
+ 	 * Check for the availability of FIDs; if none are available,
+ 	 * don't take any frames off the txQ
+ 	 */
+ 	if (lp->hcfCtx.IFB_RscInd == 0)
+ 		return FALSE;
+ 
+ 	/* Reclaim the TxQ Elements and place them back on the free queue */
+ 	if (!list_empty(&(lp->txQ[0]))) {
+ 		element = lp->txQ[0].next;
+ 
+ 		txF = (WVLAN_LFRAME *) list_entry(element, WVLAN_LFRAME, node);
+ 		if (txF != NULL) {
+ 			lp->txF.skb = txF->frame.skb;
+ 			lp->txF.port = txF->frame.port;
+ 
+ 			txF->frame.skb = NULL;
+ 			txF->frame.port = 0;
+ 
+ 			list_del(&(txF->node));
+ 			list_add(element, &(lp->txFree));
+ 
+ 			lp->txQ_count--;
+ 
+ 			if (lp->txQ_count < TX_Q_LOW_WATER_MARK) {
+ 				if (lp->netif_queue_on == FALSE) {
+ 					DBG_TX(DbgInfo, "Kickstarting Q: %d\n",
+ 					       lp->txQ_count);
+ 					netif_wake_queue(lp->dev);
+ 					WL_WDS_NETIF_WAKE_QUEUE(lp);
+ 					lp->netif_queue_on = TRUE;
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	if (lp->txF.skb == NULL)
+ 		return FALSE;
+ 
+ 	/* If the device has resources (FIDs) available, then Tx the packet */
+ 	/* Format the TxRequest and send it to the adapter */
+ 	len = lp->txF.skb->len < ETH_ZLEN ? ETH_ZLEN : lp->txF.skb->len;
+ 
+ 	desc = &(lp->desc_tx);
+ 	desc->buf_addr = lp->txF.skb->data;
+ 	desc->BUF_CNT = len;
+ 	desc->next_desc_addr = NULL;
+ 
+ 	status = hcf_send_msg(&(lp->hcfCtx), desc, lp->txF.port);
+ 
+ 	if (status == HCF_SUCCESS) {
+ 		lp->dev->trans_start = jiffies;
+ 
+ 		DBG_TX(DbgInfo, "Transmit...\n");
  
+ 		if (lp->txF.port == HCF_PORT_0) {
+ 			lp->stats.tx_packets++;
+ 			lp->stats.tx_bytes += lp->txF.skb->len;
+ 		}
  #ifdef USE_WDS
-         else
-         {
-             lp->wds_port[(( lp->txF.port >> 8 ) - 1)].stats.tx_packets++;
-             lp->wds_port[(( lp->txF.port >> 8 ) - 1)].stats.tx_bytes += lp->txF.skb->len;
-         }
+ 		else {
+ 			lp->wds_port[((lp->txF.port >> 8) -
+ 				      1)].stats.tx_packets++;
+ 			lp->wds_port[((lp->txF.port >> 8) -
+ 				      1)].stats.tx_bytes += lp->txF.skb->len;
+ 		}
  
- #endif  /* USE_WDS */
+ #endif /* USE_WDS */
  
-         /* Free the skb and perform queue cleanup, as the buffer was
-             transmitted successfully */
-         dev_consume_skb_any( lp->txF.skb );
+ 		/* Free the skb and perform queue cleanup, as the buffer was
+ 		   transmitted successfully */
 -		dev_kfree_skb(lp->txF.skb);
++		dev_consume_skb_any(lp->txF.skb);
  
-         lp->txF.skb = NULL;
-         lp->txF.port = 0;
-     }
+ 		lp->txF.skb = NULL;
+ 		lp->txF.port = 0;
+ 	}
+ 
+ 	return TRUE;
+ }				/* wl_send */
  
-     return TRUE;
- } // wl_send
  /*============================================================================*/
  
  /*******************************************************************************
@@@ -1695,70 -1715,71 +1715,71 @@@ void wl_wds_netif_carrier_off(struct wl
   *      1 on error
   *
   ******************************************************************************/
- int wl_send_dma( struct wl_private *lp, struct sk_buff *skb, int port )
+ int wl_send_dma(struct wl_private *lp, struct sk_buff *skb, int port)
  {
-     int         len;
-     DESC_STRCT *desc = NULL;
-     DESC_STRCT *desc_next = NULL;
+ 	int len;
+ 	DESC_STRCT *desc = NULL;
+ 	DESC_STRCT *desc_next = NULL;
      /*------------------------------------------------------------------------*/
  
-     if( lp == NULL ) {
-         DBG_ERROR( DbgInfo, "Private adapter struct is NULL\n" );
-         return FALSE;
-     }
+ 	if (lp == NULL) {
+ 		DBG_ERROR(DbgInfo, "Private adapter struct is NULL\n");
+ 		return FALSE;
+ 	}
  
-     if( lp->dev == NULL ) {
-         DBG_ERROR( DbgInfo, "net_device struct in wl_private is NULL\n" );
-         return FALSE;
-     }
+ 	if (lp->dev == NULL) {
+ 		DBG_ERROR(DbgInfo, "net_device struct in wl_private is NULL\n");
+ 		return FALSE;
+ 	}
  
-     /* AGAIN, ALL THE QUEUEING DONE HERE IN I/O MODE IS NOT PERFORMED */
+ 	/* AGAIN, ALL THE QUEUEING DONE HERE IN I/O MODE IS NOT PERFORMED */
  
-     if( skb == NULL ) {
-         DBG_WARNING (DbgInfo, "Nothing to send.\n");
-         return FALSE;
-     }
+ 	if (skb == NULL) {
+ 		DBG_WARNING(DbgInfo, "Nothing to send.\n");
+ 		return FALSE;
+ 	}
  
-     len = skb->len;
+ 	len = skb->len;
  
-     /* Get a free descriptor */
-     desc = wl_pci_dma_get_tx_packet( lp );
+ 	/* Get a free descriptor */
+ 	desc = wl_pci_dma_get_tx_packet(lp);
  
-     if( desc == NULL ) {
-         if( lp->netif_queue_on == TRUE ) {
-             netif_stop_queue( lp->dev );
-             WL_WDS_NETIF_STOP_QUEUE( lp );
-             lp->netif_queue_on = FALSE;
+ 	if (desc == NULL) {
+ 		if (lp->netif_queue_on == TRUE) {
+ 			netif_stop_queue(lp->dev);
+ 			WL_WDS_NETIF_STOP_QUEUE(lp);
+ 			lp->netif_queue_on = FALSE;
  
-             dev_kfree_skb_any( skb );
-             return 0;
-         }
-     }
 -			dev_kfree_skb(skb);
++			dev_kfree_skb_any(skb);
+ 			return 0;
+ 		}
+ 	}
+ 
+ 	SET_BUF_CNT(desc, /*HCF_DMA_FD_CNT */ HFS_ADDR_DEST);
+ 	SET_BUF_SIZE(desc, HCF_DMA_TX_BUF1_SIZE);
  
-     SET_BUF_CNT( desc, /*HCF_DMA_FD_CNT*/HFS_ADDR_DEST );
-     SET_BUF_SIZE( desc, HCF_DMA_TX_BUF1_SIZE );
+ 	desc_next = desc->next_desc_addr;
  
-     desc_next = desc->next_desc_addr;
+ 	if (desc_next->buf_addr == NULL) {
+ 		DBG_ERROR(DbgInfo, "DMA descriptor buf_addr is NULL\n");
+ 		return FALSE;
+ 	}
  
-     if( desc_next->buf_addr == NULL ) {
-         DBG_ERROR( DbgInfo, "DMA descriptor buf_addr is NULL\n" );
-         return FALSE;
-     }
+ 	/* Copy the payload into the DMA packet */
+ 	memcpy(desc_next->buf_addr, skb->data, len);
  
-     /* Copy the payload into the DMA packet */
-     memcpy( desc_next->buf_addr, skb->data, len );
+ 	SET_BUF_CNT(desc_next, len);
+ 	SET_BUF_SIZE(desc_next, HCF_MAX_PACKET_SIZE);
  
-     SET_BUF_CNT( desc_next, len );
-     SET_BUF_SIZE( desc_next, HCF_MAX_PACKET_SIZE );
+ 	hcf_dma_tx_put(&(lp->hcfCtx), desc, 0);
  
-     hcf_dma_tx_put( &( lp->hcfCtx ), desc, 0 );
+ 	/* Free the skb and perform queue cleanup, as the buffer was
+ 	   transmitted successfully */
 -	dev_kfree_skb(skb);
++	dev_consume_skb_any(skb);
  
-     /* Free the skb and perform queue cleanup, as the buffer was
-             transmitted successfully */
-     dev_consume_skb_any( skb );
+ 	return TRUE;
+ }				/* wl_send_dma */
  
-     return TRUE;
- } // wl_send_dma
  /*============================================================================*/
  
  /*******************************************************************************

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ