* pull request: wireless-2.6 2010-07-12
From: John W. Linville @ 2010-07-12 20:16 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
Dave,
Here are a couple of small fixes for resource leaks in 2.6.35.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 17c99297212a2d1b1779a08caf4b0d83a85545df:
r8169: incorrect identifier for a 8168dp (2010-07-11 17:10:09 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master
Rajkumar Manoharan (1):
ath9k_htc: fix memory leak in ath9k_hif_usb_alloc_urbs
Reinette Chatre (1):
iwlwifi: remove key information during device restart
drivers/net/wireless/ath/ath9k/hif_usb.c | 8 ++++++--
drivers/net/wireless/iwlwifi/iwl-sta.h | 11 +++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 77b3591..23c15aa 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -730,13 +730,17 @@ static int ath9k_hif_usb_alloc_urbs(struct hif_device_usb *hif_dev)
/* RX */
if (ath9k_hif_usb_alloc_rx_urbs(hif_dev) < 0)
- goto err;
+ goto err_rx;
/* Register Read */
if (ath9k_hif_usb_alloc_reg_in_urb(hif_dev) < 0)
- goto err;
+ goto err_reg;
return 0;
+err_reg:
+ ath9k_hif_usb_dealloc_rx_urbs(hif_dev);
+err_rx:
+ ath9k_hif_usb_dealloc_tx_urbs(hif_dev);
err:
return -ENOMEM;
}
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.h b/drivers/net/wireless/iwlwifi/iwl-sta.h
index c2a453a..dc43ebd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.h
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.h
@@ -97,6 +97,17 @@ static inline void iwl_clear_driver_stations(struct iwl_priv *priv)
spin_lock_irqsave(&priv->sta_lock, flags);
memset(priv->stations, 0, sizeof(priv->stations));
priv->num_stations = 0;
+
+ /*
+ * Remove all key information that is not stored as part of station
+ * information since mac80211 may not have had a
+ * chance to remove all the keys. When device is reconfigured by
+ * mac80211 after an error all keys will be reconfigured.
+ */
+ priv->ucode_key_table = 0;
+ priv->key_mapping_key = 0;
+ memset(priv->wep_keys, 0, sizeof(priv->wep_keys));
+
spin_unlock_irqrestore(&priv->sta_lock, flags);
}
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply related
* Re: sysfs bug when using tun with network namespaces
From: Michael Leun @ 2010-07-12 20:07 UTC (permalink / raw)
To: Max Krasnyansky; +Cc: lkml, netdev
In-Reply-To: <4C3B5D68.5010809@qualcomm.com>
Max,
On Mon, 12 Jul 2010 11:22:32 -0700
Max Krasnyansky <maxk@qualcomm.com> wrote:
> Thanks for forwarding this report. I'll take a look and try to
> reproduce and fix it when I get a chance.
Sorry, I should have send the further communication CC: to you.
This one is resolved, it is due to missing support for namespaces
almost at all in sysfs prior to 2.6.35-rc, bug does not appear
in .35-rcX anymore.
But I have found another one:
On Sat, 10 Jul 2010 16:52:08 +0200
Michael Leun <lkml20100708@newton.leun.net> wrote:
> # tunctl -u ml -t tap1
> works as expected, but
> # unshare -n /bin/bash
> # tunctl -u ml -t tap1
[bug (no sysfs support for net namespaces at all) solved in 2.6.35-rcX
- I used 2.6.34.1]
Now that we have solved that last one I've another glitch (this time using 2.6.35-rc4):
In an network namespace I can use an tun/tap tunnel through ssh and
when closing that namespace then eveything is fine.
But when using openvpn (also tunnel trough tun/tap) in an network
namespace and then closing that namespace I get:
unregister_netdevice: waiting for lo to become free
[repeated]
Please see the following two examples showing that difference:
# > unshare -n /bin/bash
# > # how to setup veth device pair to get connectivity into namespace not shown here
# > tunctl -u ml -t tap1
# > ssh -o Tunnel=Ethernet -w 1:1 somewhere
[ running some traffic over tap1 not shown here ]
^d # logging out from somewhere
# > tunctl -d tap1
# > exit # logging out from shell in network namespace
Now the veth device pair used automagically vanishes and nothing
from that different network namespace remains - very well.
but
# > unshare -n /bin/bash
# > # how to setup veth device pair to get connectivity into namespace not shown here
# > openvpn --config some.config
[ running some traffic over vpn device not shown here ]
^c # stopping openvpn
# > lsof -i
# > netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
# > ps ax|grep openvpn|grep -v grep
# > # cannot find anything that suggests there is anything left from that openvpn session
# > exit # logging out from shell in network namespace
Now I get
Jul 10 20:02:36 doris kernel: unregister_netdevice: waiting for lo to become free. Usage count = 3
[repeated]
Now one might say it is fault of openvpn (used OpenVPN 2.1_rc20
i586-suse-linux - the one in openSuSE 11.2 package), openvpn didn't
close some ressource and ssh does fine.
But: should'nt kernel clean up after process when it exits?
And/or: Should'nt kernel clean up if last process in network namespace
exits - there is nothing left which might use that interface?!
Greg KH <greg@kroah.com> wrote:
> Yes, you are correct. Care to resend all of this to the
> network-namespace developer(s) and the netdev mailing list so that the
> correct people are notified so they can fix it all?
[X] done - hopefully, cannot find a particular network namespace
developer in MAINTAINERS or source files. If such a one exists, please
forward.
Thanks.
--
MfG,
Michael Leun
^ permalink raw reply
* Re: [patch] 9p: strlen() doesn't count the terminator
From: Andrew Morton @ 2010-07-12 20:04 UTC (permalink / raw)
To: Dan Carpenter
Cc: Eric Van Hensbergen, David S. Miller, Abhishek Kulkarni,
Venkateswararao Jujjuri, linux-kernel, Tilman Sauerbeck, netdev,
kernel-janitors
In-Reply-To: <20100710095154.GU19184@bicker>
On Sat, 10 Jul 2010 11:51:54 +0200
Dan Carpenter <error27@gmail.com> wrote:
> This is an off by one bug because strlen() doesn't count the NULL
> terminator. We strcpy() addr into a fixed length array of size
> UNIX_PATH_MAX later on.
>
> The addr variable is the name of the device being mounted.
>
> CC: stable@kernel.org
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
> index 98ce9bc..c85109d 100644
> --- a/net/9p/trans_fd.c
> +++ b/net/9p/trans_fd.c
> @@ -948,7 +948,7 @@ p9_fd_create_unix(struct p9_client *client, const char *addr, char *args)
>
> csocket = NULL;
>
> - if (strlen(addr) > UNIX_PATH_MAX) {
> + if (strlen(addr) >= UNIX_PATH_MAX) {
> P9_EPRINTK(KERN_ERR, "p9_trans_unix: address too long: %s\n",
> addr);
> return -ENAMETOOLONG;
This bug doesn't strike me as serious enough to warrant backporting the fix
into -stable. What was your thinking there?
^ permalink raw reply
* Re: [PATCH net-next-2.6] net/ipv4: EXPORT_SYMBOL cleanups
From: David Miller @ 2010-07-12 19:58 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1278746530.2538.41.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 10 Jul 2010 09:22:10 +0200
> CodingStyle cleanups
>
> EXPORT_SYMBOL should immediately follow the symbol declaration.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6] net/core: EXPORT_SYMBOL cleanups
From: David Miller @ 2010-07-12 19:58 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1278746524.2538.40.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 10 Jul 2010 09:22:04 +0200
> CodingStyle cleanups
>
> EXPORT_SYMBOL should immediately follow the symbol declaration.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH v2 linux-2.6.35-rc3] ks8842 driver
From: David Miller @ 2010-07-12 19:56 UTC (permalink / raw)
To: David.Choi; +Cc: horms, netdev, Charles.Li
In-Reply-To: <C43529A246480145B0A6D0234BDB0F0D0212A5@MELANITE.micrel.com>
From: "Choi, David" <David.Choi@Micrel.Com>
Date: Fri, 9 Jul 2010 14:22:35 -0700
> I change the ks8842 driver so that the platform private data is used to pass
> different parameters like selection of 16/32bit, as suggested.
This looks good, could you submit this formally with a proper full
commit message and signoff?
THanks!
^ permalink raw reply
* Re: [PATCH] tproxy: nf_tproxy_assign_sock() can handle tw sockets
From: Felipe W Damasio @ 2010-07-12 18:49 UTC (permalink / raw)
To: Eric Dumazet
Cc: Avi Kivity, David Miller, Patrick McHardy, linux-kernel, netdev
In-Reply-To: <AANLkTikEGuFtTlIKUfti6GDsdBz99PpKRCs5lEeEM86u@mail.gmail.com>
Hi Mr. Dumazet,
2010/7/11 Felipe W Damasio <felipewd@gmail.com>:
> We're using eth1 facing the user and eth2 facing the internet.
Here's the result using ethtool-2.6.34:
./ethtool -k eth1
Offload parameters for eth1:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: on
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: off
large-receive-offload: off
ntuple-filters: off
receive-hashing: off
./ethtool -k eth2
Offload parameters for eth2:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: on
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: off
large-receive-offload: off
ntuple-filters: off
receive-hashing: off
^ permalink raw reply
* Re: [REGRESSION] e1000e stopped working [MANUALLY BISECTED]
From: Maxim Levitsky @ 2010-07-12 15:56 UTC (permalink / raw)
To: Jeff Kirsher
Cc: Tantilov, Emil S, netdev@vger.kernel.org, Allan, Bruce W,
Pieper, Jeffrey E
In-Reply-To: <1278323885.5277.0.camel@localhost.localdomain>
On Mon, 2010-07-05 at 12:58 +0300, Maxim Levitsky wrote:
> On Mon, 2010-07-05 at 01:13 -0700, Jeff Kirsher wrote:
> > On Sun, Jul 4, 2010 at 15:48, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > > Did few guesses, and now I see that reverting the below commit fixes the
> > > problem.
> > >
> > > "e1000e: Fix/cleanup PHY reset code for ICHx/PCHx"
> > > e98cac447cc1cc418dff1d610a5c79c4f2bdec7f.
> > >
> > >
> > > Best regards,
> > > Maxim Levitsky
> > >
> > > --
> >
> > Can you give us till Tuesday to respond? I know that there are some
> > additional e1000e patches in my queue, which may resolve the issue,
> > but this weekend the power is down to do some infrastructure upgrades
> > which prevents us from doing any investigation.debugging until
> > Tuesday.
> >
>
> Sure.
>
> Best regards,
> Maxim Levitsky
>
Updates?
or 2.6.35 will ship with e0000e ? :-)
I really have very little time to help further with that for now.
Best regards,
Maxim Levitsky
^ permalink raw reply
* Re: [PATCH] sky2: enable rx/tx in sky2_phy_reinit()
From: Stephen Hemminger @ 2010-07-12 15:48 UTC (permalink / raw)
To: Brandon Philips; +Cc: netdev, davem, Mike McCormack
In-Reply-To: <20100712110410.GA13679@chota.scz.novell.com>
On Mon, 12 Jul 2010 04:04:10 -0700
Brandon Philips <brandon@ifup.org> wrote:
> On 10:00 Wed 23 Jun 2010, Brandon Philips wrote:
> > While testing this I just noticed that if I turn off speed autoneg the
> > interface stops sending packets until I turn off pause autoneg too.
> >
> > To illustrate start pinging some machine and run this:
> >
> > $ ethtool --change eth0 speed 100 duplex full autoneg off
> > # At this point the ping stops
> >
> > $ ethtool -A eth0 autoneg off
> > # Ping starts up again
> >
> > When I tried capturing packets nothing was coming from the device.
> >
> > 0ea065e52eb6a0f029b5fa5ed2f142be1b66a153 implemeneted the behaviour of
> > having seperate pause and speed ethtool controls for sky2. Reverting
> > this (see quick ugly revert below) obviously fixes the issue.
> >
> > Any ideas on how to fix this in a proper way though?
No quick ideas; try doing walkthrough with debugging to see what PHY
interrupt status is.
^ permalink raw reply
* [PATCH v2] depca: fix leaks in depca_module_init()
From: Kulikov Vasiliy @ 2010-07-12 14:52 UTC (permalink / raw)
To: David Miller
Cc: kernel-janitors, jpirko, joe, shemminger, eric.dumazet, netdev
In-Reply-To: <20100711.181300.58435799.davem@davemloft.net>
Since some of xxx_register_driver() can return error we must unregister
already registered drivers.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
drivers/net/depca.c | 29 +++++++++++++++++++++++------
1 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index bf66e9b..44c0694 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -2061,18 +2061,35 @@ static int depca_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
static int __init depca_module_init (void)
{
- int err = 0;
+ int err = 0;
#ifdef CONFIG_MCA
- err = mca_register_driver (&depca_mca_driver);
+ err = mca_register_driver(&depca_mca_driver);
+ if (err)
+ goto err;
#endif
#ifdef CONFIG_EISA
- err |= eisa_driver_register (&depca_eisa_driver);
+ err = eisa_driver_register(&depca_eisa_driver);
+ if (err)
+ goto err_mca;
#endif
- err |= platform_driver_register (&depca_isa_driver);
- depca_platform_probe ();
+ err = platform_driver_register(&depca_isa_driver);
+ if (err)
+ goto err_eisa;
- return err;
+ depca_platform_probe();
+ return 0;
+
+err_eisa:
+#ifdef CONFIG_EISA
+ eisa_driver_unregister(&depca_eisa_driver);
+err_mca:
+#endif
+#ifdef CONFIG_MCA
+ mca_unregister_driver(&depca_mca_driver);
+err:
+#endif
+ return err;
}
static void __exit depca_module_exit (void)
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH] adm8211: fix memory leak
From: Luis R. Rodriguez @ 2010-07-12 14:51 UTC (permalink / raw)
To: Kulikov Vasiliy
Cc: kernel-janitors@vger.kernel.org, Michael Wu, John W. Linville,
David S. Miller, Johannes Berg, Kalle Valo, Luis Rodriguez,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
In-Reply-To: <1278764938-9417-1-git-send-email-segooon@gmail.com>
On Sat, Jul 10, 2010 at 05:28:57AM -0700, Kulikov Vasiliy wrote:
> We must free priv->eeprom allocated in adm8211_read_eeprom().
>
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Good catch.
Luis
^ permalink raw reply
* Re: [RFC][PATCH] mac80211_hwsim: No parent is better than an illegimate one.
From: Johannes Berg @ 2010-07-12 14:29 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Andrew Morton, Rafael J. Wysocki, Maciej W. Rozycki, Kay Sievers,
Greg KH, Greg KH <gregkh@suse.de> netdev
In-Reply-To: <m11vb8u6cy.fsf@fess.ebiederm.org>
On Mon, 2010-07-12 at 07:23 -0700, Eric W. Biederman wrote:
> > It'll probably work, but anything in userspace relying on it will fail,
> > and you'll have some unused virtual devices in sysfs?
>
> Well anything in userspace that isn't mac80211_hwsim specific will
> likely already fail because the format of the link is different for
> mac80211_hwsim then for every other wireless device.
Well, I seem to have a vague memory of network-manager for example
requiring the link but not really caring much what it is, but I might
remember something else that wasn't hwsim related.
johannes
^ permalink raw reply
* Re: [RFC][PATCH] mac80211_hwsim: No parent is better than an illegimate one.
From: Eric W. Biederman @ 2010-07-12 14:23 UTC (permalink / raw)
To: Johannes Berg
Cc: Andrew Morton, Rafael J. Wysocki, Maciej W. Rozycki, Kay Sievers,
Greg KH, Greg KH <gregkh@suse.de> netdev
In-Reply-To: <1278917200.3667.1.camel@jlt3.sipsolutions.net>
Johannes Berg <johannes@sipsolutions.net> writes:
> On Thu, 2010-07-08 at 09:37 -0700, Eric W. Biederman wrote:
>> Don't call SET_IEEE80211_DEV. This weakens the connections between
>> the phy files in sysfs slightly but otherwise it makes the driver work
>> in the face of tagged sysfs support.
>>
>> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
>> ---
>>
>> Johannes does this change look usable?
>
> It'll probably work, but anything in userspace relying on it will fail,
> and you'll have some unused virtual devices in sysfs?
Well anything in userspace that isn't mac80211_hwsim specific will
likely already fail because the format of the link is different for
mac80211_hwsim then for every other wireless device.
> Not too keen on it, but if we really can't fix it ....
Perhaps. I'm not familiar enough with the details of the device layer
to promise an eta on anything like that.
Eric
^ permalink raw reply
* USB attached microcontroller with net interface
From: Jon Smirl @ 2010-07-12 13:55 UTC (permalink / raw)
To: Netdev
I have a USB stick with a microcontroller and a 802.15.4 radio on it.
The USB stick is fixed as a standard USB serial device by the hardware
but the device has a unique USB ID. What is the best strategy for
integrating this stick into Linux?
One option is the linux-zigbee model. The microcontroller runs a small
program which implements a private serial line protocol. On the Linux
side there is a device driver that understands this protocol and
implements a net device. The serial line protocol is implemented as a
line discipline - which requires a user space component to hold the
ttyUSBx device open. The protocol passes things like send packet,
receive packet, etc.. This implies that the 6lowpan/RPL support in
Linux gets finished.
Second option is to run TCP in the microcontroller. This model has
already been implemented in Contiki (a small OS for microcontrollers).
Contiki supports two network interfaces - SLIP and radio. It routes
everything between the interfaces. 6lowpan/RPL are running on the
microcontroller. After you plug the device in you use ldattach on
ttyUSBx to get SLIP running over the USB serial port.
The 802.15.4 nets are running IPv6. A complicating factor is routing.
Say you have a building covered by a 802.15.4 RPL mesh. Now you plug
802.15.4 USB sticks into some PCs and create multiple gateways into
the RPL network. You want to use the closest gateway since mesh hops
are quite slow.
Is there another, better option? I'd like to get this working without
requiring a user space component.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply
* [PATCH] hso: remove driver version
From: Filip Aben @ 2010-07-12 13:42 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q, gregkh-l3A5Bk7waGM
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
This patch removes the driver version from the driver. This version hasn't changed since the driver's inclusion in the kernel and is a source
of confusion for some customers.
Signed-off-by: Filip Aben <f.aben-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
---
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 4dd2351..41fc903 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -73,7 +73,6 @@
#include <linux/serial.h>
-#define DRIVER_VERSION "1.2"
#define MOD_AUTHOR "Option Wireless"
#define MOD_DESCRIPTION "USB High Speed Option driver"
#define MOD_LICENSE "GPL"
@@ -401,7 +400,7 @@ static int disable_net;
/* driver info */
static const char driver_name[] = "hso";
static const char tty_filename[] = "ttyHS";
-static const char *version = __FILE__ ": " DRIVER_VERSION " " MOD_AUTHOR;
+static const char *version = __FILE__ ": " MOD_AUTHOR;
/* the usb driver itself (registered in hso_init) */
static struct usb_driver hso_driver;
/* serial structures */
@@ -848,7 +847,6 @@ static void hso_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info
struct hso_net *odev = netdev_priv(net);
strncpy(info->driver, driver_name, ETHTOOL_BUSINFO_LEN);
- strncpy(info->version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
usb_make_path(odev->parent->usb, info->bus_info, sizeof info->bus_info);
}
@@ -3388,7 +3386,6 @@ module_exit(hso_exit);
MODULE_AUTHOR(MOD_AUTHOR);
MODULE_DESCRIPTION(MOD_DESCRIPTION);
MODULE_LICENSE(MOD_LICENSE);
-MODULE_INFO(Version, DRIVER_VERSION);
/* change the debug level (eg: insmod hso.ko debug=0x04) */
MODULE_PARM_DESC(debug, "Level of debug [0x01 | 0x02 | 0x04 | 0x08 | 0x10]");
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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
* [REGRESSION] 2.6.35-rc crash in br_deliver (netpoll related)
From: Yanko Kaneti @ 2010-07-12 12:54 UTC (permalink / raw)
To: netdev
This is quite reliably reproducible in Fedora rawhide acting as a host
for a kvm guest Fedora 13 netinstall (over libvirt created bridged vm
network). Its not reproducible with the same scenario on any of the
2.6.34 fedora kernels.
In a brief experiment I tried pulling the netpoll/bridge fixes from
Herbert Xu http://www.spinics.net/lists/netdev/msg132556.html from
net-next along with nearby patches to make it apply/build. The crash was
gone but there were some new warnings
WARNING: at kernel/softirq.c:88 __local_bh_disable+0x42/0xbe()
perhaps I didn't pull all the related rcu fixes..
general protection fault: 0000 [#1] SMP
last sysfs file: /sys/devices/platform/it87.552/temp3_input
CPU 3
Modules linked in: tun nfs lockd fscache nfs_acl auth_rpcgss sunrpc fuse pppoe pppox ppp_synctty ppp_async crc_ccitt ppp_generic slhc ip6table_filter ip6_tables ebtable_nat ebtables bridge it87 hwmon_vid 8021q garp stp llc ipv6 nf_conntrack_netbios_ns ipt_MASQUERADE iptable_nat nf_nat xt_physdev kvm_amd kvm uinput snd_hda_codec_atihdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore snd_page_alloc ppdev parport_pc i2c_piix4 parport shpchp edac_core k10temp edac_mce_amd wmi raid1 ata_generic pata_acpi usb_storage 3c59x firewire_ohci firewire_core crc_itu_t tulip pata_atiixp r8169 mii radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: scsi_wait_scan]
Pid: 3278, comm: qemu-kvm Not tainted 2.6.35-0.31.rc4.git4.fc14.x86_64 #1 GA-MA78GM-S2H/GA-MA78GM-S2H
RIP: 0010:[<ffffffffa0394529>] [<ffffffffa0394529>] __br_deliver+0x82/0xa2 [bridge]
RSP: 0018:ffff880003203b30 EFLAGS: 00010246
RAX: 6b6b6b6b6b6b6b6b RBX: ffff8801cf8caf00 RCX: 0000000000000000
RDX: ffff8802045330e0 RSI: ffff88020133a168 RDI: ffffffff80000000
RBP: ffff880003203b40 R08: ffff8802077d07a0 R09: ffff8800032039b0
R10: ffff8802045330e0 R11: ffff8801cf8caf00 R12: ffff880220c6a9e0
R13: ffff8801cf8caf28 R14: ffff88020133a168 R15: ffff880220e6bbd8
FS: 00007f08fb362700(0000) GS:ffff880003200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000ffedd0 CR3: 0000000201163000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-kvm (pid: 3278, threadinfo ffff8802013c4000, task ffff8801fdd38000)
Stack:
ffff8801cf8caf00 ffff880220c6a9e0 ffff880003203b50 ffffffffa03945e5
<0> ffff880003203b80 ffffffffa0393561 ffff8801cf8caf00 ffff880220c6a060
<0> ffff880220c6a060 ffff880220e6bbd8 ffff880003203bd0 ffffffff813e85a0
Call Trace:
<IRQ>
[<ffffffffa03945e5>] br_deliver+0x27/0x33 [bridge]
[<ffffffffa0393561>] br_dev_xmit+0x10a/0x122 [bridge]
[<ffffffff813e85a0>] dev_hard_start_xmit+0x237/0x30e
[<ffffffff813e89e3>] dev_queue_xmit+0x36c/0x434
[<ffffffff813e8751>] ? dev_queue_xmit+0xda/0x434
[<ffffffff81408aba>] ? nf_hook_slow+0xd1/0xe3
[<ffffffff8141d438>] ? ip_finish_output+0x0/0x71
[<ffffffff8141d3f5>] ip_finish_output2+0x1df/0x222
[<ffffffff8141d4a4>] ip_finish_output+0x6c/0x71
[<ffffffff8141dd29>] ip_output+0x96/0x9a
[<ffffffff8141b318>] ip_forward_finish+0x4e/0x53
[<ffffffff8141b5fb>] ip_forward+0x2de/0x34b
[<ffffffff814198bd>] ? rcu_read_lock_held+0xe/0x27
[<ffffffff81419d25>] ip_rcv_finish+0x387/0x3b9
[<ffffffff8141999e>] ? ip_rcv_finish+0x0/0x3b9
[<ffffffff8141a026>] NF_HOOK.clone.6+0x51/0x59
[<ffffffff8141a3c6>] ip_rcv+0x21f/0x24d
[<ffffffff813e4df8>] __netif_receive_skb+0x470/0x49a
[<ffffffff813e6724>] process_backlog+0x99/0x17b
[<ffffffff813e68b7>] net_rx_action+0xb1/0x1f5
[<ffffffff8107ae11>] ? print_lock_contention_bug+0x1b/0xd5
[<ffffffff8100abdc>] ? call_softirq+0x1c/0x30
[<ffffffff81056660>] __do_softirq+0xfa/0x1cf
[<ffffffff8107d358>] ? lock_release+0x19a/0x1a6
[<ffffffff8100abdc>] call_softirq+0x1c/0x30
[<ffffffff8100c375>] do_softirq+0x4b/0xa2
[<ffffffff81056806>] irq_exit+0x4a/0x8c
[<ffffffff8149d6c5>] do_IRQ+0x9d/0xb4
[<ffffffff81497853>] ret_from_intr+0x0/0x16
<EOI>
[<ffffffffa0319044>] ? kvm_arch_vcpu_ioctl_run+0x7a5/0xadd [kvm]
[<ffffffffa030cc31>] ? raw_local_irq_enable+0xd/0x12 [kvm]
[<ffffffff8107d886>] ? trace_hardirqs_on+0xd/0xf
[<ffffffffa0319049>] kvm_arch_vcpu_ioctl_run+0x7aa/0xadd [kvm]
[<ffffffffa0306320>] kvm_vcpu_ioctl+0x103/0x5d7 [kvm]
[<ffffffff81081e40>] ? do_futex+0x7c0/0x895
[<ffffffff81128174>] ? generic_file_llseek+0x2f/0x60
[<ffffffff81135cd4>] vfs_ioctl+0x36/0xa7
[<ffffffff8113664d>] do_vfs_ioctl+0x47c/0x4af
[<ffffffff8107d358>] ? lock_release+0x19a/0x1a6
[<ffffffff8112931a>] ? rcu_read_unlock+0x21/0x23
[<ffffffff811366d6>] sys_ioctl+0x56/0x7c
[<ffffffff81009c72>] system_call_fastpath+0x16/0x1b
Code: 66 81 88 7e 01 00 00 00 10 48 8b 4f 08 31 d2 49 c7 c0 82 44 39 a0 48 89 de bf 03 00 00 00 48 89 4b 20 e8 04 ff ff ff 48 8b 43 20 <48> 8b 80 08 05 00 00 48 85 c0 74 0f 48 8b 80 d0 01 00 00 49 8b
...
^ permalink raw reply
* Re: [PATCH] sky2: enable rx/tx in sky2_phy_reinit()
From: Brandon Philips @ 2010-07-12 11:04 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, davem, Mike McCormack
In-Reply-To: <20100623170008.GN14143@jenkins.ifup.org>
On 10:00 Wed 23 Jun 2010, Brandon Philips wrote:
> While testing this I just noticed that if I turn off speed autoneg the
> interface stops sending packets until I turn off pause autoneg too.
>
> To illustrate start pinging some machine and run this:
>
> $ ethtool --change eth0 speed 100 duplex full autoneg off
> # At this point the ping stops
>
> $ ethtool -A eth0 autoneg off
> # Ping starts up again
>
> When I tried capturing packets nothing was coming from the device.
>
> 0ea065e52eb6a0f029b5fa5ed2f142be1b66a153 implemeneted the behaviour of
> having seperate pause and speed ethtool controls for sky2. Reverting
> this (see quick ugly revert below) obviously fixes the issue.
>
> Any ideas on how to fix this in a proper way though?
Hello Stephen-
Any ideas on how to fix this properly?
Thanks,
Brandon
> From 8de50faa1911933dc545f663a24f32d0caeea3b4 Mon Sep 17 00:00:00 2001
> From: Brandon Philips <brandon@ifup.org>
> Date: Wed, 23 Jun 2010 09:56:20 -0700
> Subject: [PATCH] sky2: revert "fix pause negotiation"
>
> Revert 0ea065e52eb6a0f029b5fa5ed2f142be1b66a153
> ---
> drivers/net/sky2.c | 31 ++++++++++++-------------------
> drivers/net/sky2.h | 2 ++
> 2 files changed, 14 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
> index 7985165..a638171 100644
> --- a/drivers/net/sky2.c
> +++ b/drivers/net/sky2.c
> @@ -333,7 +333,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
> struct sky2_port *sky2 = netdev_priv(hw->dev[port]);
> u16 ctrl, ct1000, adv, pg, ledctrl, ledover, reg;
>
> - if ( (sky2->flags & SKY2_FLAG_AUTO_SPEED) &&
> + if (sky2->autoneg == AUTONEG_ENABLE &&
> !(hw->flags & SKY2_HW_NEWER_PHY)) {
> u16 ectrl = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL);
>
> @@ -375,7 +375,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
> ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO);
>
> /* downshift on PHY 88E1112 and 88E1149 is changed */
> - if ( (sky2->flags & SKY2_FLAG_AUTO_SPEED) &&
> + if (sky2->autoneg == AUTONEG_ENABLE &&
> (hw->flags & SKY2_HW_NEWER_PHY)) {
> /* set downshift counter to 3x and enable downshift */
> ctrl &= ~PHY_M_PC_DSC_MSK;
> @@ -420,7 +420,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
> adv = PHY_AN_CSMA;
> reg = 0;
>
> - if (sky2->flags & SKY2_FLAG_AUTO_SPEED) {
> + if (sky2->autoneg == AUTONEG_ENABLE) {
> if (sky2_is_copper(hw)) {
> if (sky2->advertising & ADVERTISED_1000baseT_Full)
> ct1000 |= PHY_M_1000C_AFD;
> @@ -435,11 +435,14 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
> if (sky2->advertising & ADVERTISED_10baseT_Half)
> adv |= PHY_M_AN_10_HD;
>
> + adv |= copper_fc_adv[sky2->flow_mode];
> } else { /* special defines for FIBER (88E1040S only) */
> if (sky2->advertising & ADVERTISED_1000baseT_Full)
> adv |= PHY_M_AN_1000X_AFD;
> if (sky2->advertising & ADVERTISED_1000baseT_Half)
> adv |= PHY_M_AN_1000X_AHD;
> +
> + adv |= fiber_fc_adv[sky2->flow_mode];
> }
>
> /* Restart Auto-negotiation */
> @@ -448,8 +451,8 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
> /* forced speed/duplex settings */
> ct1000 = PHY_M_1000C_MSE;
>
> - /* Disable auto update for duplex flow control and duplex */
> - reg |= GM_GPCR_AU_DUP_DIS | GM_GPCR_AU_SPD_DIS;
> + /* Disable auto update for duplex flow control and speed */
> + reg |= GM_GPCR_AU_ALL_DIS;
>
> switch (sky2->speed) {
> case SPEED_1000:
> @@ -467,15 +470,8 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
> ctrl |= PHY_CT_DUP_MD;
> } else if (sky2->speed < SPEED_1000)
> sky2->flow_mode = FC_NONE;
> - }
>
> - if (sky2->flags & SKY2_FLAG_AUTO_PAUSE) {
> - if (sky2_is_copper(hw))
> - adv |= copper_fc_adv[sky2->flow_mode];
> - else
> - adv |= fiber_fc_adv[sky2->flow_mode];
> - } else {
> - reg |= GM_GPCR_AU_FCT_DIS;
> +
> reg |= gm_fc_disable[sky2->flow_mode];
>
> /* Forward pause packets to GMAC? */
> @@ -620,8 +616,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
> /* no effect on Yukon-XL */
> gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl);
>
> - if (!(sky2->flags & SKY2_FLAG_AUTO_SPEED) ||
> - sky2->speed == SPEED_100) {
> + if (sky2->autoneg == AUTONEG_DISABLE || sky2->speed == SPEED_100) {
> /* turn on 100 Mbps LED (LED_LINK100) */
> ledover |= PHY_M_LED_MO_100(MO_LED_ON);
> }
> @@ -632,7 +627,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
> }
>
> /* Enable phy interrupt on auto-negotiation complete (or link up) */
> - if (sky2->flags & SKY2_FLAG_AUTO_SPEED)
> + if (sky2->autoneg == AUTONEG_ENABLE)
> gm_phy_write(hw, port, PHY_MARV_INT_MASK, PHY_M_IS_AN_COMPL);
> else
> gm_phy_write(hw, port, PHY_MARV_INT_MASK, PHY_M_DEF_MSK);
> @@ -688,9 +683,7 @@ static void sky2_phy_power_down(struct sky2_hw *hw, unsigned port)
>
> /* setup General Purpose Control Register */
> gma_write16(hw, port, GM_GP_CTRL,
> - GM_GPCR_FL_PASS | GM_GPCR_SPEED_100 |
> - GM_GPCR_AU_DUP_DIS | GM_GPCR_AU_FCT_DIS |
> - GM_GPCR_AU_SPD_DIS);
> + GM_GPCR_FL_PASS | GM_GPCR_SPEED_100 | GM_GPCR_AU_ALL_DIS);
>
> if (hw->chip_id != CHIP_ID_YUKON_EC) {
> if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
> diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
> index 084eff2..db0b2ad 100644
> --- a/drivers/net/sky2.h
> +++ b/drivers/net/sky2.h
> @@ -1755,6 +1755,7 @@ enum {
> };
>
> #define GM_GPCR_SPEED_1000 (GM_GPCR_GIGS_ENA | GM_GPCR_SPEED_100)
> +#define GM_GPCR_AU_ALL_DIS (GM_GPCR_AU_DUP_DIS | GM_GPCR_AU_FCT_DIS|GM_GPCR_AU_SPD_DIS)
>
> /* GM_TX_CTRL 16 bit r/w Transmit Control Register */
> enum {
> @@ -2247,6 +2248,7 @@ struct sky2_port {
> u16 speed; /* SPEED_1000, SPEED_100, ... */
> u8 wol; /* WAKE_ bits */
> u8 duplex; /* DUPLEX_HALF, DUPLEX_FULL */
> + u8 autoneg; /* AUTONEG_ENABLE, AUTONEG_DISABLE */
> u16 flags;
> #define SKY2_FLAG_RX_CHECKSUM 0x0001
> #define SKY2_FLAG_AUTO_SPEED 0x0002
> --
> 1.7.1
>
^ permalink raw reply
* Re: [PATCH net-next-2.6] macvtap: Return error when macvlan drops the packet
From: Arnd Bergmann @ 2010-07-12 10:44 UTC (permalink / raw)
To: Shirley Ma; +Cc: sri, netdev, davem
In-Reply-To: <1278924474.7719.14.camel@localhost.localdomain>
On Monday 12 July 2010, Shirley Ma wrote:
>
> Return err when macvlan dropps the packet.
Can you be more specific why you think this is the right idea?
As far as I can tell, this will return '1' to user space for a dropped
packet (NET_XMIT_DROP) or another positive return value.
While this might be nice for a user application to know, neither does
qemu check for this nor does it match the read(2) documentation.
I fear if we want congestion control to improve, we need to do it
differently.
Arnd
^ permalink raw reply
* [PATCH net-next-2.6] macvtap: Return error when macvlan drops the packet
From: Shirley Ma @ 2010-07-12 8:47 UTC (permalink / raw)
To: Arnd Bergmann, sri; +Cc: netdev, davem
Return err when macvlan dropps the packet.
Signed-off-by: Shirley Ma <xma@us.ibm.com>
---
drivers/net/macvtap.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 2b4d59b..36d52b5 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -492,9 +492,11 @@ static ssize_t macvtap_get_user(struct
macvtap_queue *q,
rcu_read_lock_bh();
vlan = rcu_dereference(q->vlan);
- if (vlan)
- macvlan_start_xmit(skb, vlan->dev);
- else
+ if (vlan) {
+ err = macvlan_start_xmit(skb, vlan->dev);
+ if (err)
+ count = err;
+ } else
kfree_skb(skb);
rcu_read_unlock_bh();
^ permalink raw reply related
* Re: [PATCH net-next] drivers/scsi: Remove warnings after vsprintf %pV introduction
From: James Bottomley @ 2010-07-12 8:27 UTC (permalink / raw)
To: David Miller
Cc: joe, sfr, netdev, linux-next, linux-kernel, gregkh, matthew,
linux-scsi
In-Reply-To: <20100710.231026.233698429.davem@davemloft.net>
On Sat, 2010-07-10 at 23:10 -0700, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Sat, 10 Jul 2010 22:08:41 -0700
>
> > On Sat, 2010-07-10 at 19:52 -0700, David Miller wrote:
> >> Could you take a stab at this and the other scsi bits that
> >> trigger this warning?
> >
> > Remove warnings introduced by conversions of dev_<level>
> > macros to functions.
> >
> > Compile tested only.
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
>
> SCSI folks, the background is that we have moved the dev_*() printk
> macros to external functions, so that the prefixing printf strings
> don't get emitting at every call site.
>
> As a consequence, dev_*() calls that try to use an empty string as the
> printf format emit a warning from gcc since an empty constant string
> is not a valid printf format.
>
> That's what this change is all about.
Thanks, that explains the "" -> " " conversions.
What's the other 60% of the patch about? the strange addition of
scsi_show_extd_sense_args() and all the KERN_CONT bits?
James
^ permalink raw reply
* [PATCH] fec: use interrupt for MDIO completion indication
From: Baruch Siach @ 2010-07-12 7:12 UTC (permalink / raw)
To: netdev; +Cc: linux-arm-kernel, Sascha Hauer, Bryan Wu, Greg Ungerer,
Baruch Siach
With the move to phylib (commit e6b043d) I was seeing sporadic "MDIO write
timeout" messages. Measure of the actual time spent showed latency times of
more than 1600us.
This patch uses the MII event indication of the FEC hardware to detect
completion of MDIO transactions.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
drivers/net/fec.c | 55 ++++++++++++++++++++++++----------------------------
1 files changed, 25 insertions(+), 30 deletions(-)
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index edfff92..89f3393 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -187,6 +187,7 @@ struct fec_enet_private {
int index;
int link;
int full_duplex;
+ struct completion mdio_done;
};
static irqreturn_t fec_enet_interrupt(int irq, void * dev_id);
@@ -205,7 +206,7 @@ static void fec_stop(struct net_device *dev);
#define FEC_MMFR_TA (2 << 16)
#define FEC_MMFR_DATA(v) (v & 0xffff)
-#define FEC_MII_TIMEOUT 10000
+#define FEC_MII_TIMEOUT 1000 /* us */
/* Transmitter timeout */
#define TX_TIMEOUT (2 * HZ)
@@ -334,6 +335,11 @@ fec_enet_interrupt(int irq, void * dev_id)
ret = IRQ_HANDLED;
fec_enet_tx(dev);
}
+
+ if (int_events & FEC_ENET_MII) {
+ ret = IRQ_HANDLED;
+ complete(&fep->mdio_done);
+ }
} while (int_events);
return ret;
@@ -608,18 +614,13 @@ spin_unlock:
phy_print_status(phy_dev);
}
-/*
- * NOTE: a MII transaction is during around 25 us, so polling it...
- */
static int fec_enet_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
{
struct fec_enet_private *fep = bus->priv;
- int timeout = FEC_MII_TIMEOUT;
+ unsigned long time_left;
fep->mii_timeout = 0;
-
- /* clear MII end of transfer bit*/
- writel(FEC_ENET_MII, fep->hwp + FEC_IEVENT);
+ init_completion(&fep->mdio_done);
/* start a read op */
writel(FEC_MMFR_ST | FEC_MMFR_OP_READ |
@@ -627,13 +628,12 @@ static int fec_enet_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
FEC_MMFR_TA, fep->hwp + FEC_MII_DATA);
/* wait for end of transfer */
- while (!(readl(fep->hwp + FEC_IEVENT) & FEC_ENET_MII)) {
- cpu_relax();
- if (timeout-- < 0) {
- fep->mii_timeout = 1;
- printk(KERN_ERR "FEC: MDIO read timeout\n");
- return -ETIMEDOUT;
- }
+ time_left = wait_for_completion_timeout(&fep->mdio_done,
+ usecs_to_jiffies(FEC_MII_TIMEOUT));
+ if (time_left == 0) {
+ fep->mii_timeout = 1;
+ printk(KERN_ERR "FEC: MDIO read timeout\n");
+ return -ETIMEDOUT;
}
/* return value */
@@ -644,12 +644,10 @@ static int fec_enet_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
u16 value)
{
struct fec_enet_private *fep = bus->priv;
- int timeout = FEC_MII_TIMEOUT;
+ unsigned long time_left;
fep->mii_timeout = 0;
-
- /* clear MII end of transfer bit*/
- writel(FEC_ENET_MII, fep->hwp + FEC_IEVENT);
+ init_completion(&fep->mdio_done);
/* start a read op */
writel(FEC_MMFR_ST | FEC_MMFR_OP_READ |
@@ -658,13 +656,12 @@ static int fec_enet_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
fep->hwp + FEC_MII_DATA);
/* wait for end of transfer */
- while (!(readl(fep->hwp + FEC_IEVENT) & FEC_ENET_MII)) {
- cpu_relax();
- if (timeout-- < 0) {
- fep->mii_timeout = 1;
- printk(KERN_ERR "FEC: MDIO write timeout\n");
- return -ETIMEDOUT;
- }
+ time_left = wait_for_completion_timeout(&fep->mdio_done,
+ usecs_to_jiffies(FEC_MII_TIMEOUT));
+ if (time_left == 0) {
+ fep->mii_timeout = 1;
+ printk(KERN_ERR "FEC: MDIO write timeout\n");
+ return -ETIMEDOUT;
}
return 0;
@@ -1222,7 +1219,8 @@ fec_restart(struct net_device *dev, int duplex)
writel(0, fep->hwp + FEC_R_DES_ACTIVE);
/* Enable interrupts we wish to service */
- writel(FEC_ENET_TXF | FEC_ENET_RXF, fep->hwp + FEC_IMASK);
+ writel(FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII,
+ fep->hwp + FEC_IMASK);
}
static void
@@ -1242,9 +1240,6 @@ fec_stop(struct net_device *dev)
writel(1, fep->hwp + FEC_ECNTRL);
udelay(10);
- /* Clear outstanding MII command interrupts. */
- writel(FEC_ENET_MII, fep->hwp + FEC_IEVENT);
-
writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
}
--
1.7.1
^ permalink raw reply related
* Re: [REGRESSION,BISECTED] Panic on ifup
From: Timo Teräs @ 2010-07-12 7:01 UTC (permalink / raw)
To: George Spelvin; +Cc: davem, netdev
In-Reply-To: <20100711170908.5770.qmail@science.horizon.com>
On 07/11/2010 08:09 PM, George Spelvin wrote:
>> On 07/11/2010 03:38 PM, George Spelvin wrote:
>>> No, although /etc/ipec-tools.conf runs setkey. As I said,
>>> I was mostly running in single-user mode; a ps axf
>>> output is appended.
>>>
>>> Ah! A discovery! There are rules for the gateway!
>>>
>>> add <my_ip> <gw_ip> esp 0x200 -E aes-cbc
>>> <key>;
>>> add <gw_ip> <my_ip> esp 0x300 -E aes-cbc
>>> <key>;
>>> spdadd <gw_ip> <my_ip> any -P in ipsec
>>> esp/transport//use;
>>> spdadd <my_ip> <gw_ip> any -P out ipsec
>>> esp/transport//use;
>
>> This means optional encryption. Probably something goes wrong
>> constructing the bundle which results in encryption not being applied.
>> And it would look like xfrm_resolve_and_create_bundle() does not take
>> this into account properly. I need to fix it with optional policies.
>>
>> In the mean while, could confirm if everything works if you change the
>> last line to:
>> esp/transport//require;
>
> Will do.
>
> This might lead to no traffic if there's something else broken, however
> it should not crash. This change is needed only for the 'out' policy, as
> the bundles are used only on xmit code paths.
>
>> yup, xfrm_resolve_and_create_bundle looks to be the culprit. I'll try to
>> figure out a patch for testing.
Can you try the patch attached to end?
>> Ok, this is basically what setkey did for you. Looks like it was ran
>> twice and you are missing flush and spdflush from setkey, so you get
>> duplicates here. Otherwise it's ok.
>
> Um, I am *not* missing flush and spdflush. The entire file, with comments
> and blank lines stripped, and some details censored, is:
>
> #!/usr/sbin/setkey -f
> flush;
> spdflush;
> add $LOCALNET.1 $LOCALNET.62 esp 0x200 -E aes-cbc <key redacted>;
> add $LOCALNET.62 $LOCALNET.1 esp 0x300 -E aes-cbc <key redacted>;
> add $LOCALNET.3 $LOCALNET.62 esp 0x400 -E aes-cbc <key redacted>;
> add $LOCALNET.62 $LOCALNET.3 esp 0x500 -E aes-cbc <key redacted>;
> spdadd $LOCALNET.1 $LOCALNET.62 any -P in ipsec esp/transport//use;
> spdadd $LOCALNET.62 $LOCALNET.1 any -P out ipsec esp/transport//use;
> spdadd $LOCALNET.3 $LOCALNET.62 any -P in ipsec esp/transport//use;
> spdadd $LOCALNET.62 $LOCALNET.3 any -P out ipsec esp/transport//use;
Ah, ok. Did not bother to double check the related IPs as I thought it
was full ipsec.conf. Everything is okay then.
And here goes the patch (which I've only compile tested so far).
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index af1c173..200f8d7 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1598,7 +1598,8 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy
**pols, int num_pols,
if (err != -EAGAIN)
XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLERROR);
return ERR_PTR(err);
- }
+ } else if (err == 0)
+ return NULL;
dst = xfrm_bundle_create(pols[0], xfrm, err, fl, dst_orig);
if (IS_ERR(dst)) {
@@ -1678,6 +1679,13 @@ xfrm_bundle_lookup(struct net *net, struct flowi
*fl, u16 family, u8 dir,
goto make_dummy_bundle;
dst_hold(&xdst->u.dst);
return oldflo;
+ } else if (new_xdst == NULL) {
+ num_xfrms = 0;
+ if (oldflo == NULL)
+ goto make_dummy_bundle;
+ xdst->num_xfrms = 0;
+ dst_hold(&xdst->u.dst);
+ return oldflo;
}
/* Kill the previous bundle */
@@ -1760,6 +1768,10 @@ restart:
xfrm_pols_put(pols, num_pols);
err = PTR_ERR(xdst);
goto dropdst;
+ } else if (xdst == NULL) {
+ num_xfrms = 0;
+ drop_pols = num_pols;
+ goto no_transform;
}
spin_lock_bh(&xfrm_policy_sk_bundle_lock);
^ permalink raw reply related
* Re: [RFC][PATCH] mac80211_hwsim: No parent is better than an illegimate one.
From: Johannes Berg @ 2010-07-12 6:46 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Andrew Morton, Rafael J. Wysocki, Maciej W. Rozycki, Kay Sievers,
Greg KH, Greg KH <gregkh@suse.de> netdev
In-Reply-To: <m1zky26iaw.fsf_-_@fess.ebiederm.org>
On Thu, 2010-07-08 at 09:37 -0700, Eric W. Biederman wrote:
> Don't call SET_IEEE80211_DEV. This weakens the connections between
> the phy files in sysfs slightly but otherwise it makes the driver work
> in the face of tagged sysfs support.
>
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
> ---
>
> Johannes does this change look usable?
It'll probably work, but anything in userspace relying on it will fail,
and you'll have some unused virtual devices in sysfs? Not too keen on
it, but if we really can't fix it ....
johannes
> drivers/net/wireless/mac80211_hwsim.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
> index 6f8cb3e..b387222 100644
> --- a/drivers/net/wireless/mac80211_hwsim.c
> +++ b/drivers/net/wireless/mac80211_hwsim.c
> @@ -1282,7 +1282,6 @@ static int __init init_mac80211_hwsim(void)
> }
> data->dev->driver = &mac80211_hwsim_driver;
>
> - SET_IEEE80211_DEV(hw, data->dev);
> addr[3] = i >> 8;
> addr[4] = i;
> memcpy(data->addresses[0].addr, addr, ETH_ALEN);
^ permalink raw reply
* Re: [PATCH] at1700: fix double free_irq
From: David Miller @ 2010-07-12 1:15 UTC (permalink / raw)
To: segooon; +Cc: kernel-janitors, jpirko, joe, shemminger, eric.dumazet, netdev
In-Reply-To: <1278678686-7215-1-git-send-email-segooon@gmail.com>
From: Kulikov Vasiliy <segooon@gmail.com>
Date: Fri, 9 Jul 2010 16:31:26 +0400
> free_irq() is called both in net_close() and cleanup_card(). Since it
> is requested in at1700_probe1(), leave free_irq() only in cleanup_card()
> for balance.
>
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH] ac3200: fix error path
From: David Miller @ 2010-07-12 1:15 UTC (permalink / raw)
To: segooon; +Cc: kernel-janitors, joe, netdev
In-Reply-To: <1278678489-7053-1-git-send-email-segooon@gmail.com>
From: Kulikov Vasiliy <segooon@gmail.com>
Date: Fri, 9 Jul 2010 16:28:09 +0400
> Do not call free_irq() if request_irq() failed.
>
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Applied.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox