Skip to contentSkip to conversation

linux-next: Tree for June 3

PATCH In review Stephen Rothwell 12 participants 25 messages Jun 3, 2010 – Jun 9, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi all,

Changes since 20100602:

My fixes tree contains:
v4l-dvb: update gfp/slab.h includes
arm: update gfp/slab.h includes
davinci: update gfp/slab.h includes
ocfs2: update gfp/slab.h includes
acpi: update gfp/slab.h includes

The sh tree lost its build failure.

The rr tree lost its build failure.

----------------------------------------------------------------------------

I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" as mentioned in the FAQ on the wiki (see below).

You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc and an allmodconfig for x86_64. After the final fixups (if any), it is also built with powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig and allyesconfig (minus CONFIG_PROFILE_ALL_BRANCHES - this fails its final link) and i386, sparc and sparc64 defconfig. These builds also have CONFIG_ENABLE_WARN_DEPRECATED, CONFIG_ENABLE_MUST_CHECK and CONFIG_DEBUG_INFO disabled when necessary.

Below is a summary of the state of the merge.

We are up to 162 trees (counting Linus' and 22 trees of patches pending for Linus' tree), more are welcome (even if they are currently empty). Thanks to those who have contributed, and to those who haven't, please do.

Status of my local build tests will be at
http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds.

Thanks to Jan Dittmer for adding the linux-next tree to his build tests at http://l4x.org/k/ , the guys at http://test.kernel.org/ and Randy Dunlap for doing many randconfig builds.

There is a wiki covering stuff to do with linux-next at
http://linux.f-seidel.de/linux-next/pmwiki/ . Thanks to Frank Seidel.

Signature · 180 lines
Cheers,
Stephen Rothwell                    [email protected]

$ git checkout master
$ git reset --hard stable
Merging origin/master
Merging fixes/fixes
Merging arm-current/master
Merging m68k-current/for-linus
Merging powerpc-merge/merge
Merging sparc-current/master
Merging scsi-rc-fixes/master
Merging net-current/master
Merging sound-current/for-linus
Merging pci-current/for-linus
Merging wireless-current/master
Merging kbuild-current/for-linus
Merging quilt/driver-core.current
Merging quilt/tty.current
Merging quilt/usb.current
Merging quilt/staging.current
Merging cpufreq-current/fixes
Merging input-current/for-linus
Merging md-current/for-linus
Merging audit-current/for-linus
Merging crypto-current/master
Merging ide-curent/master
Merging dwmw2/master
Merging gcl-current/merge
Merging arm/devel
Merging davinci/davinci-next
Merging i.MX/for-next
Merging msm/for-next
Merging omap/for-next
Merging pxa/for-next
Merging samsung/next-samsung
Merging avr32/avr32-arch
Merging blackfin/for-linus
Merging cris/for-next
Merging ia64/test
Merging m68k/for-next
Merging m68knommu/for-next
Merging microblaze/next
Merging mips/mips-for-linux-next
Merging parisc/next
Merging powerpc/next
Merging 4xx/next
Merging 52xx-and-virtex/next
CONFLICT (content): Merge conflict in drivers/serial/mpc52xx_uart.c
Merging galak/next
Merging s390/features
Merging sh/master
Merging genesis/master
CONFLICT (content): Merge conflict in include/linux/serial_sci.h
Merging sparc/master
Merging xtensa/master
Merging ceph/for-next
Merging cifs/master
Merging configfs/linux-next
Merging ecryptfs/next
CONFLICT (content): Merge conflict in fs/ecryptfs/main.c
Merging ext3/for_next
Merging ext4/next
Merging fatfs/master
Merging fuse/for-next
Merging gfs2/master
Merging jfs/next
Merging logfs/master
CONFLICT (content): Merge conflict in fs/logfs/logfs.h
Merging nfs/linux-next
Merging nfsd/nfsd-next
Merging nilfs2/for-next
Merging ocfs2/linux-next
Merging squashfs/master
Merging udf/for_next
Merging v9fs/for-next
Merging ubifs/linux-next
Merging xfs/master
Merging vfs/for-next
Merging pci/linux-next
Merging hid/for-next
Merging quilt/i2c
Merging bjdooks-i2c/next-i2c
CONFLICT (content): Merge conflict in arch/arm/plat-omap/i2c.c
CONFLICT (content): Merge conflict in drivers/i2c/busses/i2c-cpm.c
CONFLICT (content): Merge conflict in drivers/i2c/busses/i2c-mpc.c
Merging quilt/jdelvare-hwmon
Merging quilt/kernel-doc
Merging v4l-dvb/master
Merging kbuild/for-next
Merging kconfig/for-next
Merging ide/master
Merging libata/NEXT
Merging infiniband/for-next
Merging acpi/test
Merging idle-test/idle-test
Merging ieee1394/for-next
Merging ubi/linux-next
Merging kvm/linux-next
Merging dlm/next
Merging ibft/master
Merging scsi/master
Merging async_tx/next
Merging net/master
Merging wireless/master
Merging mtd/master
Merging crypto/master
Merging sound/for-next
Merging cpufreq/next
Merging quilt/rr
Merging mmc/next
Merging input/next
Merging lsm/for-next
Merging block/for-next
Merging quilt/device-mapper
Merging embedded/master
Merging firmware/master
Merging pcmcia/master
Merging battery/master
Merging leds/for-mm
Merging backlight/for-mm
Merging kgdb/kgdb-next
Merging slab/for-next
Merging uclinux/for-next
Merging md/for-next
Merging mfd/for-next
Merging hdlc/hdlc-next
Merging drm/drm-next
Merging viafb/viafb-next
Merging voltage/for-next
Merging security-testing/next
Merging lblnet/master
Merging agp/agp-next
Merging uwb/for-upstream
Merging watchdog/master
Merging bdev/master
Merging dwmw2-iommu/master
Merging cputime/cputime
Merging osd/linux-next
Merging jc_docs/docs-next
Merging nommu/master
Merging trivial/for-next
Merging audit/for-next
Merging quilt/aoe
Merging suspend/linux-next
Merging bluetooth/master
Merging fsnotify/for-next
CONFLICT (delete/modify): fs/notify/inotify/inotify.c deleted in fsnotify/for-next and modified in HEAD. Version HEAD of fs/notify/inotify/inotify.c left in tree.
$ git rm -f fs/notify/inotify/inotify.c
Applying: fsnotify: update gfp/slab.h includes
Merging irda/for-next
CONFLICT (content): Merge conflict in drivers/net/irda/irda-usb.c
Merging drbd/for-jens
CONFLICT (content): Merge conflict in fs/fs-writeback.c
Merging catalin/for-next
Merging alacrity/linux-next
Merging i7core_edac/linux_next
Merging devicetree/next-devicetree
Merging spi/next-spi
Merging omap_dss2/for-next
Merging tip/auto-latest
CONFLICT (content): Merge conflict in Documentation/feature-removal-schedule.txt
Merging edac-amd/for-next
Merging oprofile/for-next
Merging percpu/for-next
Merging workqueues/for-next
Merging sfi/sfi-test
Merging asm-generic/next
Merging drivers-x86/linux-next
Merging hwpoison/hwpoison
Merging sysctl/master
Merging bkl-core/bkl/core
Merging bkl-procfs/bkl/procfs
Merging bkl-ioctl/bkl/ioctl
Merging quilt/driver-core
Merging quilt/tty
Merging quilt/usb
Merging staging-next/staging-next
Merging slabh/slabh
Merging scsi-post-merge/master
#1 lore raw
Quoted 17 lines · Stephen Rothwell

