Netdev List
 help / color / mirror / Atom feed
* [PATCH 36/39] net/ipv4/tcp.c: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy, netdev,
	linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Coalesce long formats.
Align arguments.
Remove KERN_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/ipv4/tcp.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 1664a05..5f738c5 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1193,7 +1193,7 @@ void tcp_cleanup_rbuf(struct sock *sk, int copied)
 	struct sk_buff *skb = skb_peek(&sk->sk_receive_queue);
 
 	WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq),
-	     KERN_INFO "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n",
+	     "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n",
 	     tp->copied_seq, TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt);
 #endif
 
@@ -1477,10 +1477,9 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 			 * shouldn't happen.
 			 */
 			if (WARN(before(*seq, TCP_SKB_CB(skb)->seq),
-			     KERN_INFO "recvmsg bug: copied %X "
-				       "seq %X rcvnxt %X fl %X\n", *seq,
-				       TCP_SKB_CB(skb)->seq, tp->rcv_nxt,
-				       flags))
+				 "recvmsg bug: copied %X seq %X rcvnxt %X fl %X\n",
+				 *seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt,
+				 flags))
 				break;
 
 			offset = *seq - TCP_SKB_CB(skb)->seq;
@@ -1490,10 +1489,9 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 				goto found_ok_skb;
 			if (tcp_hdr(skb)->fin)
 				goto found_fin_ok;
-			WARN(!(flags & MSG_PEEK), KERN_INFO "recvmsg bug 2: "
-					"copied %X seq %X rcvnxt %X fl %X\n",
-					*seq, TCP_SKB_CB(skb)->seq,
-					tp->rcv_nxt, flags);
+			WARN(!(flags & MSG_PEEK),
+			     "recvmsg bug 2: copied %X seq %X rcvnxt %X fl %X\n",
+			     *seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt, flags);
 		}
 
 		/* Well, if we have backlog, try to process it now yet. */
-- 
1.7.3.1.g432b3.dirty


^ permalink raw reply related

* [PATCH 29/39] include/linux/device.h: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Macro argument neatening.

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/linux/device.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index dd48953..724d1fd 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -744,7 +744,7 @@ do {						     \
  * file/line information and a backtrace.
  */
 #define dev_WARN(dev, format, arg...) \
-	WARN(1, "Device: %s\n" format, dev_driver_string(dev), ## arg);
+	WARN(1, "Device: %s\n" format, dev_driver_string(dev), ##arg);
 
 /* Create alias, so I can be autoloaded. */
 #define MODULE_ALIAS_CHARDEV(major,minor) \
-- 
1.7.3.1.g432b3.dirty


^ permalink raw reply related

* [PATCH 18/39] drivers/net/wireless/iwlwifi: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Reinette Chatre, Wey-Yi Guy, Intel Linux Wireless,
	John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Align arguments.
Add missing newlines.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |    3 +--
 drivers/net/wireless/iwlwifi/iwl-agn-sta.c  |    6 +++---
 drivers/net/wireless/iwlwifi/iwl-tx.c       |    6 +++---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index b555edd..cbb63f3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -2139,8 +2139,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
 	case IEEE80211_SMPS_OFF:
 		return active_cnt;
 	default:
-		WARN(1, "invalid SMPS mode %d",
-		     priv->current_ht_config.smps);
+		WARN(1, "invalid SMPS mode %d\n", priv->current_ht_config.smps);
 		return active_cnt;
 	}
 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 35a30d2..46c45e7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -284,7 +284,7 @@ static int iwl_set_wep_dynamic_key_info(struct iwl_priv *priv,
 	 * in uCode. */
 
 	WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
-		"no space for a new key");
+	     "no space for a new key\n");
 
 	priv->stations[sta_id].sta.key.key_flags = key_flags;
 	priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
@@ -334,7 +334,7 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
 	 * in uCode. */
 
 	WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
-		"no space for a new key");
+	     "no space for a new key\n");
 
 	priv->stations[sta_id].sta.key.key_flags = key_flags;
 	priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
@@ -378,7 +378,7 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
 	 * in uCode. */
 
 	WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
-		"no space for a new key");
+	     "no space for a new key\n");
 
 	priv->stations[sta_id].sta.key.key_flags = key_flags;
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 7261ee4..1d8c4a6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -594,9 +594,9 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
 	 * in the queue management code. */
 	if (WARN(txq_id != priv->cmd_queue,
 		 "wrong command queue %d (should be %d), sequence 0x%X readp=%d writep=%d\n",
-		  txq_id, priv->cmd_queue, sequence,
-		  priv->txq[priv->cmd_queue].q.read_ptr,
-		  priv->txq[priv->cmd_queue].q.write_ptr)) {
+		 txq_id, priv->cmd_queue, sequence,
+		 priv->txq[priv->cmd_queue].q.read_ptr,
+		 priv->txq[priv->cmd_queue].q.write_ptr)) {
 		iwl_print_hex_error(priv, pkt, 32);
 		return;
 	}
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 8f8c4b7..c89c409 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -168,7 +168,7 @@ static int iwl3945_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
 	* in uCode. */
 
 	WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
-		"no space for a new key");
+	     "no space for a new key\n");
 
 	priv->stations[sta_id].sta.key.key_flags = key_flags;
 	priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
-- 
1.7.3.1.g432b3.dirty


^ permalink raw reply related

* [PATCH 37/39] net/mac80211: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: John W. Linville, Johannes Berg, David S. Miller,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <cover.1288471897.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>

Coalesce long formats.
Add missing newlines.

Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
---
 net/mac80211/agg-tx.c |    5 +++--
 net/mac80211/iface.c  |    4 ++--
 net/mac80211/mlme.c   |    2 +-
 net/mac80211/rx.c     |    4 +---
 net/mac80211/tx.c     |    4 +---
 net/mac80211/util.c   |    4 +---
 net/mac80211/work.c   |    4 ++--
 7 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index d4679b2..9f2c3f6 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -454,8 +454,9 @@ ieee80211_agg_splice_packets(struct ieee80211_local *local,
 
 	ieee80211_stop_queue_agg(local, tid);
 
-	if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
-			  " from the pending queue\n", tid))
+	if (WARN(!tid_tx,
+		 "TID %d gone but expected when splicing aggregates from the pending queue\n",
+		 tid))
 		return;
 
 	if (!skb_queue_empty(&tid_tx->pending)) {
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index f9163b1..328e637 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -820,7 +820,7 @@ static void ieee80211_iface_work(struct work_struct *work)
 			ieee80211_mesh_rx_queued_mgmt(sdata, skb);
 			break;
 		default:
-			WARN(1, "frame for unexpected interface type");
+			WARN(1, "frame for unexpected interface type\n");
 			break;
 		}
 
@@ -979,7 +979,7 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
 	ieee80211_setup_sdata(sdata, type);
 
 	err = ieee80211_do_open(sdata->dev, false);
-	WARN(err, "type change: do_open returned %d", err);
+	WARN(err, "type change: do_open returned %d\n", err);
 
 	return ret;
 }
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index a3a9421..22f054a 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1780,7 +1780,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
 			cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
 			break;
 		default:
-			WARN(1, "unexpected: %d", rma);
+			WARN(1, "unexpected: %d\n", rma);
 		}
 		return;
 	}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 902b03e..7775375 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2840,9 +2840,7 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
 			 */
 			if (WARN((status->rate_idx < 0 ||
 				 status->rate_idx > 76),
-				 "Rate marked as an HT rate but passed "
-				 "status->rate_idx is not "
-				 "an MCS index [0-76]: %d (0x%02x)\n",
+				 "Rate marked as an HT rate but passed status->rate_idx is not an MCS index [0-76]: %d (0x%02x)\n",
 				 status->rate_idx,
 				 status->rate_idx))
 				goto drop;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 96c5943..a511d69 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -649,9 +649,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
 	if (WARN(test_bit(SCAN_SW_SCANNING, &tx->local->scanning) &&
 		 (sta_flags & WLAN_STA_ASSOC) &&
 		 !rate_usable_index_exists(sband, &tx->sta->sta),
-		 "%s: Dropped data frame as no usable bitrate found while "
-		 "scanning and associated. Target station: "
-		 "%pM on %d GHz band\n",
+		 "%s: Dropped data frame as no usable bitrate found while scanning and associated. Target station: %pM on %d GHz band\n",
 		 tx->sdata->name, hdr->addr1,
 		 tx->channel->band ? 5 : 2))
 		return TX_DROP;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 0b6fc92..2a14723 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1120,9 +1120,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 		 */
 		res = drv_start(local);
 		if (res) {
-			WARN(local->suspended, "Hardware became unavailable "
-			     "upon resume. This could be a software issue "
-			     "prior to suspend or a hardware issue.\n");
+			WARN(local->suspended, "Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.\n");
 			return res;
 		}
 
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index ae344d1..8583206 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -830,7 +830,7 @@ static void ieee80211_work_rx_queued_mgmt(struct ieee80211_local *local,
 		list_del_rcu(&wk->list);
 		break;
 	default:
-		WARN(1, "unexpected: %d", rma);
+		WARN(1, "unexpected: %d\n", rma);
 	}
 
 	mutex_unlock(&local->mtx);
@@ -973,7 +973,7 @@ static void ieee80211_work_work(struct work_struct *work)
 			list_add(&wk->list, &free_work);
 			break;
 		default:
-			WARN(1, "unexpected: %d", rma);
+			WARN(1, "unexpected: %d\n", rma);
 		}
 	}
 
-- 
1.7.3.1.g432b3.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 35/39] net/core/dev.c: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: David S. Miller, netdev, linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Coalesce long formats.
Add missing newlines.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/core/dev.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 35dfb83..0f79b89 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1817,8 +1817,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
 		if (dev && dev->ethtool_ops && dev->ethtool_ops->get_drvinfo)
 			dev->ethtool_ops->get_drvinfo(dev, &info);
 
-		WARN(1, "%s: caps=(0x%lx, 0x%lx) len=%d data_len=%d "
-			"ip_summed=%d",
+		WARN(1, "%s: caps=(0x%lx, 0x%lx) len=%d data_len=%d ip_summed=%d\n",
 		     info.driver, dev ? dev->features : 0L,
 		     skb->sk ? skb->sk->sk_route_caps : 0L,
 		     skb->len, skb->data_len, skb->ip_summed);
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 17/39] drivers/net/usb: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Greg Kroah-Hartman, linux-usb, netdev, linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Add missing newlines.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/usb/ipheth.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
index b2bcf99..7d42f9a 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -363,7 +363,7 @@ static int ipheth_tx(struct sk_buff *skb, struct net_device *net)
 
 	/* Paranoid */
 	if (skb->len > IPHETH_BUF_SIZE) {
-		WARN(1, "%s: skb too large: %d bytes", __func__, skb->len);
+		WARN(1, "%s: skb too large: %d bytes\n", __func__, skb->len);
 		dev->net->stats.tx_dropped++;
 		dev_kfree_skb_irq(skb);
 		return NETDEV_TX_OK;
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 16/39] drivers/net/can: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Wolfgang Grandegger, socketcan-core, netdev, linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Add missing newlines.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/can/mscan/mscan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c
index 64c378c..74cd880 100644
--- a/drivers/net/can/mscan/mscan.c
+++ b/drivers/net/can/mscan/mscan.c
@@ -182,7 +182,7 @@ static int mscan_restart(struct net_device *dev)
 
 		priv->can.state = CAN_STATE_ERROR_ACTIVE;
 		WARN(!(in_8(&regs->canmisc) & MSCAN_BOHOLD),
-		     "bus-off state expected");
+		     "bus-off state expected\n");
 		out_8(&regs->canmisc, MSCAN_BOHOLD);
 		/* Re-enable receive interrupts. */
 		out_8(&regs->canrier, MSCAN_RX_INTS_ENABLE);
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 00/39] Cleanup WARN #defines
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-alpha, linux-kernel, linux-arm-kernel, linux-omap,
	linux-tegra, linuxppc-dev, linux-pm, discuss, linux-acpi,
	linux1394-devel, dri-devel, intel-gfx, linux-media,
	socketcan-core, netdev, linux-usb, linux-wireless, devel,
	linux-scsi, devel, linux-fbdev, linux-fsdevel, linux-nfs,
	linux-arch, linux-mm, alsa-devel

WARN uses sometimes use KERN_<level> but mostly don't
have any prefix.

Change the WARN macros and the warn_slowpath function to preface
KERN_WARNING and remove all the KERN_<level> uses from WARN sites.

Neatening clean up of include/asm-generic/bug.h

Update WARN macros
Add KERN_WARNING to WARN output
Remove any KERN_<level> from WARN uses
Coalesce formats
Align WARN arguments
Add some missing newlines to WARN uses
Add some missing first test argument (1, fmt, args) to WARN uses

Joe Perches (39):
  include/asm-generic/bug.h: Update WARN macros
  arch/alpha: Update WARN uses
  arch/arm: Update WARN uses
  arch/powerpc: Update WARN uses
  arch/x86: Update WARN uses
  drivers/acpi: Update WARN uses
  drivers/base: Update WARN uses
  drivers/block: Update WARN uses
  drivers/cpuidle: Update WARN uses
  drivers/firewire: Update WARN uses
  drivers/firmware: Update WARN uses
  drivers/gpio: Update WARN uses
  drivers/gpu/drm: Update WARN uses
  drivers/media/video: Update WARN uses
  drivers/mfd: Update WARN uses
  drivers/net/can: Update WARN uses
  drivers/net/usb: Update WARN uses
  drivers/net/wireless/iwlwifi: Update WARN uses
  drivers/regulator: Update WARN uses
  drivers/scsi/fcoe: Update WARN uses
  drivers/staging: Update WARN uses
  drivers/usb/musb: Update WARN uses
  drivers/video/omap2/dss: Update WARN uses
  fs/nfsd: Update WARN uses
  fs/notify/inotify: Update WARN uses
  fs/sysfs: Update WARN uses
  fs/proc: Update WARN uses
  fs: Update WARN uses
  include/linux/device.h: Update WARN uses
  kernel/irq: Update WARN uses
  kernel/panic.c: Update warn_slowpath to use %pV
  kernel: Update WARN uses
  lib: Update WARN uses
  mm: Update WARN uses
  net/core/dev.c: Update WARN uses
  net/ipv4/tcp.c: Update WARN uses
  net/mac80211: Update WARN uses
  net/rfkill/input.c: Update WARN uses
  sound/soc/codecs/wm_hubs.c: Update WARN uses

 arch/alpha/kernel/pci-sysfs.c                |   14 ++--
 arch/arm/mach-davinci/clock.c                |    4 +-
 arch/arm/mach-davinci/da830.c                |    2 +-
 arch/arm/mach-davinci/da850.c                |   12 ++--
 arch/arm/mach-omap2/clkt_clksel.c            |   12 ++--
 arch/arm/mach-omap2/clock.c                  |   16 ++--
 arch/arm/mach-omap2/devices.c                |    4 +-
 arch/arm/mach-omap2/omap_hwmod.c             |   47 +++++++-----
 arch/arm/mach-omap2/pm34xx.c                 |    7 +-
 arch/arm/mach-omap2/serial.c                 |    2 +-
 arch/arm/mach-omap2/timer-gp.c               |    3 +-
 arch/arm/mach-tegra/clock.c                  |    3 +-
 arch/arm/mach-tegra/timer.c                  |    2 +-
 arch/arm/mach-u300/padmux.c                  |   14 +---
 arch/arm/plat-omap/omap-pm-noop.c            |   10 ++--
 arch/powerpc/kernel/hw_breakpoint.c          |    4 +-
 arch/x86/kernel/acpi/boot.c                  |    2 +-
 arch/x86/kernel/apic/apic.c                  |    2 +-
 arch/x86/kernel/apic/es7000_32.c             |    2 +-
 arch/x86/kernel/cpu/perf_event.c             |    4 +-
 arch/x86/kernel/pci-calgary_64.c             |    4 +-
 arch/x86/kernel/tsc_sync.c                   |    4 +-
 arch/x86/kernel/xsave.c                      |    2 +-
 arch/x86/mm/ioremap.c                        |    5 +-
 arch/x86/mm/pageattr-test.c                  |    2 +-
 arch/x86/mm/pageattr.c                       |    5 +-
 arch/x86/platform/sfi/sfi.c                  |    4 +-
 drivers/acpi/ec.c                            |    4 +-
 drivers/base/class.c                         |    4 +-
 drivers/base/core.c                          |    5 +-
 drivers/base/memory.c                        |    4 +-
 drivers/base/sys.c                           |   10 +--
 drivers/block/floppy.c                       |    2 +-
 drivers/cpuidle/driver.c                     |    2 +-
 drivers/firewire/core-transaction.c          |    6 +-
 drivers/firmware/dmi_scan.c                  |    2 +-
 drivers/gpio/gpiolib.c                       |    4 +-
 drivers/gpio/it8761e_gpio.c                  |    2 +-
 drivers/gpu/drm/drm_crtc_helper.c            |    2 +-
 drivers/gpu/drm/i915/i915_gem.c              |    3 +-
 drivers/gpu/drm/radeon/evergreen.c           |    2 +-
 drivers/gpu/drm/radeon/r100.c                |    4 +-
 drivers/gpu/drm/radeon/r300.c                |    2 +-
 drivers/gpu/drm/radeon/r600.c                |    4 +-
 drivers/gpu/drm/radeon/radeon_fence.c        |    3 +-
 drivers/gpu/drm/radeon/radeon_ttm.c          |    3 +-
 drivers/gpu/drm/radeon/rs400.c               |    2 +-
 drivers/gpu/drm/radeon/rs600.c               |    4 +-
 drivers/media/video/s5p-fimc/fimc-core.c     |    2 +-
 drivers/media/video/sr030pc30.c              |    2 +-
 drivers/mfd/ezx-pcap.c                       |    5 +-
 drivers/net/can/mscan/mscan.c                |    2 +-
 drivers/net/usb/ipheth.c                     |    2 +-
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c   |    3 +-
 drivers/net/wireless/iwlwifi/iwl-agn-sta.c   |    6 +-
 drivers/net/wireless/iwlwifi/iwl-tx.c        |    6 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c  |    2 +-
 drivers/regulator/core.c                     |    3 +-
 drivers/scsi/fcoe/libfcoe.c                  |    2 +-
 drivers/staging/memrar/memrar_allocator.c    |    2 +-
 drivers/staging/solo6x10/solo6010-v4l2-enc.c |    2 +-
 drivers/usb/musb/musb_host.c                 |    6 +-
 drivers/video/omap2/dss/core.c               |    3 +-
 fs/bio.c                                     |    2 +-
 fs/buffer.c                                  |    2 +-
 fs/nfsd/nfs4state.c                          |    3 +-
 fs/notify/inotify/inotify_fsnotify.c         |    4 +-
 fs/proc/generic.c                            |    9 +--
 fs/super.c                                   |    5 +-
 fs/sysfs/dir.c                               |    3 +-
 fs/sysfs/file.c                              |    4 +-
 fs/sysfs/group.c                             |    4 +-
 fs/sysfs/symlink.c                           |   10 +--
 include/asm-generic/bug.h                    |  101 ++++++++++++++++----------
 include/linux/device.h                       |    2 +-
 kernel/irq/chip.c                            |    2 +-
 kernel/irq/manage.c                          |    2 +-
 kernel/notifier.c                            |    2 +-
 kernel/panic.c                               |   40 +++++------
 kernel/pm_qos_params.c                       |    6 +-
 lib/debugobjects.c                           |   21 +++---
 lib/iomap.c                                  |    2 +-
 lib/kobject.c                                |    9 +--
 lib/kobject_uevent.c                         |    4 +-
 lib/list_debug.c                             |   24 +++----
 lib/plist.c                                  |   12 ++--
 mm/percpu.c                                  |    4 +-
 mm/vmalloc.c                                 |    5 +-
 net/core/dev.c                               |    3 +-
 net/ipv4/tcp.c                               |   16 ++---
 net/mac80211/agg-tx.c                        |    5 +-
 net/mac80211/iface.c                         |    4 +-
 net/mac80211/mlme.c                          |    2 +-
 net/mac80211/rx.c                            |    4 +-
 net/mac80211/tx.c                            |    4 +-
 net/mac80211/util.c                          |    4 +-
 net/mac80211/work.c                          |    4 +-
 net/rfkill/input.c                           |    5 +-
 sound/soc/codecs/wm_hubs.c                   |    2 +-
 99 files changed, 319 insertions(+), 330 deletions(-)

