* Re: [PATCH] Fix panic in ip6_pol_route
From: Krishna Kumar2 @ 2011-04-06 8:10 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20110406.004043.193732725.davem@davemloft.net>
David Miller <davem@davemloft.net> wrote on 04/06/2011 01:10:43 PM:
> > The fix is to not update ip6_null_entry for a vlan device. Please
> > review.
>
> This is just rediculious.
>
> Configuring a vlan on loopback is stupid.
>
> Having IFF_LOOPBACK be set on a loopback device is even more
> stupid.
>
> So fix one of those two things, otherwise we'll just add a million
> tests over time to this conditional.
We had asked the test team for the reason for this test case:
"I suspect that the use of the loopback, is simply due to some of
our images being very limited and the automated test needed an
interface that it could assume would always exist"
Is it better to disallow configuring vlan on lo?
thanks,
- KK
^ permalink raw reply
* Re: [PATCH] Fix panic in ip6_pol_route
From: David Miller @ 2011-04-06 8:21 UTC (permalink / raw)
To: krkumar2; +Cc: netdev
In-Reply-To: <OFCD49CDC4.C2B9408D-ON6525786A.002C2B92-6525786A.002CBDC6@in.ibm.com>
From: Krishna Kumar2 <krkumar2@in.ibm.com>
Date: Wed, 6 Apr 2011 13:40:57 +0530
> Is it better to disallow configuring vlan on lo?
Yes, but the real stinker to me is that the IFF_LOOPBACK flag
propagates to the VLAN device, that really seems even more
wrong to me.
^ permalink raw reply
* Re: [PATCH 00/34] Make kernel build deterministic
From: Ingo Molnar @ 2011-04-06 8:57 UTC (permalink / raw)
To: Artem Bityutskiy
Cc: anil_ravindranath, mchehab, benh, mac, aacraid, linux-mtd,
allan.stephens, hpa, t.sailer, gwingerde, x86, elf, cluster-devel,
ccaulfie, mingo, dougthompson, tipc-discussion, dwmw2,
linux-media, jon.maloy, arnaud.giersch, linux-kbuild, IvDoorn,
teigland, tony.olech, apw, linux-hams, tglx, swhiteho,
linux-arm-kernel, linux-edac, Michal Marek, linux-scsi, netdev,
Greg KH, linux-wireless
In-Reply-To: <1302031447.2608.41.camel@koala>
* Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Tue, 2011-04-05 at 08:49 -0700, Greg KH wrote:
> > On Tue, Apr 05, 2011 at 04:58:47PM +0200, Michal Marek wrote:
> > >
> > > Hi,
> > >
> > > this series makes it possible to build bit-identical kernel image and
> > > modules from identical sources. Of course the build is already
> > > deterministic in terms of behavior of the code, but the various
> > > timestamps embedded in the object files make it hard to compare two
> > > builds, for instance to verify that a makefile cleanup didn't
> > > accidentally change something. A prime example is /proc/config.gz, which
> > > has both a timestamp in the gzip header and a timestamp in the payload
> > > data. With this series applied, a script like this will produce
> > > identical kernels each time:
> >
> > Very nice stuff. Do you want to take the individual patches through one
> > of your trees, or do you mind if the subsystem maintainers take them
> > through theirs?
>
> But unfortunately, it is very easy to break this and for sure it'll be
> broken very soon.
>
> So additionally, I'd suggest:
> 1. Instrument checkpatch.pl and make it err or warn on timestamps.
See the grandparent mail:
checkpatch: Warn about usage of __DATE__, __TIME__ and __TIMESTAMP__
Thanks,
Ingo
^ permalink raw reply
* Re: [PATCH 00/34] Make kernel build deterministic
From: Ingo Molnar @ 2011-04-06 9:01 UTC (permalink / raw)
To: Michal Marek
Cc: anil_ravindranath, mchehab, benh, x86, mac, aacraid, linux-mtd,
allan.stephens, hpa, netdev, t.sailer, gwingerde, IvDoorn, elf,
cluster-devel, ccaulfie, mingo, dougthompson, linux-usb,
linux-media, arnaud.giersch, linux-kbuild, teigland, tony.olech,
apw, linux-hams, tglx, swhiteho, linux-arm-kernel, linux-edac,
jon.maloy, linux-scsi, linuxppc-dev, gregkh, linux-wireless,
linux-kernel
In-Reply-To: <1302015561-21047-1-git-send-email-mmarek@suse.cz>
* Michal Marek <mmarek@suse.cz> wrote:
>
> Hi,
>
> this series makes it possible to build bit-identical kernel image and
> modules from identical sources. Of course the build is already
> deterministic in terms of behavior of the code, but the various
> timestamps embedded in the object files make it hard to compare two
> builds, for instance to verify that a makefile cleanup didn't
> accidentally change something. A prime example is /proc/config.gz, which
> has both a timestamp in the gzip header and a timestamp in the payload
> data. With this series applied, a script like this will produce
> identical kernels each time:
>
> #!/bin/bash
> rm -rf /dev/shm/{source,build}{,1,2}
> export KCONFIG_NOTIMESTAMP=1
> export KBUILD_BUILD_TIMESTAMP='Sun May 1 12:00:00 CEST 2011'
> export KBUILD_BUILD_USER=user
> export KBUILD_BUILD_HOST=host
> export ROOT_DEV=FLOPPY
> for i in 1 2; do
> mkdir /dev/shm/source
> # randomize the inode order just for fun
> git ls-tree -r -z --name-only HEAD | sort -R -z | xargs -0 \
> cp --parents --target=/dev/shm/source
> pushd /dev/shm/source
> mkdir /dev/shm/build
> >/dev/shm/build/all.config
> for opt in GCOV_KERNEL UBIFS_FS_DEBUG; do
> echo "# CONFIG_$opt is not set" >>"/dev/shm/build"/all.config
> done
> make O="/dev/shm/build" KCONFIG_ALLCONFIG=1 allmodconfig
> make O="/dev/shm/build" -j64
> popd
> mv /dev/shm/source /dev/shm/source$i
> mv /dev/shm/build /dev/shm/build$i
> done
> diff -rq /dev/shm/build{1,2}
Nice!
Acked-by: Ingo Molnar <mingo@elte.hu>
> Unfortunatelly, this cannot be used to validate indentation-only
> patches, even if CONFIG_DEBUG_INFO is turned off. This is because of the
> __FILE__ and __LINE__ macros used in many places. For the same reason,
> the source and build directory needs to be the same, otherwise the
> results will differ.
Nor can it be used to validate untrusted patches in general: a subtle change
might be introduced in a piece of code that is dependent on a .config detail
that is off for that particular build.
But in the common case it's nice to be able to have deterministic/reproducable
builds.
Thanks,
Ingo
^ permalink raw reply
* [Patch] isdn: remove deprecated ISDN_CAPI_CAPIFS
From: Amerigo Wang @ 2011-04-06 9:05 UTC (permalink / raw)
To: netdev; +Cc: Karsten Keil, David S. Miller, Jan Kiszka, WANG Cong
Cc: Jan Kiszka <jan.kiszka@web.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: WANG Cong <amwang@redhat.com>
--
Documentation/feature-removal-schedule.txt | 10 --
drivers/isdn/capi/Kconfig | 15 --
drivers/isdn/capi/Makefile | 1 -
drivers/isdn/capi/capi.c | 4 +-
drivers/isdn/capi/capifs.c | 239 ----------------------------
drivers/isdn/capi/capifs.h | 28 ----
6 files changed, 1 insertions(+), 296 deletions(-)
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 274b32d..e38ccae 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -425,16 +425,6 @@ Who: anybody or Florian Mickler <florian@mickler.org>
----------------------------
-What: capifs
-When: February 2011
-Files: drivers/isdn/capi/capifs.*
-Why: udev fully replaces this special file system that only contains CAPI
- NCCI TTY device nodes. User space (pppdcapiplugin) works without
- noticing the difference.
-Who: Jan Kiszka <jan.kiszka@web.de>
-
-----------------------------
-
What: KVM paravirt mmu host support
When: January 2011
Why: The paravirt mmu host support is slower than non-paravirt mmu, both
diff --git a/drivers/isdn/capi/Kconfig b/drivers/isdn/capi/Kconfig
index a168e8a..15c3ffd 100644
--- a/drivers/isdn/capi/Kconfig
+++ b/drivers/isdn/capi/Kconfig
@@ -33,21 +33,6 @@ config ISDN_CAPI_CAPI20
standardized libcapi20 to access this functionality. You should say
Y/M here.
-config ISDN_CAPI_CAPIFS_BOOL
- bool "CAPI2.0 filesystem support (DEPRECATED)"
- depends on ISDN_CAPI_MIDDLEWARE && ISDN_CAPI_CAPI20
- help
- This option provides a special file system, similar to /dev/pts with
- device nodes for the special ttys established by using the
- middleware extension above.
- You no longer need this, udev fully replaces it. This feature is
- scheduled for removal.
-
-config ISDN_CAPI_CAPIFS
- tristate
- depends on ISDN_CAPI_CAPIFS_BOOL
- default ISDN_CAPI_CAPI20
-
config ISDN_CAPI_CAPIDRV
tristate "CAPI2.0 capidrv interface support"
depends on ISDN_I4L
diff --git a/drivers/isdn/capi/Makefile b/drivers/isdn/capi/Makefile
index 57123e3..4d5b4b7 100644
--- a/drivers/isdn/capi/Makefile
+++ b/drivers/isdn/capi/Makefile
@@ -7,7 +7,6 @@
obj-$(CONFIG_ISDN_CAPI) += kernelcapi.o
obj-$(CONFIG_ISDN_CAPI_CAPI20) += capi.o
obj-$(CONFIG_ISDN_CAPI_CAPIDRV) += capidrv.o
-obj-$(CONFIG_ISDN_CAPI_CAPIFS) += capifs.o
# Multipart objects.
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 0d70883..b16e845 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1514,9 +1514,7 @@ static int __init capi_init(void)
proc_init();
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
- compileinfo = " (middleware+capifs)";
-#elif defined(CONFIG_ISDN_CAPI_MIDDLEWARE)
+#if defined(CONFIG_ISDN_CAPI_MIDDLEWARE)
compileinfo = " (no capifs)";
#else
compileinfo = " (no middleware)";
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c
deleted file mode 100644
index b4faed7..0000000
--- a/drivers/isdn/capi/capifs.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/* $Id: capifs.c,v 1.1.2.3 2004/01/16 21:09:26 keil Exp $
- *
- * Copyright 2000 by Carsten Paeth <calle@calle.de>
- *
- * Heavily based on devpts filesystem from H. Peter Anvin
- *
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- *
- */
-
-#include <linux/fs.h>
-#include <linux/mount.h>
-#include <linux/slab.h>
-#include <linux/namei.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/ctype.h>
-#include <linux/sched.h> /* current */
-
-#include "capifs.h"
-
-MODULE_DESCRIPTION("CAPI4Linux: /dev/capi/ filesystem");
-MODULE_AUTHOR("Carsten Paeth");
-MODULE_LICENSE("GPL");
-
-/* ------------------------------------------------------------------ */
-
-#define CAPIFS_SUPER_MAGIC (('C'<<8)|'N')
-
-static struct vfsmount *capifs_mnt;
-static int capifs_mnt_count;
-
-static struct {
- int setuid;
- int setgid;
- uid_t uid;
- gid_t gid;
- umode_t mode;
-} config = {.mode = 0600};
-
-/* ------------------------------------------------------------------ */
-
-static int capifs_remount(struct super_block *s, int *flags, char *data)
-{
- int setuid = 0;
- int setgid = 0;
- uid_t uid = 0;
- gid_t gid = 0;
- umode_t mode = 0600;
- char *this_char;
- char *new_opt = kstrdup(data, GFP_KERNEL);
-
- this_char = NULL;
- while ((this_char = strsep(&data, ",")) != NULL) {
- int n;
- char dummy;
- if (!*this_char)
- continue;
- if (sscanf(this_char, "uid=%i%c", &n, &dummy) == 1) {
- setuid = 1;
- uid = n;
- } else if (sscanf(this_char, "gid=%i%c", &n, &dummy) == 1) {
- setgid = 1;
- gid = n;
- } else if (sscanf(this_char, "mode=%o%c", &n, &dummy) == 1)
- mode = n & ~S_IFMT;
- else {
- kfree(new_opt);
- printk("capifs: called with bogus options\n");
- return -EINVAL;
- }
- }
-
- mutex_lock(&s->s_root->d_inode->i_mutex);
-
- replace_mount_options(s, new_opt);
- config.setuid = setuid;
- config.setgid = setgid;
- config.uid = uid;
- config.gid = gid;
- config.mode = mode;
-
- mutex_unlock(&s->s_root->d_inode->i_mutex);
-
- return 0;
-}
-
-static const struct super_operations capifs_sops =
-{
- .statfs = simple_statfs,
- .remount_fs = capifs_remount,
- .show_options = generic_show_options,
-};
-
-
-static int
-capifs_fill_super(struct super_block *s, void *data, int silent)
-{
- struct inode * inode;
-
- s->s_blocksize = 1024;
- s->s_blocksize_bits = 10;
- s->s_magic = CAPIFS_SUPER_MAGIC;
- s->s_op = &capifs_sops;
- s->s_time_gran = 1;
-
- inode = new_inode(s);
- if (!inode)
- goto fail;
- inode->i_ino = 1;
- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
- inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
- inode->i_op = &simple_dir_inode_operations;
- inode->i_fop = &simple_dir_operations;
- inode->i_nlink = 2;
-
- s->s_root = d_alloc_root(inode);
- if (s->s_root)
- return 0;
-
- printk("capifs: get root dentry failed\n");
- iput(inode);
-fail:
- return -ENOMEM;
-}
-
-static struct dentry *capifs_mount(struct file_system_type *fs_type,
- int flags, const char *dev_name, void *data)
-{
- return mount_single(fs_type, flags, data, capifs_fill_super);
-}
-
-static struct file_system_type capifs_fs_type = {
- .owner = THIS_MODULE,
- .name = "capifs",
- .mount = capifs_mount,
- .kill_sb = kill_anon_super,
-};
-
-static struct dentry *new_ncci(unsigned int number, dev_t device)
-{
- struct super_block *s = capifs_mnt->mnt_sb;
- struct dentry *root = s->s_root;
- struct dentry *dentry;
- struct inode *inode;
- char name[10];
- int namelen;
-
- mutex_lock(&root->d_inode->i_mutex);
-
- namelen = sprintf(name, "%d", number);
- dentry = lookup_one_len(name, root, namelen);
- if (IS_ERR(dentry)) {
- dentry = NULL;
- goto unlock_out;
- }
-
- if (dentry->d_inode) {
- dput(dentry);
- dentry = NULL;
- goto unlock_out;
- }
-
- inode = new_inode(s);
- if (!inode) {
- dput(dentry);
- dentry = NULL;
- goto unlock_out;
- }
-
- /* config contents is protected by root's i_mutex */
- inode->i_uid = config.setuid ? config.uid : current_fsuid();
- inode->i_gid = config.setgid ? config.gid : current_fsgid();
- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
- inode->i_ino = number + 2;
- init_special_inode(inode, S_IFCHR|config.mode, device);
-
- d_instantiate(dentry, inode);
- dget(dentry);
-
-unlock_out:
- mutex_unlock(&root->d_inode->i_mutex);
-
- return dentry;
-}
-
-struct dentry *capifs_new_ncci(unsigned int number, dev_t device)
-{
- struct dentry *dentry;
-
- if (simple_pin_fs(&capifs_fs_type, &capifs_mnt, &capifs_mnt_count) < 0)
- return NULL;
-
- dentry = new_ncci(number, device);
- if (!dentry)
- simple_release_fs(&capifs_mnt, &capifs_mnt_count);
-
- return dentry;
-}
-
-void capifs_free_ncci(struct dentry *dentry)
-{
- struct dentry *root = capifs_mnt->mnt_sb->s_root;
- struct inode *inode;
-
- if (!dentry)
- return;
-
- mutex_lock(&root->d_inode->i_mutex);
-
- inode = dentry->d_inode;
- if (inode) {
- drop_nlink(inode);
- d_delete(dentry);
- dput(dentry);
- }
- dput(dentry);
-
- mutex_unlock(&root->d_inode->i_mutex);
-
- simple_release_fs(&capifs_mnt, &capifs_mnt_count);
-}
-
-static int __init capifs_init(void)
-{
- return register_filesystem(&capifs_fs_type);
-}
-
-static void __exit capifs_exit(void)
-{
- unregister_filesystem(&capifs_fs_type);
-}
-
-EXPORT_SYMBOL(capifs_new_ncci);
-EXPORT_SYMBOL(capifs_free_ncci);
-
-module_init(capifs_init);
-module_exit(capifs_exit);
diff --git a/drivers/isdn/capi/capifs.h b/drivers/isdn/capi/capifs.h
deleted file mode 100644
index e193d11..0000000
--- a/drivers/isdn/capi/capifs.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* $Id: capifs.h,v 1.1.2.2 2004/01/16 21:09:26 keil Exp $
- *
- * Copyright 2000 by Carsten Paeth <calle@calle.de>
- *
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- *
- */
-
-#include <linux/dcache.h>
-
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
-
-struct dentry *capifs_new_ncci(unsigned int num, dev_t device);
-void capifs_free_ncci(struct dentry *dentry);
-
-#else
-
-static inline struct dentry *capifs_new_ncci(unsigned int num, dev_t device)
-{
- return NULL;
-}
-
-static inline void capifs_free_ncci(struct dentry *dentry)
-{
-}
-
-#endif
^ permalink raw reply related
* Re: [PATCH 00/34] Make kernel build deterministic
From: Michal Marek @ 2011-04-06 9:07 UTC (permalink / raw)
To: dedekind1
Cc: anil_ravindranath, mchehab, benh, mac, aacraid, linux-mtd,
allan.stephens, hpa, t.sailer, gwingerde, x86, elf, cluster-devel,
ccaulfie, mingo, dougthompson, tipc-discussion, dwmw2,
linux-media, arnaud.giersch, linux-kbuild, IvDoorn, teigland,
tony.olech, apw, linux-hams, tglx, swhiteho, linux-arm-kernel,
linux-edac, jon.maloy, linux-scsi, netdev, Greg KH,
linux-wireless, linux-kernel@
In-Reply-To: <1302031447.2608.41.camel@koala>
On 5.4.2011 21:24, Artem Bityutskiy wrote:
> On Tue, 2011-04-05 at 08:49 -0700, Greg KH wrote:
>> On Tue, Apr 05, 2011 at 04:58:47PM +0200, Michal Marek wrote:
>>>
>>> Hi,
>>>
>>> this series makes it possible to build bit-identical kernel image and
>>> modules from identical sources. Of course the build is already
>>> deterministic in terms of behavior of the code, but the various
>>> timestamps embedded in the object files make it hard to compare two
>>> builds, for instance to verify that a makefile cleanup didn't
>>> accidentally change something. A prime example is /proc/config.gz, which
>>> has both a timestamp in the gzip header and a timestamp in the payload
>>> data. With this series applied, a script like this will produce
>>> identical kernels each time:
>>
>> Very nice stuff. Do you want to take the individual patches through one
>> of your trees, or do you mind if the subsystem maintainers take them
>> through theirs?
>
> But unfortunately, it is very easy to break this and for sure it'll be
> broken very soon.
I'm not so pessimistic. 34 patches and 57 files might sound like a lot,
but given that this has been accumulating since day one, the cleanup
should last for some time.
> So additionally, I'd suggest:
> 1. Instrument checkpatch.pl and make it err or warn on timestamps.
This is patch 34/34 in this series: https://lkml.org/lkml/2011/4/5/198
> 2. Probably instrument linux-next to rise a warning when people break
> this.
I'm not sure if Stephen has that much spare time, and I don't think it
is necessary. I think the checkpatch check is sufficient and I'll check
myself occasionally.
Michal
^ permalink raw reply
* Re: [PATCH 00/34] Make kernel build deterministic
From: Michal Marek @ 2011-04-06 9:23 UTC (permalink / raw)
To: Greg KH
Cc: anil_ravindranath, mchehab, benh, x86, mac, aacraid, linux-mtd,
allan.stephens, hpa, netdev, t.sailer, gwingerde, IvDoorn, elf,
cluster-devel, ccaulfie, mingo, dougthompson, linux-media,
arnaud.giersch, linux-kbuild, teigland, tony.olech, apw,
linux-hams, tglx, swhiteho, linux-arm-kernel, linux-edac,
jon.maloy, linux-scsi, linuxppc-dev, linux-usb, linux-wireless,
linux-kernel, bluesmoke-
In-Reply-To: <20110405154918.GA31337@suse.de>
On 5.4.2011 17:49, Greg KH wrote:
> Very nice stuff. Do you want to take the individual patches through one
> of your trees, or do you mind if the subsystem maintainers take them
> through theirs?
I'd leave it up to the subsystem maintainers. I'll check once the merge
window opens and send the remaining patches to Linus directly.
Michal
^ permalink raw reply
* Re: [PATCH 00/34] Make kernel build deterministic
From: Artem Bityutskiy @ 2011-04-06 9:25 UTC (permalink / raw)
To: Michal Marek
Cc: anil_ravindranath, mchehab, benh, mac, aacraid, linux-mtd,
allan.stephens, hpa, t.sailer, gwingerde, x86, elf, cluster-devel,
ccaulfie, mingo, dougthompson, tipc-discussion, dwmw2,
linux-media, arnaud.giersch, linux-kbuild, IvDoorn, teigland,
tony.olech, apw, linux-hams, tglx, swhiteho, linux-arm-kernel,
linux-edac, jon.maloy, linux-scsi, netdev, Greg KH,
linux-wireless, linux-kernel@
In-Reply-To: <4D9C2D56.70700@suse.cz>
On Wed, 2011-04-06 at 11:07 +0200, Michal Marek wrote:
> > So additionally, I'd suggest:
> > 1. Instrument checkpatch.pl and make it err or warn on timestamps.
>
> This is patch 34/34 in this series: https://lkml.org/lkml/2011/4/5/198
Yeah, great, did not notice, thanks!
> > 2. Probably instrument linux-next to rise a warning when people break
> > this.
>
> I'm not sure if Stephen has that much spare time, and I don't think it
> is necessary. I think the checkpatch check is sufficient and I'll check
> myself occasionally.
Yes, that's fine, I just wanted to speak this out - there is a
probability that someone gets excited and creates some instrumentation
to kbuild to automatically detect bad things and then Stephen could
easily use that.
WRT "not necessary" - well, I think it is always better to cut bad
things before they are merged, rather than afterwards.
But anyway, let's forget about this.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH net-next-2.6 v2] can: convert protocol handling to RCU
From: Kurt Van Dijck @ 2011-04-06 9:27 UTC (permalink / raw)
To: Oliver Hartkopp
Cc: David Miller, Linux Netdev List, Eric Dumazet, Urs Thuermann
In-Reply-To: <4D9B58EC.9090903@hartkopp.net>
On Tue, Apr 05, 2011 at 08:01:16PM +0200, Oliver Hartkopp wrote:
> This patch removes spin_locks at CAN socket creation time by using RCU.
Good thing.
I'm interested in RCU also for my J1939 code.
I do have some questions below. These are mainly since I'm not yet used
to RCU. Btw, I must have missed v1 of the patch, so I may ask 'already
resolved' things...
>
>
> +static struct can_proto *can_try_module_get(int protocol)
> +{
> + struct can_proto *cp;
> +
> + rcu_read_lock();
> + cp = rcu_dereference(proto_tab[protocol]);
> + if (cp && !try_module_get(cp->prot->owner))
After the xxx_get, is the 'cp' pointer persistent?
> + cp = NULL;
> + rcu_read_unlock();
> +
> + return cp;
> +}
> +
> static int can_create(struct net *net, struct socket *sock, int protocol,
> int kern)
> {
> @@ -130,9 +143,12 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
> if (!net_eq(net, &init_net))
> return -EAFNOSUPPORT;
>
> + cp = can_try_module_get(protocol);
> +
>
[...]
> /* check for available protocol and correct usage */
>
> if (!cp)
> return -EPROTONOSUPPORT;
>
> if (cp->type != sock->type) {
I don't see how this will evaluate to true?
can_proto_register takes care of it.
> - err = -EPROTONOSUPPORT;
> + err = -EPROTOTYPE;
> goto errout;
> }
>
^ permalink raw reply
* [Patch] iwlwifi: remove obsoleted module alias and parameters
From: Amerigo Wang @ 2011-04-06 9:49 UTC (permalink / raw)
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Intel Linux Wireless,
Johannes Berg, John W. Linville, Wey-Yi Guy, Stanislaw Gruszka,
Meenakshi Venkataraman, Larry Finger, WANG Cong
As scheduled in Documentation/feature-removal-schedule.txt,
remove "*50", "disable_hw_scan" module parameters and MODULE_ALIAS("iwl4965").
Cc: Intel Linux Wireless <ilw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Cc: Wey-Yi Guy <wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Meenakshi Venkataraman <meenakshi.venkataraman-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Signed-off-by: WANG Cong <amwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
Documentation/feature-removal-schedule.txt | 31 --------------------------
drivers/net/wireless/iwlegacy/iwl-core.c | 3 +-
drivers/net/wireless/iwlegacy/iwl-core.h | 1 -
drivers/net/wireless/iwlegacy/iwl3945-base.c | 13 -----------
drivers/net/wireless/iwlegacy/iwl4965-base.c | 1 -
drivers/net/wireless/iwlwifi/iwl-agn.c | 30 -------------------------
drivers/net/wireless/iwlwifi/iwl-core.h | 1 -
7 files changed, 1 insertions(+), 79 deletions(-)
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 274b32d..5037d0d 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -444,27 +444,6 @@ Who: Avi Kivity <avi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
----------------------------
-What: iwlwifi 50XX module parameters
-When: 2.6.40
-Why: The "..50" modules parameters were used to configure 5000 series and
- up devices; different set of module parameters also available for 4965
- with same functionalities. Consolidate both set into single place
- in drivers/net/wireless/iwlwifi/iwl-agn.c
-
-Who: Wey-Yi Guy <wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
-
-----------------------------
-
-What: iwl4965 alias support
-When: 2.6.40
-Why: Internal alias support has been present in module-init-tools for some
- time, the MODULE_ALIAS("iwl4965") boilerplate aliases can be removed
- with no impact.
-
-Who: Wey-Yi Guy <wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
-
----------------------------
-
What: xt_NOTRACK
Files: net/netfilter/xt_NOTRACK.c
When: April 2011
@@ -521,16 +500,6 @@ Who: Daniel Lezcano <daniel.lezcano-GANU6spQydw@public.gmane.org>
----------------------------
-What: iwlwifi disable_hw_scan module parameters
-When: 2.6.40
-Why: Hareware scan is the prefer method for iwlwifi devices for
- scanning operation. Remove software scan support for all the
- iwlwifi devices.
-
-Who: Wey-Yi Guy <wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
-
-----------------------------
-
What: access to nfsd auth cache through sys_nfsservctl or '.' files
in the 'nfsd' filesystem.
When: 2.6.40
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c
index a209a0e..9fd851f 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.c
+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
@@ -2112,8 +2112,7 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed)
IWL_DEBUG_MAC80211(priv, "enter to channel %d changed 0x%X\n",
channel->hw_value, changed);
- if (unlikely(!priv->cfg->mod_params->disable_hw_scan &&
- test_bit(STATUS_SCANNING, &priv->status))) {
+ if (unlikely(test_bit(STATUS_SCANNING, &priv->status))) {
scan_active = 1;
IWL_DEBUG_MAC80211(priv, "leave - scanning\n");
}
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.h b/drivers/net/wireless/iwlegacy/iwl-core.h
index f03b463..3fc77b7 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.h
+++ b/drivers/net/wireless/iwlegacy/iwl-core.h
@@ -194,7 +194,6 @@ struct iwl_ops {
struct iwl_mod_params {
int sw_crypto; /* def: 0 = using hardware encryption */
- int disable_hw_scan; /* def: 0 = use h/w scan */
int num_of_queues; /* def: HW dependent */
int disable_11n; /* def: 0 = 11n capabilities enabled */
int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c
index 28eb3d8..57df37c 100644
--- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
@@ -93,7 +93,6 @@ MODULE_LICENSE("GPL");
struct iwl_mod_params iwl3945_mod_params = {
.sw_crypto = 1,
.restart_fw = 1,
- .disable_hw_scan = 1,
/* the rest are 0 by default */
};
@@ -3956,15 +3955,6 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
priv->contexts[IWL_RXON_CTX_BSS].station_devtype = RXON_DEV_TYPE_ESS;
priv->contexts[IWL_RXON_CTX_BSS].unused_devtype = RXON_DEV_TYPE_ESS;
- /*
- * Disabling hardware scan means that mac80211 will perform scans
- * "the hard way", rather than using device's scan.
- */
- if (iwl3945_mod_params.disable_hw_scan) {
- IWL_DEBUG_INFO(priv, "Disabling hw_scan\n");
- iwl3945_hw_ops.hw_scan = NULL;
- }
-
IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n");
priv->cfg = cfg;
priv->pci_dev = pdev;
@@ -4278,9 +4268,6 @@ MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])");
module_param_named(swcrypto, iwl3945_mod_params.sw_crypto, int, S_IRUGO);
MODULE_PARM_DESC(swcrypto,
"using software crypto (default 1 [software])");
-module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan,
- int, S_IRUGO);
-MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)");
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUG
module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "debug output mask");
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c
index 91b3d8b..2801d87 100644
--- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
@@ -86,7 +86,6 @@ MODULE_DESCRIPTION(DRV_DESCRIPTION);
MODULE_VERSION(DRV_VERSION);
MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR);
MODULE_LICENSE("GPL");
-MODULE_ALIAS("iwl4965");
void iwl4965_update_chain_flags(struct iwl_priv *priv)
{
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 321b18b..f58571b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3968,14 +3968,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
* 1. Allocating HW data
************************/
- /* Disabling hardware scan means that mac80211 will perform scans
- * "the hard way", rather than using device's scan. */
- if (cfg->mod_params->disable_hw_scan) {
- dev_printk(KERN_DEBUG, &(pdev->dev),
- "sw scan support is deprecated\n");
- iwlagn_hw_ops.hw_scan = NULL;
- }
-
hw = iwl_alloc_all(cfg);
if (!hw) {
err = -ENOMEM;
@@ -4585,43 +4577,21 @@ module_exit(iwl_exit);
module_init(iwl_init);
#ifdef CONFIG_IWLWIFI_DEBUG
-module_param_named(debug50, iwl_debug_level, uint, S_IRUGO);
-MODULE_PARM_DESC(debug50, "50XX debug output mask (deprecated)");
module_param_named(debug, iwl_debug_level, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "debug output mask");
#endif
-module_param_named(swcrypto50, iwlagn_mod_params.sw_crypto, bool, S_IRUGO);
-MODULE_PARM_DESC(swcrypto50,
- "using crypto in software (default 0 [hardware]) (deprecated)");
module_param_named(swcrypto, iwlagn_mod_params.sw_crypto, int, S_IRUGO);
MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])");
-module_param_named(queues_num50,
- iwlagn_mod_params.num_of_queues, int, S_IRUGO);
-MODULE_PARM_DESC(queues_num50,
- "number of hw queues in 50xx series (deprecated)");
module_param_named(queues_num, iwlagn_mod_params.num_of_queues, int, S_IRUGO);
MODULE_PARM_DESC(queues_num, "number of hw queues.");
-module_param_named(11n_disable50, iwlagn_mod_params.disable_11n, int, S_IRUGO);
-MODULE_PARM_DESC(11n_disable50, "disable 50XX 11n functionality (deprecated)");
module_param_named(11n_disable, iwlagn_mod_params.disable_11n, int, S_IRUGO);
MODULE_PARM_DESC(11n_disable, "disable 11n functionality");
-module_param_named(amsdu_size_8K50, iwlagn_mod_params.amsdu_size_8K,
- int, S_IRUGO);
-MODULE_PARM_DESC(amsdu_size_8K50,
- "enable 8K amsdu size in 50XX series (deprecated)");
module_param_named(amsdu_size_8K, iwlagn_mod_params.amsdu_size_8K,
int, S_IRUGO);
MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size");
-module_param_named(fw_restart50, iwlagn_mod_params.restart_fw, int, S_IRUGO);
-MODULE_PARM_DESC(fw_restart50,
- "restart firmware in case of error (deprecated)");
module_param_named(fw_restart, iwlagn_mod_params.restart_fw, int, S_IRUGO);
MODULE_PARM_DESC(fw_restart, "restart firmware in case of error");
-module_param_named(
- disable_hw_scan, iwlagn_mod_params.disable_hw_scan, int, S_IRUGO);
-MODULE_PARM_DESC(disable_hw_scan,
- "disable hardware scanning (default 0) (deprecated)");
module_param_named(ucode_alternative, iwlagn_wanted_ucode_alternative, int,
S_IRUGO);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index b316d83..2396da5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -252,7 +252,6 @@ struct iwl_ops {
struct iwl_mod_params {
int sw_crypto; /* def: 0 = using hardware encryption */
- int disable_hw_scan; /* def: 0 = use h/w scan */
int num_of_queues; /* def: HW dependent */
int disable_11n; /* def: 0 = 11n capabilities enabled */
int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */
--
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
* Re: [Patch] iwlwifi: remove obsoleted module alias and parameters
From: Johannes Berg @ 2011-04-06 10:09 UTC (permalink / raw)
To: Amerigo Wang
Cc: linux-wireless, netdev, Intel Linux Wireless, John W. Linville,
Wey-Yi Guy, Stanislaw Gruszka, Meenakshi Venkataraman,
Larry Finger
In-Reply-To: <1302083382-6715-1-git-send-email-amwang@redhat.com>
On Wed, 2011-04-06 at 17:49 +0800, Amerigo Wang wrote:
> As scheduled in Documentation/feature-removal-schedule.txt,
> remove "*50", "disable_hw_scan" module parameters and MODULE_ALIAS("iwl4965").
Mostly fine, but for iwlegacy Stanislaw we want to keep hw scan (and it
was actually made default now)
johannes
^ permalink raw reply
* Re: [PATCH 01/20] net-core: extending (hw_/wanted_/vlan_)features fields to a bitmap.
From: Michał Mirosław @ 2011-04-06 10:29 UTC (permalink / raw)
To: Mahesh Bandewar; +Cc: David Miller, netdev
In-Reply-To: <1302050665-10460-2-git-send-email-maheshb@google.com>
2011/4/6 Mahesh Bandewar <maheshb@google.com>:
> Converting current use of (hw_/wanted_/vlan_)features to
> legacy_(hw_/wanted_/vlan_)features to differntiate from the proposed usage.
>
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
> ---
> include/linux/netdevice.h | 110 +++++++++++++++++++++++++++++++-------------
> net/core/dev.c | 51 +++++++++++----------
> net/core/ethtool.c | 97 ++++++++++++++++++++-------------------
> net/core/net-sysfs.c | 4 +-
> net/core/sock.c | 2 +-
> 5 files changed, 155 insertions(+), 109 deletions(-)
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 09d2624..637bf2a 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -980,6 +980,42 @@ struct net_device_ops {
> u32 features);
> };
>
> +enum netdev_features {
> + NETIF_F_SG_BIT, /* Scatter/gather IO. */
> + NETIF_F_IP_CSUM_BIT, /* Can checksum TCP/UDP over IPv4. */
> + NETIF_F_NO_CSUM_BIT, /* Does not require checksum. F.e. loopack. */
> + NETIF_F_HW_CSUM_BIT, /* Can checksum all the packets. */
> + NETIF_F_IPV6_CSUM_BIT, /* Can checksum TCP/UDP over IPV6 */
> + NETIF_F_HIGHDMA_BIT, /* Can DMA to high memory. */
> + NETIF_F_FRAGLIST_BIT, /* Scatter/gather IO. */
> + NETIF_F_HW_VLAN_TX_BIT, /* Transmit VLAN hw acceleration */
> + NETIF_F_HW_VLAN_RX_BIT, /* Receive VLAN hw acceleration */
> + NETIF_F_HW_VLAN_FILTER_BIT, /* Receive filtering on VLAN */
> + NETIF_F_VLAN_CHALLENGED_BIT, /* Device cannot handle VLAN packets */
> + NETIF_F_GSO_BIT, /* Enable software GSO. */
> + NETIF_F_LLTX_BIT, /* LockLess TX - deprecated. Please */
> + /* do not use LLTX in new drivers */
> + NETIF_F_NETNS_LOCAL_BIT, /* Does not change network namespaces */
> + NETIF_F_GRO_BIT, /* Generic receive offload */
> + NETIF_F_LRO_BIT, /* large receive offload */
> + /* the GSO_MASK reserves bits 16 through 23 */
> + RESERVED1_BIT,
> + RESERVED2_BIT,
> + RESERVED3_BIT,
> + RESERVED4_BIT,
> + RESERVED5_BIT,
> + RESERVED6_BIT,
> + RESERVED7_BIT,
> + RESERVED8_BIT,
> + NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */
> + NETIF_F_SCTP_CSUM_BIT, /* SCTP checksum offload */
> + NETIF_F_FCOE_MTU_BIT, /* Supports max FCoE MTU, 2158 bytes*/
> + NETIF_F_NTUPLE_BIT, /* N-tuple filters supported */
> + NETIF_F_RXHASH_BIT, /* Receive hashing offload */
> + NETIF_F_RXCSUM_BIT, /* Receive checksumming offload */
> + NETIF_F_NOCACHE_COPY_BIT, /* Use no-cache copyfromuser */
> +};
> +
This should be a separate cleanup patch. And after that, for the
conversion you would add as a last entry:
NETIF_F_NUM_BITS and use it later (see below).
> /*
> * The DEVICE structure.
> * Actually, this whole structure is a big mistake. It mixes I/O
> @@ -1029,44 +1065,51 @@ struct net_device {
> struct list_head napi_list;
> struct list_head unreg_list;
>
> +#define DEV_FEATURE_WORDS 2
> +#define DEV_FEATURE_BITS (DEV_FEATURE_WORDS*sizeof(long)*BITS_PER_BYTE)
> +#define LEGACY_FEATURE_WORD 0
> +
#define DEV_FEATURE_WORDS BITS_TO_LONGS(NETIF_F_NUM_BITS)
#define DEV_FEATURE_BITS (DEV_FEATURE_WORDS*BITS_PER_LONG)
Though using bitmaps will make a mess for 32 versus 64 bit archs. It
would be better to stick to u32 as the base type instead of long.
[...]
> @@ -2376,13 +2419,13 @@ static inline void netif_tx_unlock_bh(struct net_device *dev)
> }
>
> #define HARD_TX_LOCK(dev, txq, cpu) { \
> - if ((dev->features & NETIF_F_LLTX) == 0) { \
> + if ((dev->legacy_features & NETIF_F_LLTX) == 0) { \
[...]
For those type of conversion there is really no point in using the
macro. Changing it to
dev->features[0] instead of dev->legacy_features needs the same effort
but avoids the
cleanup later. Flags in other feature words could have names line
NETIF_F2_xxx so that
it would be clear in which word they belong.
Best Regards,
Michał Mirosław
^ permalink raw reply
* Re: [Patch] iwlwifi: remove obsoleted module alias and parameters
From: Cong Wang @ 2011-04-06 10:42 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, netdev, Intel Linux Wireless, John W. Linville,
Wey-Yi Guy, Stanislaw Gruszka, Meenakshi Venkataraman,
Larry Finger
In-Reply-To: <1302084582.3811.9.camel@jlt3.sipsolutions.net>
于 2011年04月06日 18:09, Johannes Berg 写道:
> On Wed, 2011-04-06 at 17:49 +0800, Amerigo Wang wrote:
>> As scheduled in Documentation/feature-removal-schedule.txt,
>> remove "*50", "disable_hw_scan" module parameters and MODULE_ALIAS("iwl4965").
>
> Mostly fine, but for iwlegacy Stanislaw we want to keep hw scan (and it
> was actually made default now)
>
Ok, I will wait for Stanislaw's response and then send an updated patch.
Thanks.
^ permalink raw reply
* RE: [PATCH net-next-2.6 12/12] qlcnic: convert to set_phys_id
From: Amit Salecha @ 2011-04-06 10:47 UTC (permalink / raw)
To: Stephen Hemminger, David S. Miller, Ben Hutchings,
Anirban Chakraborty
Cc: netdev@vger.kernel.org, Sucheta Chakraborty
In-Reply-To: <20110404184502.382340801@linuxplumber.net>
> + ret = adapter->nic_ops->config_led(adapter, 1, 0xf);
> if (ret) {
> - clear_bit(__QLCNIC_RESETTING, &adapter->state);
> - return ret;
> + dev_err(&adapter->pdev->dev,
> + "Failed to set LED blink state.\n");
> + break;
> }
> - }
> -
> - ret = adapter->nic_ops->config_led(adapter, 1, 0xf);
> - if (ret) {
> - dev_err(&adapter->pdev->dev,
> - "Failed to set LED blink state.\n");
> - goto done;
> - }
> + return 0;
>
> - msleep_interruptible(val * 1000);
> + case ETHTOOL_ID_INACTIVE:
> + ret = adapter->nic_ops->config_led(adapter, 0, 0xf);
> + if (ret)
> + dev_err(&adapter->pdev->dev,
> + "Failed to reset LED blink state.\n");
> + break;
>
> - ret = adapter->nic_ops->config_led(adapter, 0, 0xf);
> - if (ret) {
> - dev_err(&adapter->pdev->dev,
> - "Failed to reset LED blink state.\n");
> - goto done;
> + default:
> + return -EINVAL;
> }
>
> -done:
> - if (dev_down) {
> + if (!netif_running(dev)) {
> qlcnic_diag_free_res(dev, max_sds_rings);
> clear_bit(__QLCNIC_RESETTING, &adapter->state);
> }
> - return ret;
>
> + return ret;
> }
>
"return ret" is return value of adapter->nic_ops->config_led, which can return any Error value.
And you have special check for -EINVAL. Though currently config_led doesn't return -EINVAL, but in future it may break (as 'ret' comes from config_led() -> send_cmd_desc()).
So it will be better if you return some hard code error value instead of 'ret'.
This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
^ permalink raw reply
* Correct procedure to close an in-kernel TCP socket
From: Martin Lucina @ 2011-04-06 11:55 UTC (permalink / raw)
To: netdev; +Cc: Martin Sustrik
Hi,
We're having some problems with code that uses in-kernel TCP sockets
created with sock_create_kern().
At the moment we are doing this when closing a socket:
write_lock_bh(&s->sk->sk_callback_lock);
s->sk->sk_state_change = old_sk_state_change;
s->sk->sk_data_ready = old_sk_data_ready;
s->sk->sk_write_space = old_sk_write_space;
write_unlock_bh(&s->sk->sk_callback_lock);
/* ... */
sock_release(s);
We then see that at some point in the future our s->sk->sk_state_change
callback is still being called despite the code above restoring the
original values.
Is there something we're doing wrong?
Thanks,
-mato
^ permalink raw reply
* Re: [PATCH] netfilter: Fix build failure when ipv6 but xt_tproxy is built in
From: KOVACS Krisztian @ 2011-04-06 12:08 UTC (permalink / raw)
To: Patrick McHardy
Cc: David Miller, rostedt, linux-kernel, akpm, netfilter-devel,
netdev
In-Reply-To: <4D9B2BF2.2010606@trash.net>
Hi,
On 04/05/2011 04:49 PM, Patrick McHardy wrote:
>> What about something like this?
>>
>> diff --git a/net/netfilter/xt_TPROXY.c b/net/netfilter/xt_TPROXY.c
>> index dcfd57e..1ef0e56 100644
>> --- a/net/netfilter/xt_TPROXY.c
>> +++ b/net/netfilter/xt_TPROXY.c
>> @@ -283,10 +283,10 @@ tproxy_tg6_v1(struct sk_buff *skb, const struct xt_action_param *par)
>> const struct in6_addr *laddr;
>> __be16 lport;
>> int thoff;
>> - int tproto;
>> + u8 tproto = iph->nexthdr;
>>
>> - tproto = ipv6_find_hdr(skb, &thoff, -1, NULL);
>> - if (tproto < 0) {
>> + thoff = ipv6_skip_exthdr(skb, sizeof(*iph), &tproto);
>> + if (thoff < 0) {
>> pr_debug("unable to find transport header in IPv6 packet, dropping\n");
>> return NF_DROP;
>> }
>
> Looks good to me. Please formally submit this including a Signed-off-by:
> line and I'll push it upstream.
Will do, as soon as I have a chance to run the test suite. Thanks Patrick.
--
KOVACS Krisztian
^ permalink raw reply
* Re: [Patch] iwlwifi: remove obsoleted module alias and parameters
From: Stanislaw Gruszka @ 2011-04-06 12:57 UTC (permalink / raw)
To: Cong Wang
Cc: Johannes Berg, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, Intel Linux Wireless,
John W. Linville, Wey-Yi Guy, Meenakshi Venkataraman,
Larry Finger
In-Reply-To: <4D9C43A8.5060500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Wed, Apr 06, 2011 at 06:42:48PM +0800, Cong Wang wrote:
> 于 2011年04月06日 18:09, Johannes Berg 写道:
> >On Wed, 2011-04-06 at 17:49 +0800, Amerigo Wang wrote:
> >>As scheduled in Documentation/feature-removal-schedule.txt,
> >>remove "*50", "disable_hw_scan" module parameters and MODULE_ALIAS("iwl4965").
> >
> >Mostly fine, but for iwlegacy Stanislaw we want to keep hw scan (and it
> >was actually made default now)
Indeed, disable_hw_scan should be removed in iwlwifi but leaved in iwlegacy.
> Ok, I will wait for Stanislaw's response and then send an updated patch.
Have it now :-)
Stanislaw
--
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
* RE: [PATCH net-next-2.6 12/12] qlcnic: convert to set_phys_id
From: Sucheta Chakraborty @ 2011-04-06 12:56 UTC (permalink / raw)
To: Stephen Hemminger
Cc: davem@davemloft.net, bhutchings@solarflare.com, Amit Salecha,
Anirban Chakraborty, netdev@vger.kernel.org, Sucheta Chakraborty
In-Reply-To: <99737F4847ED0A48AECC9F4A1974A4B80FD1383A55@MNEXMB2.qlogic.org>
> - if (!test_bit(__QLCNIC_DEV_UP, &adapter->state)) {
> - dev_down = 1;
> - if (test_and_set_bit(__QLCNIC_RESETTING, &adapter->state))
> - return -EIO;
> -
> - ret = qlcnic_diag_alloc_res(dev, QLCNIC_LED_TEST);
> + switch (state) {
> + case ETHTOOL_ID_ACTIVE:
> + if (!test_bit(__QLCNIC_DEV_UP, &adapter->state)) {
> + if (test_and_set_bit(__QLCNIC_RESETTING, &adapter-
> >state))
> + return -EIO;
> +
> + ret = qlcnic_diag_alloc_res(dev, QLCNIC_LED_TEST);
> + if (ret) {
> + clear_bit(__QLCNIC_RESETTING, &adapter->state);
> + return ret;
> + }
> + }
> +
> + ret = adapter->nic_ops->config_led(adapter, 1, 0xf);
> if (ret) {
> - clear_bit(__QLCNIC_RESETTING, &adapter->state);
> - return ret;
> + dev_err(&adapter->pdev->dev,
> + "Failed to set LED blink state.\n");
> + break;
> }
> - }
> -
> - ret = adapter->nic_ops->config_led(adapter, 1, 0xf);
> - if (ret) {
> - dev_err(&adapter->pdev->dev,
> - "Failed to set LED blink state.\n");
> - goto done;
> - }
> + return 0;
>
> - msleep_interruptible(val * 1000);
> + case ETHTOOL_ID_INACTIVE:
> + ret = adapter->nic_ops->config_led(adapter, 0, 0xf);
> + if (ret)
> + dev_err(&adapter->pdev->dev,
> + "Failed to reset LED blink state.\n");
> + break;
>
> - ret = adapter->nic_ops->config_led(adapter, 0, 0xf);
> - if (ret) {
> - dev_err(&adapter->pdev->dev,
> - "Failed to reset LED blink state.\n");
> - goto done;
> + default:
> + return -EINVAL;
> }
>
> -done:
> - if (dev_down) {
> + if (!netif_running(dev)) {
> qlcnic_diag_free_res(dev, max_sds_rings);
> clear_bit(__QLCNIC_RESETTING, &adapter->state);
> }
netif_running() check will not work here because interface can be brought down when LED test is ACTIVE.
This may result in freeing resources unnecessarily.
You can have a bit flag in adapter->state to track resources allocation (qlcnic_diag_alloc_res()).
Thanks,
Sucheta.
This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
^ permalink raw reply
* [RFC] ixgbe: is DCA really that good ?
From: Eric Dumazet @ 2011-04-06 13:44 UTC (permalink / raw)
To: Alexander Duyck, Brattain, Jeff Kirsher; +Cc: netdev
Hi guys
In a forwarding [or RPS/RFS] setup, why should we populate cpu caches
with full frames content ? We only need first cache line to perform
routing [or RPS/RFS] decision.
-> DCA should be a knob (ethtool ?) that an admin can switch off and on,
port by port, not a CONFIG_IXGBE_DCA thing.
Thanks
^ permalink raw reply
* Re: [Patch] iwlwifi: remove obsoleted module alias and parameters
From: Guy, Wey-Yi @ 2011-04-06 14:05 UTC (permalink / raw)
To: Amerigo Wang
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
Intel Linux Wireless, Berg, Johannes, John W. Linville,
Stanislaw Gruszka, Venkataraman, Meenakshi, Larry Finger
In-Reply-To: <1302083382-6715-1-git-send-email-amwang@redhat.com>
On Wed, 2011-04-06 at 02:49 -0700, Amerigo Wang wrote:
> As scheduled in Documentation/feature-removal-schedule.txt,
> remove "*50", "disable_hw_scan" module parameters and MODULE_ALIAS("iwl4965").
>
> Cc: Intel Linux Wireless <ilw@linux.intel.com>
> Cc: Johannes Berg <johannes.berg@intel.com>
> Cc: "John W. Linville" <linville@tuxdriver.com>
> Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> Cc: Stanislaw Gruszka <sgruszka@redhat.com>
> Cc: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Signed-off-by: WANG Cong <amwang@redhat.com>
>
> ---
what tree you are base on?
please check commit#7eaa6a5e964f1ab02d849bda36950c0d30be8ce2 in
wireless-next-2.6
Thanks
Wey
^ permalink raw reply
* Re: [PATCH net-next-2.6 v2] can: convert protocol handling to RCU
From: Oliver Hartkopp @ 2011-04-06 14:39 UTC (permalink / raw)
To: Kurt Van Dijck
Cc: David Miller, Linux Netdev List, Eric Dumazet, Urs Thuermann
In-Reply-To: <20110406092727.GC342@kurt.e-circ.dyndns.org>
On 06.04.2011 11:27, Kurt Van Dijck wrote:
> On Tue, Apr 05, 2011 at 08:01:16PM +0200, Oliver Hartkopp wrote:
>>
>> +static struct can_proto *can_try_module_get(int protocol)
>> +{
>> + struct can_proto *cp;
>> +
>> + rcu_read_lock();
>> + cp = rcu_dereference(proto_tab[protocol]);
>> + if (cp && !try_module_get(cp->prot->owner))
> After the xxx_get, is the 'cp' pointer persistent?
try_module_get() increases the usage counter of the module - therefore it is.
It is protected until module_put(cp->prot->owner) at the end of can_create() .
>> /* check for available protocol and correct usage */
>>
>> if (!cp)
>> return -EPROTONOSUPPORT;
>>
>> if (cp->type != sock->type) {
> I don't see how this will evaluate to true?
> can_proto_register takes care of it.
This check compares the type of the socket that is to be created with the type
that's defined for this protocol.
E.g. if you would give
s = socket(PF_CAN, SOCK_STREAM, CAN_RAW);
instead of the correct
s = socket(PF_CAN, SOCK_RAW, CAN_RAW);
you will get this error.
>> - err = -EPROTONOSUPPORT;
>> + err = -EPROTOTYPE;
>> goto errout;
>> }
>>
Regards,
Oliver
^ permalink raw reply
* RE
From: BARCLAYS @ 2011-04-06 15:01 UTC (permalink / raw)
Attention:This is the second time we are notifying you about your fund worth
US$27M, with this Bank. Yours sincerely,Mr. Frank Brown.
^ permalink raw reply
* Re: [Patch] iwlwifi: remove obsoleted module alias and parameters
From: John W. Linville @ 2011-04-06 15:14 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Cong Wang, Johannes Berg, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, Intel Linux Wireless, Wey-Yi Guy,
Meenakshi Venkataraman, Larry Finger
In-Reply-To: <20110406125728.GA2197-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Wed, Apr 06, 2011 at 02:57:29PM +0200, Stanislaw Gruszka wrote:
> On Wed, Apr 06, 2011 at 06:42:48PM +0800, Cong Wang wrote:
> > 于 2011年04月06日 18:09, Johannes Berg 写道:
> > >On Wed, 2011-04-06 at 17:49 +0800, Amerigo Wang wrote:
> > >>As scheduled in Documentation/feature-removal-schedule.txt,
> > >>remove "*50", "disable_hw_scan" module parameters and MODULE_ALIAS("iwl4965").
> > >
> > >Mostly fine, but for iwlegacy Stanislaw we want to keep hw scan (and it
> > >was actually made default now)
>
> Indeed, disable_hw_scan should be removed in iwlwifi but leaved in iwlegacy.
>
> > Ok, I will wait for Stanislaw's response and then send an updated patch.
>
> Have it now :-)
Maybe the MODULE_ALIAS("iwl4965") should go to iwlegacy too?
John
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
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
* Fw: [Bug 32772] New: PROBLEM: kernel BUG at net/ipv4/inetpeer.c:386
From: Stephen Hemminger @ 2011-04-06 15:18 UTC (permalink / raw)
To: netdev
Begin forwarded message:
Date: Wed, 6 Apr 2011 07:39:54 GMT
From: bugzilla-daemon@bugzilla.kernel.org
To: shemminger@linux-foundation.org
Subject: [Bug 32772] New: PROBLEM: kernel BUG at net/ipv4/inetpeer.c:386
https://bugzilla.kernel.org/show_bug.cgi?id=32772
Summary: PROBLEM: kernel BUG at net/ipv4/inetpeer.c:386
Product: Networking
Version: 2.5
Kernel Version: 2.6.38
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: IPV4
AssignedTo: shemminger@linux-foundation.org
ReportedBy: dimetrios@gmail.com
Regression: No
Kernel oopses periodically with 'kernel BUG at net/ipv4/inetpeer.c:386'
message. Machine is used as BGP router and runs Quagga. Nonordinary kernel
config option set: CONFIG_IP_FIB_TRIE=y.
Two traces:
--------------------trace begin--------------
[625279.329241] kernel BUG at net/ipv4/inetpeer.c:386!
[625279.329241] invalid opcode: 0000 [#1] SMP
[625279.329241] last sysfs file: /sys/module/ip_tables/initstate
[625279.329241] Modules linked in: nf_nat_pptp nf_nat_proto_gre
nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_ftp nf_conntrack_ftp ipt_REJECT
xt_state xt_tcpudp xt_multiport ip_set iptable_filter iptable_mangle
iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables
x_tables act_police cls_u32 sch_ingress sch_tbf 8021q garp bridge ipv6 stp llc
loop i2c_i801 intel_agp parport_pc i2c_core intel_gtt rng_core agpgart
processor parport button evdev pcspkr thermal_sys serio_raw tpm_tis tpm
tpm_bios ext3 jbd mbcache sd_mod crc_t10dif ata_generic ata_piix libata
scsi_mod uhci_hcd ide_pci_generic e1000e ehci_hcd r8169 ide_core igb dca mii
usbcore nls_base [last unloaded: scsi_wait_scan]
[625279.329241]
[625279.329241] Pid: 0, comm: kworker/0:0 Not tainted 2.6.38-demyan-1.1demyan
#1 Gigabyte Technology Co., Ltd. G41MT-ES2L/G41MT-ES2L
[625279.329241] EIP: 0060:[<c11e0caa>] EFLAGS: 00010283 CPU: 1
[625279.329241] EIP is at unlink_from_pool+0x85/0x14a
[625279.329241] EAX: c125ff04 EBX: ed21cd40 ECX: c351ce70 EDX: e8db5b40
[625279.329241] ESI: c1333338 EDI: f4c91ca0 EBP: c351b55e ESP: f4c91c48
[625279.329241] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[625279.329241] Process kworker/0:0 (pid: 0, ti=f4c90000 task=f4c6a400
task.ti=f4c8c000)
[625279.329241] Stack:
[625279.329241] f1be9b00 00000001 c351ce70 c133333c c1333338 ed21a684 f11a3f84
f0146f00
[625279.329241] ed2dca80 ed21a900 f0146644 ec4c2f40 f0146280 ec701dc0 f0467fc0
eea79604
[625279.329241] f16c12c0 ef727900 ec865784 e721a3c0 ee859cc4 e8db5b40 00000640
00000014
[625279.329241] Call Trace:
[625279.329241] [<c11ea34a>] ? tcp_tso_segment+0x24d/0x25c
[625279.329241] [<f820048a>] ? tcp_packet+0xb8e/0xbb8 [nf_conntrack]
[625279.329241] [<c11e0de9>] ? cleanup_once+0x7a/0x7f
[625279.329241] [<c11e0fa9>] ? inet_getpeer+0x1bb/0x1dc
[625279.329241] [<c11d0001>] ? store_xps_map+0xa1/0x2b8
[625279.329241] [<c11c3477>] ? dev_hard_start_xmit+0x36f/0x454
[625279.329241] [<c1021ef1>] ? get_nohz_timer_target+0x47/0x64
[625279.329241] [<c11e1cb0>] ? ip4_frag_init+0x66/0x71
[625279.329241] [<c120bb54>] ? inet_frag_find+0x80/0x18d
[625279.329241] [<c11e1dec>] ? ip_defrag+0x131/0x955
[625279.329241] [<f81be0b1>] ? ipv4_conntrack_defrag+0xb0/0xd3
[nf_defrag_ipv4]
[625279.329241] [<c11dc036>] ? nf_iterate+0x32/0x5d
[625279.329241] [<c11e10e0>] ? ip_rcv_finish+0x0/0x31f
[625279.329241] [<c11dc13d>] ? nf_hook_slow+0x40/0xb5
[625279.329241] [<c11e10e0>] ? ip_rcv_finish+0x0/0x31f
[625279.329241] [<c11e164c>] ? ip_rcv+0x24d/0x293
[625279.329241] [<c11e10e0>] ? ip_rcv_finish+0x0/0x31f
[625279.329241] [<c11c1b3c>] ? __netif_receive_skb+0x405/0x42c
[625279.329241] [<c11c1a63>] ? __netif_receive_skb+0x32c/0x42c
[625279.329241] [<c1047585>] ? ktime_get_real+0x10/0x2d
[625279.329241] [<c11c2547>] ? netif_receive_skb+0x5a/0x5f
[625279.329241] [<c11c25ff>] ? napi_skb_finish+0x1b/0x30
[625279.329241] [<f80a9723>] ? igb_poll+0x649/0x94a [igb]
[625279.329241] [<c1007765>] ? sched_clock+0x9/0xd
[625279.329241] [<c1030582>] ? do_exit+0x2e/0x60c
[625279.329241] [<c104438f>] ? sched_clock_local+0x17/0x13d
[625279.329241] [<c11c2b7b>] ? net_rx_action+0x90/0x150
[625279.329241] [<c1031f12>] ? __do_softirq+0x75/0x10e
[625279.329241] [<c1031e9d>] ? __do_softirq+0x0/0x10e
[625279.329241] <IRQ>
[625279.329241] [<c1031df3>] ? irq_exit+0x31/0x64
[625279.329241] [<c1004397>] ? do_IRQ+0x73/0x84
[625279.329241] [<c1003429>] ? common_interrupt+0x29/0x30
[625279.329241] [<c10089b4>] ? mwait_idle+0x4f/0x59
[625279.329241] [<c10021ef>] ? cpu_idle+0x46/0x63
[625279.329241] Code: 24 08 39 cd 75 09 42 3b 54 24 04 7c e9 eb 18 3b 6c 24 08
8d 50 04 0f 42 d0 89 17 83 c7 04 8b 02 3d 04 ff 25 c1 75 bb 39 d8 74 04 <0f> 0b
eb fe 8d 6f fc 81 3b 04 ff 25 c1 89 6c 24 08 75 0d 8b 47
[625279.329241] EIP: [<c11e0caa>] unlink_from_pool+0x85/0x14a SS:ESP
0068:f4c91c48
[625280.416294] ---[ end trace b75ce593ad6cbee7 ]---
[625280.430422] Kernel panic - not syncing: Fatal exception in interrupt
[625280.449739] Pid: 0, comm: kworker/0:0 Tainted: G D
2.6.38-demyan-1.1demyan #1
[625280.473762] Call Trace:
[625280.481380] [<c1231f71>] ? panic+0x4d/0x137
[625280.494457] [<c1005722>] ? oops_end+0x8e/0x99
[625280.508054] [<c1003a0e>] ? do_invalid_op+0x0/0x75
[625280.522693] [<c1003a7a>] ? do_invalid_op+0x6c/0x75
[625280.537588] [<c11e0caa>] ? unlink_from_pool+0x85/0x14a
[625280.553527] [<c11e0bbd>] ? inet_putpeer+0x15/0x47
[625280.568165] [<c11e0d64>] ? unlink_from_pool+0x13f/0x14a
[625280.584367] [<f80a9ed6>] ? igb_xmit_frame_ring_adv+0x4b2/0x795 [igb]
[625280.603941] [<c1007765>] ? sched_clock+0x9/0xd
[625280.617797] [<c123464e>] ? error_code+0x5a/0x60
[625280.631913] [<c1003a0e>] ? do_invalid_op+0x0/0x75
[625280.646552] [<c11e0caa>] ? unlink_from_pool+0x85/0x14a
[625280.662490] [<c11ea34a>] ? tcp_tso_segment+0x24d/0x25c
[625280.678427] [<f820048a>] ? tcp_packet+0xb8e/0xbb8 [nf_conntrack]
[625280.696964] [<c11e0de9>] ? cleanup_once+0x7a/0x7f
[625280.711600] [<c11e0fa9>] ? inet_getpeer+0x1bb/0x1dc
[625280.726758] [<c11d0001>] ? store_xps_map+0xa1/0x2b8
[625280.741916] [<c11c3477>] ? dev_hard_start_xmit+0x36f/0x454
[625280.758894] [<c1021ef1>] ? get_nohz_timer_target+0x47/0x64
[625280.775870] [<c11e1cb0>] ? ip4_frag_init+0x66/0x71
[625280.790768] [<c120bb54>] ? inet_frag_find+0x80/0x18d
[625280.806184] [<c11e1dec>] ? ip_defrag+0x131/0x955
[625280.820562] [<f81be0b1>] ? ipv4_conntrack_defrag+0xb0/0xd3
[nf_defrag_ipv4]
[625280.841961] [<c11dc036>] ? nf_iterate+0x32/0x5d
[625280.856078] [<c11e10e0>] ? ip_rcv_finish+0x0/0x31f
[625280.870975] [<c11dc13d>] ? nf_hook_slow+0x40/0xb5
[625280.885612] [<c11e10e0>] ? ip_rcv_finish+0x0/0x31f
[625280.900510] [<c11e164c>] ? ip_rcv+0x24d/0x293
[625280.914107] [<c11e10e0>] ? ip_rcv_finish+0x0/0x31f
[625280.929005] [<c11c1b3c>] ? __netif_receive_skb+0x405/0x42c
[625280.945982] [<c11c1a63>] ? __netif_receive_skb+0x32c/0x42c
[625280.962960] [<c1047585>] ? ktime_get_real+0x10/0x2d
[625280.978121] [<c11c2547>] ? netif_receive_skb+0x5a/0x5f
[625280.994055] [<c11c25ff>] ? napi_skb_finish+0x1b/0x30
[625281.009473] [<f80a9723>] ? igb_poll+0x649/0x94a [igb]
[625281.025150] [<c1007765>] ? sched_clock+0x9/0xd
[625281.039005] [<c1030582>] ? do_exit+0x2e/0x60c
[625281.052603] [<c104438f>] ? sched_clock_local+0x17/0x13d
[625281.068800] [<c11c2b7b>] ? net_rx_action+0x90/0x150
[625281.083958] [<c1031f12>] ? __do_softirq+0x75/0x10e
[625281.098857] [<c1031e9d>] ? __do_softirq+0x0/0x10e
[625281.113493] <IRQ> [<c1031df3>] ? irq_exit+0x31/0x64
[625281.128963] [<c1004397>] ? do_IRQ+0x73/0x84
[625281.142040] [<c1003429>] ? common_interrupt+0x29/0x30
[625281.157718] [<c10089b4>] ? mwait_idle+0x4f/0x59
[625281.171836] [<c10021ef>] ? cpu_idle+0x46/0x63
[625281.185435] Rebooting in 5 seconds..
--------------------trace end--------------
--------------------trace begin--------------
[237684.673906] kernel BUG at net/ipv4/inetpeer.c:386!
[237684.673906] invalid opcode: 0000 [#1] SMP
[237684.673906] last sysfs file: /sys/module/nf_conntrack_pptp/initstate
[237684.673906] Modules linked in: nf_nat_pptp nf_nat_proto_gre
nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_ftp nf_conntrack_ftp ipt_REJECT
xt_state xt_tcpudp xt_multiport ip_set iptable_filter iptable_mangle
iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables
x_tables act_police cls_u32 sch_ingress sch_tbf 8021q garp bridge ipv6 stp llc
loop i2c_i801 rng_core intel_agp intel_gtt agpgart i2c_core tpm_tis evdev
pcspkr parport_pc processor parport button tpm thermal_sys tpm_bios serio_raw
ext3 jbd mbcache sd_mod crc_t10dif ata_generic ata_piix libata scsi_mod
uhci_hcd ide_pci_generic r8169 ehci_hcd e1000e mii igb dca ide_core usbcore
nls_base [last unloaded: scsi_wait_scan]
[237684.673906]
[237684.673906] Pid: 0, comm: swapper Not tainted 2.6.38-demyan-1.1demyan #1
Gigabyte Technology Co., Ltd. G41MT-ES2L/G41MT-ES2L
[237684.673906] EIP: 0060:[<c11e0caa>] EFLAGS: 00010287 CPU: 0
[237684.673906] EIP is at unlink_from_pool+0x85/0x14a
[237684.673906] EAX: c125ff04 EBX: ed76d180 ECX: 75c219bc EDX: e8de9444
[237684.673906] ESI: c1333338 EDI: f4c0bbfc EBP: 75c25152 ESP: f4c0bba8
[237684.673906] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[237684.673906] Process swapper (pid: 0, ti=f4c0a000 task=c1315f20
task.ti=c1300000)
[237684.673906] Stack:
[237684.673906] ef42e49c 00000001 75c219bc c133333c c1333338 f4780d80 ed76d744
f19e3744
[237684.673906] ed71f980 f452a404 f183fc04 f452afc4 f4780ac0 f18ca680 f474fe84
f1871180
[237684.673906] ee2a9884 edef3844 f1cf3e04 edf15284 e8de9444 f4c0bcb4 ef42e49c
f4c0bc78
[237684.673906] Call Trace:
[237684.673906] [<c120f068>] ? fib4_rule_action+0x40/0x4d
[237684.673906] [<c11d1be3>] ? fib_rules_lookup+0x8d/0xe4
[237684.673906] [<c109bf68>] ? cache_alloc_refill+0x75/0x3dc
[237684.673906] [<c11e0de9>] ? cleanup_once+0x7a/0x7f
[237684.673906] [<c11e0fa9>] ? inet_getpeer+0x1bb/0x1dc
[237684.673906] [<c11dc073>] ? nf_ct_attach+0x12/0x13
[237684.673906] [<c1202404>] ? icmp_glue_bits+0x65/0x6a
[237684.673906] [<c11e4109>] ? ip_append_data+0x595/0x850
[237684.673906] [<c11e025d>] ? rt_bind_peer+0x1d/0x3d
[237684.673906] [<c11e029f>] ? __ip_select_ident+0x22/0xa6
[237684.673906] [<c11e4f60>] ? ip_push_pending_frames+0x206/0x2cb
[237684.673906] [<c120301b>] ? icmp_send+0x4fe/0x523
[237684.673906] [<f8270b09>] ? ____nf_conntrack_find+0xfa/0x142 [nf_conntrack]
[237684.673906] [<f8272069>] ? nf_conntrack_in+0x4f3/0x5e3 [nf_conntrack]
[237684.673906] [<f81ef536>] ? ipt_do_table+0x4bc/0x4eb [ip_tables]
[237684.673906] [<c11e2949>] ? ip_forward+0x2ef/0x316
[237684.673906] [<c11e13da>] ? ip_rcv_finish+0x2fa/0x31f
[237684.673906] [<c11c1b3c>] ? __netif_receive_skb+0x405/0x42c
[237684.673906] [<c11c1a63>] ? __netif_receive_skb+0x32c/0x42c
[237684.673906] [<c1047585>] ? ktime_get_real+0x10/0x2d
[237684.673906] [<c11c2547>] ? netif_receive_skb+0x5a/0x5f
[237684.673906] [<c11c25ff>] ? napi_skb_finish+0x1b/0x30
[237684.673906] [<f80e1723>] ? igb_poll+0x649/0x94a [igb]
[237684.673906] [<c1007765>] ? sched_clock+0x9/0xd
[237684.673906] [<c1030091>] ? wait_consider_task+0x974/0xa91
[237684.673906] [<c104438f>] ? sched_clock_local+0x17/0x13d
[237684.673906] [<c11c2b7b>] ? net_rx_action+0x90/0x150
[237684.673906] [<c1031f12>] ? __do_softirq+0x75/0x10e
[237684.673906] [<c1031e9d>] ? __do_softirq+0x0/0x10e
[237684.673906] <IRQ>
[237684.673906] [<c1031df3>] ? irq_exit+0x31/0x64
[237684.673906] [<c1004397>] ? do_IRQ+0x73/0x84
[237684.673906] [<c1003429>] ? common_interrupt+0x29/0x30
[237684.673906] [<c10089b4>] ? mwait_idle+0x4f/0x59
[237684.673906] [<c10021ef>] ? cpu_idle+0x46/0x63
[237684.673906] [<c133b85c>] ? start_kernel+0x2e2/0x2e5
[237684.673906] Code: 24 08 39 cd 75 09 42 3b 54 24 04 7c e9 eb 18 3b 6c 24 08
8d 50 04 0f 42 d0 89 17 83 c7 04 8b 02 3d 04 ff 25 c1 75 bb 39 d8 74 04 <0f> 0b
eb fe 8d 6f fc 81 3b 04 ff 25 c1 89 6c 24 08 75 0d 8b 47
[237684.673906] EIP: [<c11e0caa>] unlink_from_pool+0x85/0x14a SS:ESP
0068:f4c0bba8
[237685.787747] ---[ end trace e3c73323a4e3b283 ]---
[237685.801876] Kernel panic - not syncing: Fatal exception in interrupt
[237685.821194] Pid: 0, comm: swapper Tainted: G D
2.6.38-demyan-1.1demyan #1
[237685.844177] Call Trace:
[237685.851797] [<c1231f71>] ? panic+0x4d/0x137
[237685.864874] [<c1005722>] ? oops_end+0x8e/0x99
[237685.878471] [<c1003a0e>] ? do_invalid_op+0x0/0x75
[237685.893109] [<c1003a7a>] ? do_invalid_op+0x6c/0x75
[237685.908005] [<c11e0caa>] ? unlink_from_pool+0x85/0x14a
[237685.923942] [<c1007765>] ? sched_clock+0x9/0xd
[237685.937801] [<c1007765>] ? sched_clock+0x9/0xd
[237685.951658] [<c104438f>] ? sched_clock_local+0x17/0x13d
[237685.967856] [<c123464e>] ? error_code+0x5a/0x60
[237685.981973] [<c1003a0e>] ? do_invalid_op+0x0/0x75
[237685.996610] [<c11e0caa>] ? unlink_from_pool+0x85/0x14a
[237686.012548] [<c120f068>] ? fib4_rule_action+0x40/0x4d
[237686.028225] [<c11d1be3>] ? fib_rules_lookup+0x8d/0xe4
[237686.043902] [<c109bf68>] ? cache_alloc_refill+0x75/0x3dc
[237686.060359] [<c11e0de9>] ? cleanup_once+0x7a/0x7f
[237686.074997] [<c11e0fa9>] ? inet_getpeer+0x1bb/0x1dc
[237686.090156] [<c11dc073>] ? nf_ct_attach+0x12/0x13
[237686.104792] [<c1202404>] ? icmp_glue_bits+0x65/0x6a
[237686.119949] [<c11e4109>] ? ip_append_data+0x595/0x850
[237686.135626] [<c11e025d>] ? rt_bind_peer+0x1d/0x3d
[237686.150264] [<c11e029f>] ? __ip_select_ident+0x22/0xa6
[237686.166202] [<c11e4f60>] ? ip_push_pending_frames+0x206/0x2cb
[237686.183959] [<c120301b>] ? icmp_send+0x4fe/0x523
[237686.198338] [<f8270b09>] ? ____nf_conntrack_find+0xfa/0x142 [nf_conntrack]
[237686.219474] [<f8272069>] ? nf_conntrack_in+0x4f3/0x5e3 [nf_conntrack]
[237686.239311] [<f81ef536>] ? ipt_do_table+0x4bc/0x4eb [ip_tables]
[237686.257589] [<c11e2949>] ? ip_forward+0x2ef/0x316
[237686.272227] [<c11e13da>] ? ip_rcv_finish+0x2fa/0x31f
[237686.287643] [<c11c1b3c>] ? __netif_receive_skb+0x405/0x42c
[237686.304620] [<c11c1a63>] ? __netif_receive_skb+0x32c/0x42c
[237686.321599] [<c1047585>] ? ktime_get_real+0x10/0x2d
[237686.336760] [<c11c2547>] ? netif_receive_skb+0x5a/0x5f
[237686.352692] [<c11c25ff>] ? napi_skb_finish+0x1b/0x30
[237686.368111] [<f80e1723>] ? igb_poll+0x649/0x94a [igb]
[237686.383788] [<c1007765>] ? sched_clock+0x9/0xd
[237686.397645] [<c1030091>] ? wait_consider_task+0x974/0xa91
[237686.414362] [<c104438f>] ? sched_clock_local+0x17/0x13d
[237686.430559] [<c11c2b7b>] ? net_rx_action+0x90/0x150
[237686.445718] [<c1031f12>] ? __do_softirq+0x75/0x10e
[237686.460614] [<c1031e9d>] ? __do_softirq+0x0/0x10e
[237686.475251] <IRQ> [<c1031df3>] ? irq_exit+0x31/0x64
[237686.490722] [<c1004397>] ? do_IRQ+0x73/0x84
[237686.503799] [<c1003429>] ? common_interrupt+0x29/0x30
[237686.519476] [<c10089b4>] ? mwait_idle+0x4f/0x59
[237686.533593] [<c10021ef>] ? cpu_idle+0x46/0x63
[237686.547191] [<c133b85c>] ? start_kernel+0x2e2/0x2e5
[237686.562350] Rebooting in 5 seconds..
--------------------trace end--------------
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
--
^ permalink raw reply
* Re: [PATCH 07/19] timberdale: mfd_cell is now implicitly available to drivers
From: Samuel Ortiz @ 2011-04-06 15:23 UTC (permalink / raw)
To: Grant Likely
Cc: Andres Salomon, linux-kernel, Mark Brown, khali, ben-linux,
Peter Korsgaard, Mauro Carvalho Chehab, David Brownell, linux-i2c,
linux-media, netdev, spi-devel-general, Mocean Laboratories,
Greg Kroah-Hartman
In-Reply-To: <20110405030428.GB29522@ponder.secretlab.ca>
On Mon, Apr 04, 2011 at 09:04:29PM -0600, Grant Likely wrote:
> > The second step would be to get rid of mfd_get_data() and have all subdrivers
> > going back to the regular platform_data way. They would no longer be dependant
> > on the MFD code except for those who really need it. In that case they could
> > just call mfd_get_cell() and get full access to their MFD cell.
>
> The revert to platform_data needs to happen ASAP though. If this
> second step isn't ready really quickly, then the current patches
> should be reverted to give some breathing room for creating the
> replacement patches. However, it's not such a rush if the below
> patch really does eliminate all of the nastiness of the original
> series. (I haven't looked and a rolled up diff of the first series and
> this change, so I don't know for sure).
I am done reverting these changes, with a final patch getting rid of
mfd_get_data. See
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git for-linus
I still need to give it a second review before pushing it to lkml for
comments. It's 20 patches long, so I'm not entirely sure Linus would take that
at that point.
Pushing patch #1 would be enough for fixing the issues introduced by the
original patchset, so I'm leaning toward pushing it and leaving the 19 other
patches for the next merge window.
> In principle I agree with this patch. Some comments below.
Thanks for the comments. I think I addressed all of them in patch #1:
---
drivers/base/platform.c | 1 +
drivers/mfd/mfd-core.c | 15 +++++++++++++--
include/linux/device.h | 3 +++
include/linux/mfd/core.h | 7 +++++--
4 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index f051cff..bde6b97 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -149,6 +149,7 @@ static void platform_device_release(struct device *dev)
of_device_node_put(&pa->pdev.dev);
kfree(pa->pdev.dev.platform_data);
+ kfree(pa->pdev.dev.mfd_cell);
kfree(pa->pdev.resource);
kfree(pa);
}
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index d01574d..99b0d6d 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -18,6 +18,18 @@
#include <linux/pm_runtime.h>
#include <linux/slab.h>
+static int mfd_platform_add_cell(struct platform_device *pdev, const struct mfd_cell *cell)
+{
+ if (!cell)
+ return 0;
+
+ pdev->dev.mfd_cell = kmemdup(cell, sizeof(*cell), GFP_KERNEL);
+ if (!pdev->dev.mfd_cell)
+ return -ENOMEM;
+
+ return 0;
+}
+
int mfd_cell_enable(struct platform_device *pdev)
{
const struct mfd_cell *cell = mfd_get_cell(pdev);
@@ -75,7 +87,7 @@ static int mfd_add_device(struct device *parent, int id,
pdev->dev.parent = parent;
- ret = platform_device_add_data(pdev, cell, sizeof(*cell));
+ ret = mfd_platform_add_cell(pdev, cell);
if (ret)
goto fail_res;
@@ -123,7 +135,6 @@ static int mfd_add_device(struct device *parent, int id,
return 0;
-/* platform_device_del(pdev); */
fail_res:
kfree(res);
fail_device:
diff --git a/include/linux/device.h b/include/linux/device.h
index ab8dfc0..cf353cf 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -33,6 +33,7 @@ struct class;
struct subsys_private;
struct bus_type;
struct device_node;
+struct mfd_cell;
struct bus_attribute {
struct attribute attr;
@@ -444,6 +445,8 @@ struct device {
struct device_node *of_node; /* associated device tree node */
const struct of_device_id *of_match; /* matching of_device_id from driver */
+ struct mfd_cell *mfd_cell; /* MFD cell pointer */
+
dev_t devt; /* dev_t, creates the sysfs "dev" */
spinlock_t devres_lock;
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index ad1b19a..28f81cf 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -86,7 +86,7 @@ extern int mfd_clone_cell(const char *cell, const char **clones,
*/
static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
{
- return pdev->dev.platform_data;
+ return pdev->dev.mfd_cell;
}
/*
@@ -95,7 +95,10 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
*/
static inline void *mfd_get_data(struct platform_device *pdev)
{
- return mfd_get_cell(pdev)->mfd_data;
+ if (pdev->dev.mfd_cell)
+ return mfd_get_cell(pdev)->mfd_data;
+ else
+ return pdev->dev.platform_data;
}
extern int mfd_add_devices(struct device *parent, int id,
--
1.7.2.3
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply related
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