Hi all,

Changes since 20100602:

My fixes tree contains:
     v4l-dvb: update gfp/slab.h includes
     arm: update gfp/slab.h includes
     davinci: update gfp/slab.h includes
     ocfs2: update gfp/slab.h includes
     acpi: update gfp/slab.h includes

The sh tree lost its build failure.

The rr tree lost its build failure.

----------------------------------------------------------------------------

Quoted 8 lines

I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ).  If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one.  You should use "git fetch" as mentioned in the FAQ on the wiki (see below).

Hi,

With this build, I got weird module refcount:

bash-3.1$ cat /proc/modules
radeon 703776 4294967295 - Live 0xffffffffa017c000
ttm 55891 0 radeon, Live 0xffffffffa0164000
drm_kms_helper 25154 0 radeon, Live 0xffffffffa015b000
drm 174333 2 radeon,ttm,drm_kms_helper, Live 0xffffffffa011f000
fb 45136 1 radeon,drm_kms_helper, Live 0xffffffffa00ff000
fbdev 861 0 fb, Live 0xffffffffa009e000
i2c_algo_bit 4925 0 radeon, Live 0xffffffffa0069000
cfbcopyarea 3229 0 radeon, Live 0xffffffffa0059000
cfbimgblt 2138 0 radeon, Live 0xffffffffa002c000
cfbfillrect 3241 0 radeon, Live 0xffffffffa0026000
tun 13180 2 - Live 0xffffffffa0039000
kvm_intel 42801 4294967295 - Live 0xffffffffa0112000
kvm 250629 0 kvm_intel, Live 0xffffffffa00bf000
dell_wmi 2939 4294967295 - Live 0xffffffffa000e000 snd_hda_codec_analog 72342 0 - Live 0xffffffffa00ab000
wmi 7636 0 dell_wmi, Live 0xffffffffa0004000
e1000e 186408 4294967295 - Live 0xffffffffa006e000
snd_hda_intel 22245 4294967295 - Live 0xffffffffa0061000 snd_hda_codec 69600 1 snd_hda_codec_analog,snd_hda_intel, Live 0xffffffffa004600 0
snd_hwdep 5914 0 snd_hda_codec, Live 0xffffffffa003e000
8139too 31275 4294967295 - Live 0xffffffffa002f000
snd_pcm 70720 1 snd_hda_intel,snd_hda_codec, Live 0xffffffffa0012000 snd_timer 18357 0 snd_pcm, Live 0xffffffffa0007000
snd_page_alloc 7365 1 snd_hda_intel,snd_pcm, Live 0xffffffffa0000000

As you can see, some refcount become negtive
--
Regards
dave

#2 lore raw
Quoted 58 lines · Dave Young
Quoted 17 lines · Stephen Rothwell

Hi all,

Changes since 20100602:

My fixes tree contains:
     v4l-dvb: update gfp/slab.h includes
     arm: update gfp/slab.h includes
     davinci: update gfp/slab.h includes
     ocfs2: update gfp/slab.h includes
     acpi: update gfp/slab.h includes

The sh tree lost its build failure.

The rr tree lost its build failure.

----------------------------------------------------------------------------

Quoted 8 lines

I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ).  If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one.  You should use "git fetch" as mentioned in the FAQ on the wiki (see below).

Hi,

With this build, I got weird module refcount:

bash-3.1$ cat /proc/modules
radeon 703776 4294967295 - Live 0xffffffffa017c000
ttm 55891 0 radeon, Live 0xffffffffa0164000
drm_kms_helper 25154 0 radeon, Live 0xffffffffa015b000
drm 174333 2 radeon,ttm,drm_kms_helper, Live 0xffffffffa011f000
fb 45136 1 radeon,drm_kms_helper, Live 0xffffffffa00ff000
fbdev 861 0 fb, Live 0xffffffffa009e000
i2c_algo_bit 4925 0 radeon, Live 0xffffffffa0069000
cfbcopyarea 3229 0 radeon, Live 0xffffffffa0059000
cfbimgblt 2138 0 radeon, Live 0xffffffffa002c000
cfbfillrect 3241 0 radeon, Live 0xffffffffa0026000
tun 13180 2 - Live 0xffffffffa0039000
kvm_intel 42801 4294967295 - Live 0xffffffffa0112000
kvm 250629 0 kvm_intel, Live 0xffffffffa00bf000
dell_wmi 2939 4294967295 - Live 0xffffffffa000e000 snd_hda_codec_analog 72342 0 - Live 0xffffffffa00ab000
wmi 7636 0 dell_wmi, Live 0xffffffffa0004000
e1000e 186408 4294967295 - Live 0xffffffffa006e000
snd_hda_intel 22245 4294967295 - Live 0xffffffffa0061000 snd_hda_codec 69600 1 snd_hda_codec_analog,snd_hda_intel, Live 0xffffffffa004600 0
snd_hwdep 5914 0 snd_hda_codec, Live 0xffffffffa003e000
8139too 31275 4294967295 - Live 0xffffffffa002f000
snd_pcm 70720 1 snd_hda_intel,snd_hda_codec, Live 0xffffffffa0012000 snd_timer 18357 0 snd_pcm, Live 0xffffffffa0007000
snd_page_alloc 7365 1 snd_hda_intel,snd_pcm, Live 0xffffffffa0000000

Quoted 1 line

As you can see, some refcount become negtive

Seems for some module drop reference of 0 in following code of init_module:

       /* Drop initial reference. */
        module_put(mod);
Quoted 4 lines

--
Regards
dave

Signature · 2 lines
Regards
dave
#3 lore raw
Quoted 59 lines · Dave Young
Quoted 58 lines · Dave Young
Quoted 17 lines · Stephen Rothwell

Hi all,

Changes since 20100602:

My fixes tree contains:
     v4l-dvb: update gfp/slab.h includes
     arm: update gfp/slab.h includes
     davinci: update gfp/slab.h includes
     ocfs2: update gfp/slab.h includes
     acpi: update gfp/slab.h includes

The sh tree lost its build failure.

The rr tree lost its build failure.

----------------------------------------------------------------------------

Quoted 8 lines

I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ).  If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one.  You should use "git fetch" as mentioned in the FAQ on the wiki (see below).

Hi,

With this build, I got weird module refcount:

bash-3.1$ cat /proc/modules
radeon 703776 4294967295 - Live 0xffffffffa017c000
ttm 55891 0 radeon, Live 0xffffffffa0164000
drm_kms_helper 25154 0 radeon, Live 0xffffffffa015b000
drm 174333 2 radeon,ttm,drm_kms_helper, Live 0xffffffffa011f000
fb 45136 1 radeon,drm_kms_helper, Live 0xffffffffa00ff000
fbdev 861 0 fb, Live 0xffffffffa009e000
i2c_algo_bit 4925 0 radeon, Live 0xffffffffa0069000
cfbcopyarea 3229 0 radeon, Live 0xffffffffa0059000
cfbimgblt 2138 0 radeon, Live 0xffffffffa002c000
cfbfillrect 3241 0 radeon, Live 0xffffffffa0026000
tun 13180 2 - Live 0xffffffffa0039000
kvm_intel 42801 4294967295 - Live 0xffffffffa0112000
kvm 250629 0 kvm_intel, Live 0xffffffffa00bf000
dell_wmi 2939 4294967295 - Live 0xffffffffa000e000 snd_hda_codec_analog 72342 0 - Live 0xffffffffa00ab000
wmi 7636 0 dell_wmi, Live 0xffffffffa0004000
e1000e 186408 4294967295 - Live 0xffffffffa006e000
snd_hda_intel 22245 4294967295 - Live 0xffffffffa0061000 snd_hda_codec 69600 1 snd_hda_codec_analog,snd_hda_intel, Live 0xffffffffa004600 0
snd_hwdep 5914 0 snd_hda_codec, Live 0xffffffffa003e000
8139too 31275 4294967295 - Live 0xffffffffa002f000
snd_pcm 70720 1 snd_hda_intel,snd_hda_codec, Live 0xffffffffa0012000 snd_timer 18357 0 snd_pcm, Live 0xffffffffa0007000
snd_page_alloc 7365 1 snd_hda_intel,snd_pcm, Live 0xffffffffa0000000

Quoted 6 lines
Quoted 1 line

As you can see, some refcount become negtive

Seems for some module drop reference of 0 in following code of init_module:

      /* Drop initial reference. */
       module_put(mod);

get right refcount as before by removing this line, is it right fix?

Quoted 12 lines
Quoted 5 lines

--
Regards
dave

--
Regards
dave

Signature · 2 lines
Regards
dave
#4 lore raw
In reply to Dave Young
Quoted 4 lines · Dave Young

Seems for some module drop reference of 0 in following code of init_module:

       /* Drop initial reference. */
        module_put(mod);

Thanks Dave, good bug report.

It was "module: refactor load_module part 4" where I initialized the per-cpu pointer before allocating it:

static int module_unload_init(struct module *mod)
{
...

	/* Hold reference count during initialization. */
	__this_cpu_write(mod->refptr->incs, 1);
...
	mod->refptr = alloc_percpu(struct module_ref);

...

This also explains Stephen's crash during module load (which was more expected since refptr is NULL, though percpu ptrs don't work that way).

I've fixed it (by reversing the order of those lines) for tomorrow's linux-next.

Thanks!
Rusty.

#5 lore raw
Quoted 2 lines

I've fixed it (by reversing the order of those lines) for tomorrow's linux-next.

Somewhere between next-20100602 and next-20100604 something was changed that results in ia64 taking deref NULL oops in sys_init_module() ...

Freeing unused kernel memory: 1984kB freed modprobe[1851]: NaT consumption 2216203124768 [1]

Modules linked in:

Pid: 1851, CPU 2, comm: modprobe
psr : 0000121008526030 ifs : 8000000000000794 ip :
[<a0000001000f0f31>] Not tainted
(2.6.35-rc1-generic-smp-next-20100604)
ip is at sys_init_module+0x131/0x420

At the point of dereference it looks like we were trying to load a 4-byte data object from offset 552 into the "struct module *" that wa returned by load_module().

-Tony

#6 lore raw
Quoted 4 lines · Tony Luck

At the point of dereference it looks like we were trying to load a 4-byte data object from offset 552 into the "struct module *" that wa returned by load_module().

Sounds like 'mod->num_ctors' loaded by do_mod_ctors(). It's a 4-byte field in roughly that area.

What does a NaT consumption fault mean, and does it give the invalid address it was loaded off? In the successful path of "load_module()", we will have dereferenced the "mod" pointer we return just before, so I wonder if there's some error case that incorrectly returns a positive errno instead of a negative one, and causes us to miss the "IS_ERR()" check or something.

There's a couple of checking routines in module.c that do not return a negative error, but instead return 0/1. The one I looked at was converted into a negative error, but there are several cases of

if (err)
return ERR_PTR(err)

and if something does that on a 0/1 value, it will return a bogus pointer.

Linus

#7 lore raw
Quoted 2 lines

What does a NaT consumption fault mean, and does it give the invalid address it was loaded off?

This almost always means that we dereferenced a NULL pointer ... though any access into the bottom PAGE_SIZE of kernel virtual address space will result in this trap. This happens on ia64 because we have a "NaT" page mapped at 0x0 so that speculative loads that chase NULL pointers at the end of lists behave more rationally.

Sadly I don't have the actual address. The register that was used for the dereference isn't included in the OOPS output.

-Tony

#8 lore raw
Quoted 9 lines · Tony

This almost always means that we dereferenced a NULL pointer ... though any access into the bottom PAGE_SIZE of kernel virtual address space will result in this trap. This happens on ia64 because we have a "NaT" page mapped at 0x0 so that speculative loads that chase NULL pointers at the end of lists behave more rationally.

Sadly I don't have the actual address. The register that was used for the dereference isn't included in the OOPS output.

Ok, so it confirms just that load_module() has returned a pointer that is either NULL or at least within PAGE_SIZE-552.

It could be a negative error pointer (and the offset of 552 turns it into the NULL page), but that's what the whole IS_ERR() thing checks for, so that's not the case.

So the

	if (err)
		return ERR_PTR(err);

case does seem pretty likely (most of them with a "goto <error-case>", but some directly. Many of them have the stricter form of "if (err < 0)", but there's a number that do not.

And in fact, I think I see the bad one:

        /* Figure out module layout, and allocate all the memory. */
        mod = layout_and_allocate(&info);
        if (IS_ERR(mod))
                goto free_copy;

which looks fine, but "free_copy:" expects the error number in "err", which is what the other error cases do.

I think this was introduced by Rusty's commit 5d3f5be82944 ("module:
layout_and_allocate"), and here's a suggested fix.. The easiest fix is to actually change the "free_copy" target to return "mod" as the above goto expects, and then just do a conversion before the fall-through from the other error cases (that have it in 'err').

Does this fix it? I stopped looking for other possible causes when I found this one.

Linus

---
 kernel/module.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
kernel/module.c +2 -1
index 69a3f12..9a0b275 100644
@@ -2653,9 +2653,10 @@ static struct module *load_module(void __user *umod,
 	module_unload_free(mod);
  free_module:
 	module_deallocate(mod, &info);
+	mod = ERR_PTR(err);
  free_copy:
 	free_copy(&info);
-	return ERR_PTR(err);
+	return mod;
 }
 
 /* Call module constructors. */
#9 lore raw
Quoted 2 lines

Does this fix it? I stopped looking for other possible causes when I found this one.

It gets rid of the oops. So that's good. Something is still hokey in linux-next land though because no modules get loaded. So no ehci/uhci available :-(

No obvious looking error messages on the console.

-Tony

---
 kernel/module.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
kernel/module.c +2 -1
index 69a3f12..9a0b275 100644
@@ -2653,9 +2653,10 @@ static struct module *load_module(void __user *umod,
 	module_unload_free(mod);
  free_module:
 	module_deallocate(mod, &info);
+	mod = ERR_PTR(err);
  free_copy:
 	free_copy(&info);
-	return ERR_PTR(err);
+	return mod;
 }
 
 /* Call module constructors. */
#10 lore raw
Quoted 4 lines · Tony

It gets rid of the oops. So that's good. Something is still hokey in linux-next land though because no modules get loaded. So no ehci/uhci available :-(

So maybe the error (the one that caused us to exit and caused the oops due to the wrong return value) is the one that now causes it to not load.

I note that ia64 has a pretty big/complex module_frob_arch_sections(). Many architectures (like x86) has a trivial one ("return 0;"), and there might be some ordering differences in the setup that only matter with architectures that do odd things there..

Linus

#11 lore raw
Quoted 7 lines · Linus Torvalds
Quoted 4 lines · Tony

It gets rid of the oops. So that's good. Something is still hokey in linux-next land though because no modules get loaded. So no ehci/uhci available :-(

Quoted 7 lines

So maybe the error (the one that caused us to exit and caused the oops due to the wrong return value) is the one that now causes it to not load.

I note that ia64 has a pretty big/complex module_frob_arch_sections(). Many architectures (like x86) has a trivial one ("return 0;"), and there might be some ordering differences in the setup that only matter with architectures that do odd things there..

Hmm, but at a glance nothing else in layout_and_allocate() can fail silently, and ia64's module_arch_frob_sections() has a printk on fail.

But, the June 3 tree (beware dateline: we are talking next-20100603?) had the "deref per-cpu ptr before allocating it" issue which was fixed the following day.

There have been three bugfixes since then, too:
1) I have also thrown out the "clean up percpu" commit, which would fail on any relocations in the percpu section.
2) Linus' error path fix (I did it slightly different for consistency)
3) SYSFS=n compile issue.

Since it's a weekend here already, we're not going to get another linux-next until Monday.

Here's a tree with all current fixes: still no module load?

The following changes since commit ad8456361fa19068cf49b50a4f98e41b73c08e76:
Linus Torvalds (1):
Merge branch 'upstream-linus' of git://git.kernel.org/.../jgarzik/libata-dev

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6 module

Eric Dumazet (1):
module: module_unload_init() cleanup

Linus Torvalds (6):
module: Make the 'usage' lists be two-way
module: move find_module check to end
module: refactor load_module
module: refactor load_module part 2
module: reduce stack usage for each_symbol()
module: fix bne2 "gave up waiting for init of module libcrc32c"

Rusty Russell (18):
module: fix kdb's illicit use of struct module_use.
module: move sysfs exposure to end of load_module
module: Make module sysfs functions private.
module: make locking more fine-grained.
module: verify_export_symbols under the lock
module: fix bne2 "gave up waiting for init of module libcrc32c"
module: refactor load_module part 3
module: refactor load_module part 4
module: refactor load_module part 5
module: refactor out section header rewriting
module: kallsyms functions take struct load_info
module: layout_and_allocate
module: sysfs cleanup
module: fix sysfs cleanup for !CONFIG_SYSFS
module: pass load_info into other functions
module: move module args strndup_user to just before use
module: group post-relocation functions into post_relocation()
module: cleanup comments, remove noinline

 include/linux/module.h      |   44 +--
 kernel/debug/kdb/kdb_main.c |   12 +-
 kernel/module.c             | 1362 ++++++++++++++++++++++++-------------------
 3 files changed, 779 insertions(+), 639 deletions(-)
#12 lore raw
Quoted 1 line · Rusty Russell

Here's a tree with all current fixes: still no module load?

Erk, terminally broken tree. Will re-xmit once fixed...

Rusty.

#13 lore raw
Quoted 4 lines · Rusty Russell
Quoted 1 line · Rusty Russell

Here's a tree with all current fixes: still no module load?

Erk, terminally broken tree. Will re-xmit once fixed...

I'd introduced a bug with MODVERSIONS=y in "module: refactor out section header rewriting". Not doing too well on this...

Fixed that, too (see below for fix if curious).

This time for sure!
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6.git module

Subject: module: refactor out section header rewriting: FIX modversions

We can't do the find_sec after removing the SHF_ALLOC flags; it won't find the sections.

---
 kernel/module.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
kernel/module.c +6 -6
@@ -2217,11 +2217,13 @@ static int rewrite_section_headers(struc
 		if (strstarts(info->secstrings+shdr->sh_name, ".exit"))
 			shdr->sh_flags &= ~(unsigned long)SHF_ALLOC;
 #endif
-		/* Don't keep modinfo and version sections. */
-		if (!strcmp(info->secstrings+shdr->sh_name, "__versions")
-		    || !strcmp(info->secstrings+shdr->sh_name, ".modinfo"))
-			shdr->sh_flags &= ~(unsigned long)SHF_ALLOC;
 	}
+
+	/* Track but don't keep modinfo and version sections. */
+	info->index.vers = find_sec(info->hdr, info->sechdrs, info->secstrings, "__versions");
+	info->index.info = find_sec(info->hdr, info->sechdrs, info->secstrings, ".modinfo");
+	info->sechdrs[info->index.info].sh_flags &= ~(unsigned long)SHF_ALLOC;
+	info->sechdrs[info->index.vers].sh_flags &= ~(unsigned long)SHF_ALLOC;
 	return 0;
 }
 
@@ -2274,8 +2276,6 @@ static struct module *setup_load_info(st
 		return ERR_PTR(-ENOEXEC);
 	}
 
-	info->index.vers = find_sec(info->hdr, info->sechdrs, info->secstrings, "__versions");
-	info->index.info = find_sec(info->hdr, info->sechdrs, info->secstrings, ".modinfo");
 	info->index.pcpu = find_pcpusec(info->hdr, info->sechdrs, info->secstrings);
 
 	/* Check module struct version now, before we try to use module. */
#14 lore raw
Quoted 1 line

This time for sure!

Something very like that patch showed up in next-20100607 ... so I took that for a spin. Everything seems tickety-boo. Modules get loaded with no OOPSen. All my devices are found and working.

Thanks

-Tony

#15 lore raw

Re: linux-next: Tree for June 3 (qlcnic)

In reply to Stephen Rothwell
Quoted 3 lines · On Thu, 3 Jun 2010 13:47:53 +1000 Stephen Rothwell wrote:

Hi all,

Changes since 20100602:

when CONFIG_INET=n:

ERROR: "qlcnicvf_set_ilb_mode" [drivers/net/qlcnic/qlcnic.ko] undefined!
ERROR: "qlcnicvf_config_bridged_mode" [drivers/net/qlcnic/qlcnic.ko] undefined!
ERROR: "qlcnicvf_config_led" [drivers/net/qlcnic/qlcnic.ko] undefined!
ERROR: "qlcnicvf_clear_ilb_mode" [drivers/net/qlcnic/qlcnic.ko] undefined!
ERROR: "qlcnicvf_start_firmware" [drivers/net/qlcnic/qlcnic.ko] undefined!

full config is attached.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#16 lore raw

Re: linux-next: Tree for June 3 (qlcnic)

Quoted 9 lines · Randy Dunlap
Quoted 3 lines · On Thu, 3 Jun 2010 13:47:53 +1000 Stephen Rothwell wrote:

Hi all,

Changes since 20100602:

when CONFIG_INET=n:

Quoted 8 lines

ERROR: "qlcnicvf_set_ilb_mode" [drivers/net/qlcnic/qlcnic.ko] undefined!
ERROR: "qlcnicvf_config_bridged_mode" [drivers/net/qlcnic/qlcnic.ko] undefined!
ERROR: "qlcnicvf_config_led" [drivers/net/qlcnic/qlcnic.ko] undefined!
ERROR: "qlcnicvf_clear_ilb_mode" [drivers/net/qlcnic/qlcnic.ko] undefined!
ERROR: "qlcnicvf_start_firmware" [drivers/net/qlcnic/qlcnic.ko] undefined!

full config is attached.

Sorry about that. I will send fix right away.

thanks,
Anirban

#17 lore raw

Re: linux-next: Tree for June 3 (iwlwifi)

In reply to Stephen Rothwell
Quoted 3 lines · On Thu, 3 Jun 2010 13:47:53 +1000 Stephen Rothwell wrote:

Hi all,

Changes since 20100602:

when CONFIG_IWLAGN=n:

drivers/net/wireless/iwlwifi/iwl-rx.c:254: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:303: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:304: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:305: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:306: error: 'struct iwl_priv' has no member named '_agn'

and many more.

Haven't we seen this movie before?

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code *** --
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#18 lore raw

Re: linux-next: Tree for June 3 (iwlwifi)

Quoted 15 lines · Randy Dunlap
Quoted 3 lines · On Thu, 3 Jun 2010 13:47:53 +1000 Stephen Rothwell wrote:

Hi all,

Changes since 20100602:

when CONFIG_IWLAGN=n:

drivers/net/wireless/iwlwifi/iwl-rx.c:254: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:303: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:304: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:305: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:306: error: 'struct iwl_priv' has no member named '_agn'

Quoted 3 lines

and many more.

Haven't we seen this movie before?

Ugh...caused be this:

commit a2064b7a4a22d118087898e4308670da7ac07911

Author: Wey-Yi Guy <[email protected]>
Date:   Fri Apr 30 14:21:48 2010 -0700

iwlwifi: move _agn statistics related structure

agn and 3945 has different statistics_notif data structure; since 3945 has it statistics_notif data structure inside the _3945 portion of iwl_priv, it make sense to move the agn statistics_notif into _agn portion.

Since iwl-rx.o is part of iwlcore.ko, this change seems wrong. Reinette, any reason why I shouldn't just revert it?

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#19 lore raw

Re: linux-next: Tree for June 3 (iwlwifi)

Hi John,

Quoted 32 lines · John W. Linville
Quoted 15 lines · Randy Dunlap
Quoted 3 lines · On Thu, 3 Jun 2010 13:47:53 +1000 Stephen Rothwell wrote:

Hi all,

Changes since 20100602:

when CONFIG_IWLAGN=n:

drivers/net/wireless/iwlwifi/iwl-rx.c:254: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:303: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:304: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:305: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:306: error: 'struct iwl_priv' has no member named '_agn'

Quoted 3 lines

and many more.

Haven't we seen this movie before?

Ugh...caused be this:

commit a2064b7a4a22d118087898e4308670da7ac07911

Author: Wey-Yi Guy <[email protected]>
Date:   Fri Apr 30 14:21:48 2010 -0700

iwlwifi: move _agn statistics related structure

agn and 3945 has different statistics_notif data structure; since 3945 has it statistics_notif data structure inside the _3945 portion of iwl_priv, it make sense to move the agn statistics_notif into _agn portion.

Quoted 6 lines

Since iwl-rx.o is part of iwlcore.ko, this change seems wrong. Reinette, any reason why I shouldn't just revert it?

Sorry for the mistake, please revert it and I will fix the issue and re-submit.

Thanks
Wey

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#20 lore raw

Re: linux-next: Tree for June 3 (iwlwifi)

In reply to John W. Linville

Hi John,

Quoted 28 lines · John W. Linville
Quoted 15 lines · Randy Dunlap
Quoted 3 lines · On Thu, 3 Jun 2010 13:47:53 +1000 Stephen Rothwell wrote:

Hi all,

Changes since 20100602:

when CONFIG_IWLAGN=n:

drivers/net/wireless/iwlwifi/iwl-rx.c:254: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:303: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:304: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:305: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:306: error: 'struct iwl_priv' has no member named '_agn'

Quoted 3 lines

and many more.

Haven't we seen this movie before?

Ugh...caused be this:

commit a2064b7a4a22d118087898e4308670da7ac07911

Author: Wey-Yi Guy <[email protected]>
Date:   Fri Apr 30 14:21:48 2010 -0700

iwlwifi: move _agn statistics related structure

Quoted 8 lines

agn and 3945 has different statistics_notif data structure; since 3945 has it statistics_notif data structure inside the _3945 portion of iwl_priv, it make sense to move the agn statistics_notif into _agn portion.

Since iwl-rx.o is part of iwlcore.ko, this change seems wrong.

Indeed. Sorry about this.

Quoted 1 line

Reinette, any reason why I shouldn't just revert it?

No - please do revert it. I am getting an unfamiliar error when I tried to revert it from linux-2.6 as well as wireless-testing, but perhaps it is something your are familiar with. Please let me know if you need a patch that will take care of the revert.

Reinette

#21 lore raw

PATCH 1/1 classmate-laptop: fix for RFKILL=m, CMPC=y

In reply to Stephen Rothwell

From: Randy Dunlap <[email protected]>

Fix build error when CONFIG_RFKILL=m and CONFIG_ACPI_CMPC=y:
classmate-laptop should depend on RFKILL or RFKILL=n.

classmate-laptop.c:(.text+0x1351fc): undefined reference to rfkill_unregister' classmate-laptop.c:(.text+0x135204): undefined reference to rfkill_destroy' classmate-laptop.c:(.text+0x135237): undefined reference to rfkill_set_sw_state' classmate-laptop.c:(.text+0x1352b9): undefined reference to rfkill_alloc' classmate-laptop.c:(.text+0x1352ca): undefined reference to rfkill_register' classmate-laptop.c:(.text+0x1352d6): undefined reference to rfkill_destroy'

---
 drivers/platform/x86/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +1 -0
@@ -520,6 +520,7 @@ config TOSHIBA_BT_RFKILL
 config ACPI_CMPC
 	tristate "CMPC Laptop Extras"
 	depends on X86 && ACPI
+	depends on RFKILL || RFKILL=n
 	select INPUT
 	select BACKLIGHT_CLASS_DEVICE
 	default n
#22 lore raw

Re: [PATCH -next] classmate-laptop: fix for RFKILL=m, CMPC=y

Quoted 12 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Fix build error when CONFIG_RFKILL=m and CONFIG_ACPI_CMPC=y:
classmate-laptop should depend on RFKILL or RFKILL=n.

classmate-laptop.c:(.text+0x1351fc): undefined reference to rfkill_unregister' classmate-laptop.c:(.text+0x135204): undefined reference to rfkill_destroy' classmate-laptop.c:(.text+0x135237): undefined reference to rfkill_set_sw_state' classmate-laptop.c:(.text+0x1352b9): undefined reference to rfkill_alloc' classmate-laptop.c:(.text+0x1352ca): undefined reference to rfkill_register' classmate-laptop.c:(.text+0x1352d6): undefined reference to rfkill_destroy'

Quoted 2 lines

---

Randy,

Since this implies a build failure, shouldn't it be sent for rc too?

Best Regards,
Cascardo.

Quoted 13 lines
 drivers/platform/x86/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +1 -0
@@ -520,6 +520,7 @@ config TOSHIBA_BT_RFKILL
 config ACPI_CMPC
 	tristate "CMPC Laptop Extras"
 	depends on X86 && ACPI
+	depends on RFKILL || RFKILL=n
 	select INPUT
 	select BACKLIGHT_CLASS_DEVICE
 	default n
#23 lore raw

Re: [PATCH -next] classmate-laptop: fix for RFKILL=m, CMPC=y

Quoted 13 lines · Thadeu Lima de Souza Cascardo
Quoted 12 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Fix build error when CONFIG_RFKILL=m and CONFIG_ACPI_CMPC=y:
classmate-laptop should depend on RFKILL or RFKILL=n.

classmate-laptop.c:(.text+0x1351fc): undefined reference to rfkill_unregister' classmate-laptop.c:(.text+0x135204): undefined reference to rfkill_destroy' classmate-laptop.c:(.text+0x135237): undefined reference to rfkill_set_sw_state' classmate-laptop.c:(.text+0x1352b9): undefined reference to rfkill_alloc' classmate-laptop.c:(.text+0x1352ca): undefined reference to rfkill_register' classmate-laptop.c:(.text+0x1352d6): undefined reference to rfkill_destroy'

Quoted 7 lines
Quoted 2 lines

---

Randy,

Since this implies a build failure, shouldn't it be sent for rc too?

Yes, it should.
I hit the problem during a linux-next build, but it does apply to mainline as well. Thanks.

Quoted 13 lines
Quoted 13 lines
 drivers/platform/x86/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +1 -0
@@ -520,6 +520,7 @@ config TOSHIBA_BT_RFKILL
 config ACPI_CMPC
 	tristate "CMPC Laptop Extras"
 	depends on X86 && ACPI
+	depends on RFKILL || RFKILL=n
 	select INPUT
 	select BACKLIGHT_CLASS_DEVICE
 	default n
Signature · 2 lines
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
#24 lore raw

Re: [PATCH -next] classmate-laptop: fix for RFKILL=m, CMPC=y

Quoted 6 lines · Randy Dunlap
Quoted 1 line · Thadeu Lima de Souza Cascardo

Since this implies a build failure, shouldn't it be sent for rc too?

Yes, it should.
I hit the problem during a linux-next build, but it does apply to mainline as well. Thanks.

It's been sent upstream, but Linus didn't pull. I'll see if I can find a set he's willing to take.

Signature · 1 line
Matthew Garrett | [email protected]