-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply

* Re: [PATCH] macvlan: Introduce 'passthru' mode to takeover the underlying device
From: Sridhar Samudrala @ 2010-10-30 20:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Patrick McHardy, Stephen Hemminger, Michael S. Tsirkin, netdev,
	kvm@vger.kernel.org
In-Reply-To: <201010291545.17910.arnd@arndb.de>

On 10/29/2010 6:45 AM, Arnd Bergmann wrote:
> On Friday 29 October 2010, Sridhar Samudrala wrote:
>> With the current default 'vepa' mode, a KVM guest using virtio with
>> macvtap backend has the following limitations.
>> - cannot change/add a mac address on the guest virtio-net
> I believe this could be changed if there is a neeed, but I actually
> consider it one of the design points of macvlan that the guest
> is not able to change the mac address. With 802.1Qbg you rely on
> the switch being able to identify the guest by its MAC address,
> which the host kernel must ensure.
>
Currently the host cannot prevent a guest user from trying to change/add 
a mac address
on the guest virtio-net. From guest point of view, the request succeeds, 
but the incoming packets
are dropped siliently by the host interface.

>> - cannot create a vlan device on the guest virtio-net
> Why not? If this doesn't work, it's probably a bug!
Because the host is not aware of the guest vlan tag and the host 
external interface will filter out
incoming vlan tagged packets.

> Why does the passthru mode enable it if it doesn't work
> already?
>
passthru mode puts the host external interface in promiscuous mode which 
allows vlan tagged
packets to be received.

Even in tap/bridge mode, this works because adding an external interface 
to the bridge causes it to be
put in promiscuous mode.

Thanks
Sridhar


^ permalink raw reply

* Re: [RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation
From: Michael S. Tsirkin @ 2010-10-30 20:06 UTC (permalink / raw)
  To: Shirley Ma; +Cc: David Miller, netdev, kvm, linux-kernel
In-Reply-To: <1288366988.4110.5.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 2192 bytes --]

On Fri, Oct 29, 2010 at 08:43:08AM -0700, Shirley Ma wrote:
> On Fri, 2010-10-29 at 10:10 +0200, Michael S. Tsirkin wrote:
> > Hmm. I don't yet understand. We are still doing copies into the per-vq
> > buffer, and the data copied is really small.  Is it about cache line
> > bounces?  Could you try figuring it out?
> 
> per-vq buffer is much less expensive than 3 put_copy() call. I will
> collect the profiling data to show that.

What about __put_user? Maybe the access checks are the ones
that add the cost here? I attach patches to strip access checks:
they are not needed as we do them on setup time already, anyway.
Can you try them out and see if performance is improved for you please?
On top of this, we will need to add some scheme to accumulate signals,
but that is a separate issue.

> > > > 2. How about flushing out queued stuff before we exit
> > > >    the handle_tx loop? That would address most of
> > > >    the spec issue. 
> > > 
> > > The performance is almost as same as the previous patch. I will
> > resubmit
> > > the modified one, adding vhost_add_used_and_signal_n after handle_tx
> > > loop for processing pending queue.
> > > 
> > > This patch was a part of modified macvtap zero copy which I haven't
> > > submitted yet. I found this helped vhost TX in general. This pending
> > > queue will be used by DMA done later, so I put it in vq instead of a
> > > local variable in handle_tx.
> > > 
> > > Thanks
> > > Shirley
> > 
> > BTW why do we need another array? Isn't heads field exactly what we
> > need
> > here?
> 
> head field is only for up to 32, the more used buffers add and signal
> accumulated the better performance is from test results.

I think we should separate the used update and signalling.  Interrupts
are expensive so I can believe accumulating even up to 100 of them
helps. But used head copies are already prety cheap. If we cut the
overhead by x32, that should make them almost free?

> That's was one
> of the reason I didn't use heads. The other reason was I used these
> buffer for pending dma done in mavctap zero copy patch. It could be up
> to vq->num in worse case.

We can always increase that, not an issue.

> Thanks
> Shirley

[-- Attachment #2: 1 --]
[-- Type: text/plain, Size: 809 bytes --]

commit f983547ed65a90c73b3e5eeee707041cc04acb0e
Author: Michael S. Tsirkin <mst@redhat.com>
Date:   Tue Sep 21 14:18:01 2010 +0200

    vhost: copy_to_user -> __copy_to_user
    
    We do access_ok checks at setup time, so we don't need to
    redo them on each access.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 54ba561..5109bc0 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1245,7 +1245,7 @@ static int __vhost_add_used_n(struct vhost_virtqueue *vq,
 
 	start = vq->last_used_idx % vq->num;
 	used = vq->used->ring + start;
-	if (copy_to_user(used, heads, count * sizeof *used)) {
+	if (__copy_to_user(used, heads, count * sizeof *used)) {
 		vq_err(vq, "Failed to write used");
 		return -EFAULT;
 	}

[-- Attachment #3: 2 --]
[-- Type: text/plain, Size: 2889 bytes --]

commit 85337783cb9487246ed067592e50a5ee800e2683
Author: Michael S. Tsirkin <mst@redhat.com>
Date:   Sun Sep 19 15:56:30 2010 +0200

    vhost: get/put_user -> __get/__put_user
    
    We do access_ok checks on all ring values on an ioctl,
    so we don't need to redo them on each access.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 3440197..54ba561 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1082,7 +1082,7 @@ int vhost_get_vq_desc(struct vhost_dev *dev, struct vhost_virtqueue *vq,
 
 	/* Check it isn't doing very strange things with descriptor numbers. */
 	last_avail_idx = vq->last_avail_idx;
-	if (unlikely(get_user(vq->avail_idx, &vq->avail->idx))) {
+	if (unlikely(__get_user(vq->avail_idx, &vq->avail->idx))) {
 		vq_err(vq, "Failed to access avail idx at %p\n",
 		       &vq->avail->idx);
 		return -EFAULT;
@@ -1103,8 +1103,8 @@ int vhost_get_vq_desc(struct vhost_dev *dev, struct vhost_virtqueue *vq,
 
 	/* Grab the next descriptor number they're advertising, and increment
 	 * the index we've seen. */
-	if (unlikely(get_user(head,
-			      &vq->avail->ring[last_avail_idx % vq->num]))) {
+	if (unlikely(__get_user(head,
+				&vq->avail->ring[last_avail_idx % vq->num]))) {
 		vq_err(vq, "Failed to read head: idx %d address %p\n",
 		       last_avail_idx,
 		       &vq->avail->ring[last_avail_idx % vq->num]);
@@ -1203,17 +1203,17 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)
 	/* The virtqueue contains a ring of used buffers.  Get a pointer to the
 	 * next entry in that used ring. */
 	used = &vq->used->ring[vq->last_used_idx % vq->num];
-	if (put_user(head, &used->id)) {
+	if (__put_user(head, &used->id)) {
 		vq_err(vq, "Failed to write used id");
 		return -EFAULT;
 	}
-	if (put_user(len, &used->len)) {
+	if (__put_user(len, &used->len)) {
 		vq_err(vq, "Failed to write used len");
 		return -EFAULT;
 	}
 	/* Make sure buffer is written before we update index. */
 	smp_wmb();
-	if (put_user(vq->last_used_idx + 1, &vq->used->idx)) {
+	if (__put_user(vq->last_used_idx + 1, &vq->used->idx)) {
 		vq_err(vq, "Failed to increment used idx");
 		return -EFAULT;
 	}
@@ -1306,7 +1306,7 @@ void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq)
 	 * interrupts. */
 	smp_mb();
 
-	if (get_user(flags, &vq->avail->flags)) {
+	if (__get_user(flags, &vq->avail->flags)) {
 		vq_err(vq, "Failed to get flags");
 		return;
 	}
@@ -1357,7 +1357,7 @@ bool vhost_enable_notify(struct vhost_virtqueue *vq)
 	/* They could have slipped one in as we were doing that: make
 	 * sure it's written, then check again. */
 	smp_mb();
-	r = get_user(avail_idx, &vq->avail->idx);
+	r = __get_user(avail_idx, &vq->avail->idx);
 	if (r) {
 		vq_err(vq, "Failed to check avail idx at %p: %d\n",
 		       &vq->avail->idx, r);

^ permalink raw reply related

* Re: NULL pointer dereference at netxen_nic_probe+0x813/0x9a0
From: Denis Kirjanov @ 2010-10-30 19:56 UTC (permalink / raw)
  To: David Miller; +Cc: bjorn.helgaas, amit.salecha, netdev, linux-kernel
In-Reply-To: <20101029.125403.71123384.davem@davemloft.net>

On 10/29/2010 11:54 PM, David Miller wrote:
> From: Denis Kirjanov <dkirjanov@kernel.org>
> Date: Fri, 29 Oct 2010 23:47:22 +0400
> 
>>> This is on current Linus upstream as of this morning (8128057)
>>> on an HP DL785:
>>>
>>> QLogic/NetXen Network Driver v4.0.74
>>> netxen_nic 0000:07:00.0: PCI INT A -> GSI 30 (level, low) -> IRQ 30
>>> netxen_nic 0000:07:00.0: setting latency timer to 64
>>> netxen_nic 0000:07:00.0: 2MB memory map
>>> netxen_nic 0000:07:00.0: loading firmware from flash
>>> netxen_nic 0000:07:00.0: using 64-bit dma mask
>>> kernel: Quad Gig LP Board S/N TI9ABK0266  Chip rev 0x42
>>> netxen_nic 0000:07:00.0: firmware v4.0.520 [legacy]
>>> netxen_nic 0000:07:00.0: irq 72 for MSI/MSI-X
>>> netxen_nic 0000:07:00.0: irq 73 for MSI/MSI-X
>>> netxen_nic 0000:07:00.0: irq 74 for MSI/MSI-X
>>> netxen_nic 0000:07:00.0: irq 75 for MSI/MSI-X
>>> netxen_nic 0000:07:00.0: using msi-x interrupts
>>> BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
>>> IP: [<ffffffff8160afda>] netxen_nic_probe+0x813/0x9a0
>>> PGD 0
>>> Oops: 0002 [#1] SMP
>>> last sysfs file:
>>> CPU 0
>>> Modules linked in:
>>>
>>> Pid: 1650, comm: work_for_cpu Not tainted 2.6.36-07338-g8128057 #269
>>> /ProLiant DL785 G5
>>> RIP: 0010:[<ffffffff8160afda>]  [<ffffffff8160afda>]
>>> netxen_nic_probe+0x813/0x9a0
>>> RSP: 0018:ffff8806138abe30  EFLAGS: 00010246
>>> RAX: 0000000000000010 RBX: ffff8806139126c0 RCX: 0000000000000000
>>> RDX: 0000000000000000 RSI: ffff880613895616 RDI: ffff880613912000
>>> RBP: ffff8806138abe90 R08: 0000000000000000 R09: ffff8806138abb80
>>> R10: 0000000000000000 R11: 0000000000000000 R12: ffff880613912000
>>> R13: ffff8812174f7000 R14: ffff880613912000 R15: ffff8812174f7000
>>> FS:  0000000000000000(0000) GS:ffff8800cfa00000(0000) knlGS:0000000000000000
>>> CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> CR2: 0000000000000010 CR3: 0000000001c07000 CR4: 00000000000006f0
>>> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
>>> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
>>> Process work_for_cpu (pid: 1650, threadinfo ffff8806138aa000, task
>>> ffff880616f12be0)
>>> Stack:
>>>  ffff8812174f7090 0000000000000246 ffff8806138abe90 ffff8812174f7000
>>>  00008806138abfd8 0000000000000282 68cd0025b30068cc ffff880c17439d30
>>>  ffff8812174f7090 ffff8812174f7000 ffff8812174f7208 0000000000000000
>>> Call Trace:
>>>  [<ffffffff81203696>] local_pci_probe+0x48/0x91
>>>  [<ffffffff81052bae>] ? do_work_for_cpu+0x0/0x26
>>>  [<ffffffff81052bc1>] do_work_for_cpu+0x13/0x26
>>>  [<ffffffff81052bae>] ? do_work_for_cpu+0x0/0x26
>>>  [<ffffffff81057a7b>] kthread+0x81/0x89
>>>  [<ffffffff81003854>] kernel_thread_helper+0x4/0x10
>>>  [<ffffffff810579fa>] ? kthread+0x0/0x89
>>>  [<ffffffff81003850>] ? kernel_thread_helper+0x0/0x10
>>> Code: 00 eb 15 49 8d bf 90 00 00 00 48 c7 c6 1b 2e aa 81 31 c0 e8 c0
>>> 4e cd ff 4c 89 f7 e8 d6 bb ee ff 49 8b 96 00 03 00 00 48 8d 42 10 <f0>
>>> 80 4a 10 01 4c 89 f7 e8 a3 7e ed ff 85 c0 41 89 c4 74 2a 49
>>> RIP  [<ffffffff8160afda>] netxen_nic_probe+0x813/0x9a0
>>>  RSP <ffff8806138abe30>
>>> CR2: 0000000000000010
>>> ---[ end trace 059c7071bbf8de1f ]---
>> Could you please try the following patch.  
> 
> Why do you need to touch the queue state at all in the probing code?
> 
> Until the first ->open() occurs, the queue state is "don't care."
> 
> The netif_carrier_off() call is fine.
> 
Ok, thanks Dave, now I see.

[PATCH] netxen_nic: Fix the tx queue manipulation bug in netxen_nic_probe

We should not stop the egress queue during probe because it is wrong.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
---
 drivers/net/netxen/netxen_nic_main.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 50820be..bc156b0 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1240,7 +1240,6 @@ netxen_setup_netdev(struct netxen_adapter *adapter,
 		dev_warn(&pdev->dev, "failed to read mac addr\n");
 
 	netif_carrier_off(netdev);
-	netif_stop_queue(netdev);
 
 	err = register_netdev(netdev);
 	if (err) {
-- 
1.7.0

^ permalink raw reply related

* Re: [PATCH] net: core: scm: fix information leak to userland
From: David Miller @ 2010-10-30 19:12 UTC (permalink / raw)
  To: segooon
  Cc: kernel-janitors, ebiederm, eric.dumazet, tj, serge, netdev,
	linux-kernel
In-Reply-To: <1288448796-6147-1-git-send-email-segooon@gmail.com>


Your patches are almost entirely baseless.

You haven't even made an effort to show a real case, in detail,
where your patches actually fix a bug.  The CMSG case shows
that you didn't even bother to look at the assembly of even
one architecture to see if padding bytes even existed in the
structure, and that furthermore even if they existed that they
would leak out ever.

I don't even buy the "preventative nature" argument for the
address[128] thing.  If a protocol is leaking kernel memory in that
case, it also isn't filling in the address value properly, which is a
bug times two.

I absolutely am not applying these patches, sorry.

^ permalink raw reply

* [PATCH 2/2] igb: Don't depend on vlan group for receive size.
From: Jesse Gross @ 2010-10-30 18:49 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Jeff Kirsher, Jesse Brandeburg, PJ Waskiewicz
In-Reply-To: <1288464591-31528-1-git-send-email-jesse@nicira.com>

The igb driver currently sets its maximum receive size based on
whether a vlan group is configured.  However, this causes it to
completely drop MTU sized vlan packets when there is no vlan
group, preventing them from showing up in tcpdump, etc.

Signed-off-by: Jesse Gross <jesse@nicira.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
---
 drivers/net/igb/igb_main.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 892d196..5d1c13c 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2830,13 +2830,10 @@ static inline int igb_set_vf_rlpml(struct igb_adapter *adapter, int size,
  **/
 static void igb_rlpml_set(struct igb_adapter *adapter)
 {
-	u32 max_frame_size = adapter->max_frame_size;
+	u32 max_frame_size = adapter->max_frame_size + VLAN_TAG_SIZE;
 	struct e1000_hw *hw = &adapter->hw;
 	u16 pf_id = adapter->vfs_allocated_count;
 
-	if (adapter->vlgrp)
-		max_frame_size += VLAN_TAG_SIZE;
-
 	/* if vfs are enabled we set RLPML to the largest possible request
 	 * size and set the VMOLR RLPML to the size we need */
 	if (pf_id) {
-- 
1.7.1


^ permalink raw reply related

* [PATCH 1/2] ixgb: Don't check for vlan group on transmit.
From: Jesse Gross @ 2010-10-30 18:49 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Jeff Kirsher, Jesse Brandeburg, PJ Waskiewicz

On transmit, the ixgb driver will only use vlan acceleration if a
vlan group is configured.  This can lead to tags getting dropped
when bridging because the networking core assumes that a driver
that claims vlan acceleration support can do it at all times.  This
change should have been part of commit eab6d18d "vlan: Don't check for
vlan group before vlan_tx_tag_present." but was missed.

Signed-off-by: Jesse Gross <jesse@nicira.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
---
 drivers/net/ixgb/ixgb_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index caa8192..d18194e 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1498,7 +1498,7 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
                      DESC_NEEDED)))
 		return NETDEV_TX_BUSY;
 
-	if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
+	if (vlan_tx_tag_present(skb)) {
 		tx_flags |= IXGB_TX_FLAGS_VLAN;
 		vlan_id = vlan_tx_tag_get(skb);
 	}
-- 
1.7.1


^ permalink raw reply related

* Re: [PATCH 1/2] IPv6: conntrack: Use protocol-related initialization routine to initial queues of IPv6 connection track
From: Pascal Hambourg @ 2010-10-30 18:41 UTC (permalink / raw)
  To: David Miller; +Cc: kaber, shanwei, yasuyuki.kozakai, netfilter-devel, netdev
In-Reply-To: <20100126.051147.256313206.davem@davemloft.net>

Hello,

David Miller a écrit :
> 
> Anyways, meanwhile I'll apply the fix.  And yes I know it needs
> to go to stable too... :-)

It appears that the patch "ipv6: reassembly: use seperate reassembly
queues for conntrack and local delivery" went to both the 2.6.32 and
2.6.27 stable branches, but the fix from Shan Wei went to the 2.6.32
branch only, not to the 2.6.27 branch. However I checked that it applies
 on the latest 2.6.27 release, and fixes the problem.

Could someone submit it for the next 2.6.27 stable release ? Or if I
have to do it, what is the process ?
Thanks.

^ permalink raw reply

* Re: [PATCH] af_unix: optimize unix_dgram_poll()
From: Davide Libenzi @ 2010-10-30 17:45 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Davide Libenzi, Alban Crequy, David S. Miller, Stephen Hemminger,
	Cyrill Gorcunov, Alexey Dobriyan, netdev,
	Linux Kernel Mailing List, Pauli Nieminen, Rainer Weikusat
In-Reply-To: <1288432420.2680.933.camel@edumazet-laptop>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 740 bytes --]

On Sat, 30 Oct 2010, Eric Dumazet wrote:

> Le vendredi 29 octobre 2010 à 13:46 -0700, Davide Libenzi a écrit :
> 
> > Also, why not using the existing wait->key instead of adding a poll2()?
> 
> Indeed, if wait is not null, we have in wait->key the interest of
> poller. If a particular poll() function is expensive, it can test these
> bits.
> 
> Thanks !
> 
> Note: I chose the 'goto skip_write' to make this patch really obvious.

Plain agreement on th patch, and I understand the indent overflow 
concerns, but why not ...

	/*
	 * No write status requested, avoid expensive OUT tests.
	 */
	if (wait && !(wait->key & (POLLWRBAND | POLLWRNORM | POLLOUT)))
		return mask

The write-test code is the last one we do anyway.


- Davide


^ permalink raw reply

* @ms_world you won!
From: (ms-world) @ 2010-10-30 18:07 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: YOU HAVE WON A PRIZE.doc --]
[-- Type: application/msword, Size: 196096 bytes --]

^ permalink raw reply

* Re: [PATCH] macvlan: Introduce 'passthru' mode to takeover the underlying device
From: Michael S. Tsirkin @ 2010-10-30 17:03 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Sridhar Samudrala, Patrick McHardy, Stephen Hemminger, netdev,
	kvm@vger.kernel.org
In-Reply-To: <201010291545.17910.arnd@arndb.de>

On Fri, Oct 29, 2010 at 03:45:17PM +0200, Arnd Bergmann wrote:
> On Friday 29 October 2010, Sridhar Samudrala wrote:
> > With the current default 'vepa' mode, a KVM guest using virtio with 
> > macvtap backend has the following limitations.
> > - cannot change/add a mac address on the guest virtio-net
> 
> I believe this could be changed if there is a neeed, but I actually
> consider it one of the design points of macvlan that the guest
> is not able to change the mac address.

It's a policy question that we should not set at the kernel level.

> With 802.1Qbg you rely on
> the switch being able to identify the guest by its MAC address,
> which the host kernel must ensure.

This is required to be able to get feature parity with
both tun and device assignment. At the moment, changing
the mac when using macvtap silently breaks guest networking.

-- 
MST

^ permalink raw reply

* Re: [PATCH] macvlan: Introduce 'passthru' mode to takeover the underlying device
From: Michael S. Tsirkin @ 2010-10-30 16:57 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Sridhar Samudrala, Patrick McHardy, Stephen Hemminger, netdev,
	kvm@vger.kernel.org
In-Reply-To: <201010291545.17910.arnd@arndb.de>

On Fri, Oct 29, 2010 at 03:45:17PM +0200, Arnd Bergmann wrote:
> On Friday 29 October 2010, Sridhar Samudrala wrote:
> > With the current default 'vepa' mode, a KVM guest using virtio with 
> > macvtap backend has the following limitations.
> > - cannot change/add a mac address on the guest virtio-net
> 
> I believe this could be changed if there is a neeed, but I actually
> consider it one of the design points of macvlan that the guest
> is not able to change the mac address. With 802.1Qbg you rely on
> the switch being able to identify the guest by its MAC address,
> which the host kernel must ensure.
> 
> > - cannot create a vlan device on the guest virtio-net
> 
> Why not? If this doesn't work, it's probably a bug!
> Why does the passthru mode enable it if it doesn't work
> already?
> 
> > - cannot enable promiscuous mode on guest virtio-net
> 
> Could you elaborate why such a setup would be useful?
> 
> 	Arnd

E.g. to support bridging in the guest.

-- 
MST

^ permalink raw reply

* Pica8 - Linux Cloud Switch
From: Lin Pica8 @ 2010-10-30 16:54 UTC (permalink / raw)
  To: netdev

Hello,

For your information :

http://www.pica8.org/

http://www.networkworld.com/news/2010/102810-pica8-opensource-switching.html?page=1

Mail : pica8@gmail.org

^ permalink raw reply

* Re: [PATCH] af_unix: unix_write_space() use keyed wakeups
From: Davide Libenzi @ 2010-10-30 15:03 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Alban Crequy, David S. Miller, Stephen Hemminger, Cyrill Gorcunov,
	Alexey Dobriyan, netdev, linux-kernel, Pauli Nieminen,
	Rainer Weikusat
In-Reply-To: <1288421084.2680.717.camel@edumazet-laptop>

On Sat, 30 Oct 2010, Eric Dumazet wrote:

> This patch is a specialization of commit 37e5540b3c9d (epoll keyed
> wakeups: make sockets use keyed wakeups).

Whoops, I must have missed AF_UNIX :)
Looks good to me.


- Davide



^ permalink raw reply

* Re: [PATCH] net: core: scm: fix information leak to userland
From: Vasiliy Kulikov @ 2010-10-30 14:50 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: kernel-janitors, David S. Miller, Eric W. Biederman, Tejun Heo,
	Serge E. Hallyn, netdev, linux-kernel
In-Reply-To: <1288449205.2680.968.camel@edumazet-laptop>

On Sat, Oct 30, 2010 at 16:33 +0200, Eric Dumazet wrote:
> Le samedi 30 octobre 2010 à 18:26 +0400, Vasiliy Kulikov a écrit :
> > Structure cmsghdr is copied to userland with padding bytes
> > unitialized on architectures where __kernel_size_t is unsigned long.
> > It leads to leaking of contents of kernel stack memory.
> > 
> > Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> > ---
> >  Compile tested.
> > 
> >  net/core/scm.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/net/core/scm.c b/net/core/scm.c
> > index 413cab8..a4a9b70 100644
> > --- a/net/core/scm.c
> > +++ b/net/core/scm.c
> > @@ -233,6 +233,7 @@ int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
> >  		msg->msg_flags |= MSG_CTRUNC;
> >  		cmlen = msg->msg_controllen;
> >  	}
> > +	memset(&cmhdr, 0, sizeof(cmhdr));
> >  	cmhdr.cmsg_level = level;
> >  	cmhdr.cmsg_type = type;
> >  	cmhdr.cmsg_len = cmlen;
> 
> 
> ???
> 
> struct cmsghdr {
>         __kernel_size_t cmsg_len;       /* data byte count, including hdr */
>         int             cmsg_level;     /* originating protocol */
>         int             cmsg_type;      /* protocol-specific type */
> };
> 
> Could you explain where are the padding bytes ?

Ah, sorry, nowhere :)  int is stored quite OK after long.  Please ignore this patch.

Thanks,

-- 
Vasiliy

^ permalink raw reply

* Re: [PATCH] net: core: sock: fix information leak to userland
From: Vasiliy Kulikov @ 2010-10-30 14:49 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: kernel-janitors, David S. Miller, Eric W. Biederman, Herbert Xu,
	Paul E. McKenney, netdev, linux-kernel
In-Reply-To: <1288449350.2680.970.camel@edumazet-laptop>

On Sat, Oct 30, 2010 at 16:35 +0200, Eric Dumazet wrote:
> Le samedi 30 octobre 2010 à 18:26 +0400, Vasiliy Kulikov a écrit :
> > "Address" variable might be not fully initialized in sock->ops->get_name().
> > The only current implementation is get_name(), it leaves some padding
> > fields of sockaddr_tipc uninitialized.  It leads to leaking of contents
> > of kernel stack memory.
> > 
> > Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> > ---
> >  Compile tested.
> > 
> >  net/core/sock.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/net/core/sock.c b/net/core/sock.c
> > index 3eed542..759dd81 100644
> > --- a/net/core/sock.c
> > +++ b/net/core/sock.c
> > @@ -930,6 +930,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
> >  	{
> >  		char address[128];
> >  
> > +		memset(&address, 0, sizeof(address));
> >  		if (sock->ops->getname(sock, (struct sockaddr *)address, &lv, 2))
> >  			return -ENOTCONN;
> >  		if (lv < len)
> 
> ???
> 
> Please fix the real bug.

What if somebody want to create his own implementation of getname()?
IMO it's much safer to introduce memset() here and relax getname()'s
responsibilities.  Quite many drivers "forget" to initialize outputs
structures.  E.g. new net_device's private field is kzalloc'ed to
simplify driver's code.

-- 
Vasiliy

^ permalink raw reply

* Re: [PATCH] net: core: sock: fix information leak to userland
From: Eric Dumazet @ 2010-10-30 14:35 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, David S. Miller, Eric W. Biederman, Herbert Xu,
	Paul E. McKenney, netdev, linux-kernel
In-Reply-To: <1288448801-6303-1-git-send-email-segooon@gmail.com>

Le samedi 30 octobre 2010 à 18:26 +0400, Vasiliy Kulikov a écrit :
> "Address" variable might be not fully initialized in sock->ops->get_name().
> The only current implementation is get_name(), it leaves some padding
> fields of sockaddr_tipc uninitialized.  It leads to leaking of contents
> of kernel stack memory.
> 
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> ---
>  Compile tested.
> 
>  net/core/sock.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/core/sock.c b/net/core/sock.c
> index 3eed542..759dd81 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -930,6 +930,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
>  	{
>  		char address[128];
>  
> +		memset(&address, 0, sizeof(address));
>  		if (sock->ops->getname(sock, (struct sockaddr *)address, &lv, 2))
>  			return -ENOTCONN;
>  		if (lv < len)

???

Please fix the real bug.

^ permalink raw reply

* Re: [PATCH] net: core: scm: fix information leak to userland
From: Eric Dumazet @ 2010-10-30 14:33 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, David S. Miller, Eric W. Biederman, Tejun Heo,
	Serge E. Hallyn, netdev, linux-kernel
In-Reply-To: <1288448796-6147-1-git-send-email-segooon@gmail.com>

Le samedi 30 octobre 2010 à 18:26 +0400, Vasiliy Kulikov a écrit :
> Structure cmsghdr is copied to userland with padding bytes
> unitialized on architectures where __kernel_size_t is unsigned long.
> It leads to leaking of contents of kernel stack memory.
> 
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> ---
>  Compile tested.
> 
>  net/core/scm.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/core/scm.c b/net/core/scm.c
> index 413cab8..a4a9b70 100644
> --- a/net/core/scm.c
> +++ b/net/core/scm.c
> @@ -233,6 +233,7 @@ int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
>  		msg->msg_flags |= MSG_CTRUNC;
>  		cmlen = msg->msg_controllen;
>  	}
> +	memset(&cmhdr, 0, sizeof(cmhdr));
>  	cmhdr.cmsg_level = level;
>  	cmhdr.cmsg_type = type;
>  	cmhdr.cmsg_len = cmlen;


???

struct cmsghdr {
        __kernel_size_t cmsg_len;       /* data byte count, including hdr */
        int             cmsg_level;     /* originating protocol */
        int             cmsg_type;      /* protocol-specific type */
};

Could you explain where are the padding bytes ?




^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox