2006-03-12 11:12:56

by Andrew Morton

[permalink] [raw]
Subject: 2.6.16-rc6-mm1


ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/


- Added git-wireless.patch to the -mm lineup. John Linville it looking
after this tree. It's presently empty - I guess he recently merged into
git-netdev-all.

- I renamed `linus.patch' to `origin.patch'. It's derived from the git
branch name. (origin.patch is Linus's current diff relative to the
most-recently-released kernel). origin.patch is empty too.

- Added git-scsi-target.patch to the -mm lineup (James Bottomley). Turn
your Linux box into scsi peripheral!

- New slab debugging infrastructure - define CONFIG_DEBUG_SLAB_LEAK and
/proc/slab_allocators appears (Al Viro).

- The NFS tree is a bit sick - you may see the `busy inodes - self destruct
in five seconds" message when performing NFS unmounts. It seems relatively
harmless.

- Big updates in the networking development tree (git-net.patch). They seem
to be due to:

Author: Catherine Zhang <[email protected]>
Date: Fri Mar 10 00:34:15 2006 -0800

[SECURITY]: TCP/UDP getpeersec

This patch implements an application of the LSM-IPSec networking
controls whereby an application can determine the label of the
security association its TCP or UDP sockets are currently connected to
via getsockopt and the auxiliary data mechanism of recvmsg.

Which I am sure is very good.




Changes since 2.6.16-rc5-mm3:


git-acpi.patch
git-agpgart.patch
git-alsa.patch
git-arm.patch
git-audit-master.patch
git-blktrace.patch
git-cfq.patch
git-cifs.patch
git-cpufreq.patch
git-drm.patch
git-dvb.patch
git-ia64.patch
git-ieee1394.patch
git-infiniband.patch
git-input.patch
git-jfs.patch
git-kbuild.patch
git-libata-all.patch
git-netdev-all.patch
git-net.patch
git-nfs.patch
git-ntfs.patch
git-ocfs2.patch
git-powerpc.patch
git-sym2.patch
git-pcmcia.patch
git-scsi-misc.patch
git-scsi-rc-fixes.patch
git-scsi-target.patch
git-sas-jg.patch
git-sparc64.patch
git-watchdog.patch
git-xfs.patch
git-cryptodev.patch
git-viro-bird-m32r.patch
git-viro-bird-m68k.patch
git-viro-bird-xfs.patch
git-viro-bird-uml.patch
git-viro-bird-frv.patch
git-viro-bird-upf.patch
git-viro-bird-volatile.patch

git trees

-powerpc-restore-eeh_add_device_late-prototype.patch
-serial-core-work-around-sub-driver-bugs.patch
-i386-port-ati-timer-fix-from-x86_64-to-i386-ii.patch
-i386-port-ati-timer-fix-from-x86_64-to-i386-ii-fixes.patch
-cramfs-mounts-provide-corrupted-content-since-2615.patch
-i4l-add-new-pci-ids-for-hfc-s-pci.patch
-i4l-fix-refcounting-problem-with-ttyix-devices.patch
-i4l-fix-compatiblity-issue-with-big-endian-systems.patch
-x86-fix-potential-jiffies-overflow-in-timer_resume.patch
-fix-next_timer_interrupt-for-hrtimer.patch
-s390-fix-compile-with-virt_cpu_accounting=n.patch
-add-missing-pm_power_offs.patch
-memory-hotplug-compile-fix.patch
-increase-max-kmalloc-size-for-very-large-systems.patch
-time-add-barrier-after-updating-jiffies_64.patch
-alsa-fix-error-paths-in-snd_ctl_elem_add.patch
-numa_maps-update.patch
-efi-fix-gdt-load.patch
-ramfs-needs-to-update-directory-m-ctime-on-symlink.patch
-smaps-hugepages-fix.patch
-smaps-shared-fix.patch
-windfarm-license-fix.patch
-s390-fix-match-in-ccw-modalias.patch
-s390-multiple-subchannel-sets-support.patch
-udf-fix-uid-gid-options-and-add-uid-gid=ignore-and-forget-options.patch
-fix-usbmixer-double-kfree.patch
-emu10k1_synth-use-after-free.patch
-sound-isa-sb-sb_mixerc-double-kfree.patch
-ad1848-double-free.patch
-opl3_oss-use-after-free.patch
-opl3_seq-use-after-free.patch
-idle-threads-should-have-a-sane-timestamp-value.patch
-__get_unaligned-gcc4-fix.patch
-kdump-x86_64-timer-interrupt-lockup-due-to-pending-interrupt.patch
-x86-fix-i386-nmi_watchdog-that-does-not-trigger-die_nmi.patch
-percpu_counter_sum.patch
-rcu-batch-tuning.patch
-fix-file-counting.patch
-vx-fix-memory-leak-on-error-path.patch
-dont-check-vfree-argument-for-null-in-vx_pcm.patch
-dont-check-vfree-arg-for-null-in-usbaudio.patch
-dont-null-check-vfree-argument-in-pdaudiocf_pcm.patch
-git-audit-fixes.patch
-sem2mutex-audit_netlink_sem.patch
-simplify-audit_free-locking.patch
-git-cifs-fixup.patch
-ia64-dont-report-sn2-or-summit-hardware-as-an-error.patch
-sgi-sn-drivers-dont-report-sn2-hardware-as-an-error.patch
-drivers-scsi-libata-scsic-make-some-functions-static.patch
-tulip-natsemi-dp83840a-phy-fix.patch
-8139cp-register-interrupt-handler-when-net-device-is-registered.patch
-3c509-bus-registration-fix.patch
-ne2000-kconfig-help-entry-improvement.patch
-de620-fix-section-mismatch-warning.patch
-git-net-build-hacks.patch
-git-net-build-hacks-fixes.patch
-git-net-vs-remove-module_parm.patch
-sem2mutex-drivers-net-irda.patch
-sem2mutex-net.patch
-sem2mutex-sungem.patch
-sem2mutex-cassini.patch
-sem2mutex-net-2.patch
-happtmeal-add-pci-probing.patch
-suni-cast-arg-properly-in-sonet_setframing.patch
-net-tipc-possible-cleanups.patch
-dev_put-dev_hold-cleanup.patch
-wan-fix-section-mismatch-warning-in-sbni.patch
-powerpc-fix-pud_error-message.patch
-git-scsi-misc-sr_ioctl-missing-memset.patch
-git-scsi-misc-sr_ioctl-missing-memset-2.patch
-scsi-cd-varirec-gigarec-and-powerrec-as-user.patch
-gregkh-usb-usb-initdata-fixes.patch
-x86_64-mm-c3-timer-check-amd.patch
-x86_64-mm-blk-bounce.patch
-x86_64-mm-i386-early-alignment.patch
-x86_64-mm-blk-bounce-ia64-fix.patch
-x86_64-mm-dmi-year-fix.patch
-x86_64-mm-c3-timer-check-amd-fix.patch
-slab-node-rotor-for-freeing-alien-caches-and-remote-per-cpu-pages.patch
-slab-node-rotor-for-freeing-alien-caches-and-remote-per-cpu-pages-fix.patch
-powerpc-fix-windfarm_pm112-not-starting-all-control-loops.patch
-x86-cpu-model-calculation-for-family-6-cpu.patch
-s390-increase-spinlock-retry-code-performance.patch
-jffs2-fix-size_t-on-64bit-architectures.patch

Merged.

+mtd_dataflash-fix-block-vs-page-erase.patch

Current 2.6.16 queue

-git-acpi-up-fix-2.patch

Folded into git-acpi-up-fix.patch

+acpi-ec-acpi-ecdt-uid-hack.patch
+acpi-thermal-driver-leaks-in-failure-path.patch
+acpi-memory-hotplug-cannot-manage-_crs-with-plural-resoureces.patch
+drivers-acpi-videoc-fix-a-null-pointer-dereference.patch

ACPI fixes.

+sony_apci-resume.patch

Add simple resume support to 2.6-sony_acpi4.patch. Doesn't work because
ACPI doesn't call the resume handlers.

+sound-core-fix-3-off-by-one-errors.patch
+sound-pci-rme9652-hdspmc-fix-off-by-one-errors.patch
+msi-k8t-neo2-fir-onboardsound-and-additional-soundcard.patch

ALSA fixes

+block-layer-increase-size-of-disk-stat.patch

Avoid disk-stat overflows.

+gregkh-driver-kobject-add-error-notify.patch
+gregkh-driver-kobject-kobject.h-fix-a-typo.patch
+gregkh-driver-sysfs-fix-problem-with-duplicate-sysfs-directories-and-files.patch

Driver tree updates

-topologyc-tweaks.patch
-cpuc-section-fixes.patch

Dropped - this was hard.

+spi-update-to-pxa2xx-spi-driver.patch

SPI driver update.

+drivers-ieee1394-ohci1394c-function-calls-without-effect.patch

Firewire fixlet

-input-pcspkr-device-and-driver-separation-fix.patch
-input-pcspkr-device-and-driver-separation-fix-2.patch
-input-pcspkr-device-and-driver-separation-fix-3.patch

Folded into input-pcspkr-device-and-driver-separation.patch

+drivers-input-serio-serioc-fix-a-memory-leak.patch
+drivers-input-gameport-gameportc-fix-a-memory-leak.patch

Input layer fixes.

+ahci-fix-null-pointer-dereference-detected-by-coverity.patch

libata fix

+dead-code-in-mtd-maps-pcic.patch
+add-chip-used-in-collie-to-jedec_probe.patch

MTD fixes

+git-netdev-all-ipw2200-warning-fix.patch

Fix warning in git-netdev-all.patch

+drivers-net-ns83820c-add-paramter-to-disable-auto-tidy-2.patch
+drivers-net-ns83820c-add-paramter-to-disable-auto-tidy-fix.patch

Update drivers-net-ns83820c-add-paramter-to-disable-auto.patch

+tulip-natsemi-dp83840a-phy-fix.patch

Tulip fix

-3c509-use-proper-suspend-resume-api-fix.patch

Folded into 3c509-use-proper-suspend-resume-api.patch

-pm-suspend-eisa-and-mca-devices.patch
-pm-suspend-eisa-and-mca-devices-fix.patch

Dropped - didn't work.

+drivers-net-wireless-ipw2200c-make-ipw_qos_current_mode-static.patch
+fix-spidernet-build-issue.patch
+drivers-net-wireless-ipw2200c-fix-an-array-overun.patch

netdev fixes

+git-net-arm-build-fix.patch
+git-net-export-security_sid_to_context.patch
+git-net-ebtables-fix.patch
+git-net-br_netfilter-warning-fixes.patch

git-net fixes

-net-allow-32-bit-socket-ioctl-in-64-bit-kernel-tidy.patch
-net-socket-timestamp-32-bit-handler-for-64-bit-kernel-tidy.patch
-net-socket-timestamp-32-bit-handler-for-64-bit-kernel-fix.patch
-x25-ioctl-conversion-32-bit-user-to-64-bit-kernel-tidy.patch
-x25-ioctl-conversion-32-bit-user-to-64-bit-kernel-tidy-fix.patch
-x25-allow-itu-t-dte-facilities-for-x25-tidy.patch

Folded into other patches

+net-decnet-dn_routec-fix-inconsequent-null-checking.patch

decnet fixlet.

+nfs-fix-a-busy-inodes-issue.patch

Try to avoid use-after-free in git-nfs.patch

+git-nfs-oops-workaround.patch

That didn't work. Leak it instead.

-nfs-permit-filesystem-to-override-root-dentry-on-mount.patch
-nfs-permit-filesystem-to-override-root-dentry-on-mount-update.patch
-nfs-apply-mount-root-dentry-override-to-filesystems.patch
-nfs-apply-mount-root-dentry-override-to-filesystems-v9fs-fix.patch
-nfs-abstract-out-namespace-initialisation.patch
-nfs-add-dentry-materialisation-op.patch
-nfs-unify-nfs-superblocks-per-protocol-per-server.patch
-nfs-unify-nfs-superblocks-per-protocol-per-server-fix.patch
-nfs-apply-mount-root-dentry-override-to-filesystems-v9fs-fix-2.patch
-nfs-apply-mount-root-dentry-override-to-filesystems-fix-3.patch
+nfs-permit-filesystem-to-override-root-dentry-on-mount-6.patch
+9p-fix-error-handling-on-superblock-alloc-failure.patch
+nfs-abstract-out-namespace-initialisation-6.patch
+nfs-add-dentry-materialisation-op-6.patch
+nfs-unify-nfs-superblocks-per-protocol-per-server-6.patch

Updated NFS superblock sharing patches

+optimise-d_find_alias.patch
+optimise-d_find_alias-fix.patch

VFS speedup.

+gregkh-pci-pci-cpqphp_ctrl.c-board_replaced-remove-dead-code.patch
+gregkh-pci-pci-the-scheduled-removal-of-pci_legacy_proc.patch
+gregkh-pci-pci-provide-a-boot-parameter-to-disable-msi.patch
+gregkh-pci-pci-fix-pci_request_region-arg.patch

PCI tree updates

+fix-pcmcia_device_remove-oops.patch

Fix git-pcmcia.patch

+drivers-scsi-ncr_d700c-fix-a-null-dereference.patch
+scsi-dmx3191dc-fix-a-null-pointer-dereference.patch
+drivers-scsi-ibmmcac-fix-a-null-pointer-dereference.patch
+scsi-megaraid-megaraid_mmc-fix-a-null-pointer-dereference.patch
+drivers-scsi-sim710c-fix-a-null-pointer-dereference.patch

scsi fixes

-gregkh-usb-usb-reduce-syslog-clutter.patch
-revert-gregkh-usb-usb-reduce-syslog-clutter.patch
+gregkh-usb-usb-ub-01-remove-first_open.patch
+gregkh-usb-usb-ub-02-remove-diag.patch
+gregkh-usb-usb-ub-03-drop-stall-clearing.patch
+gregkh-usb-usb-usbcore-don-t-assume-a-usb-configuration-includes-any-interfaces.patch
+gregkh-usb-usb-usbcore-usb_set_configuration-oops.patch
+gregkh-usb-usb-initdata-fixes.patch

USB tree updates

+drivers-usb-media-vicamc-fix-a-null-pointer-dereference.patch
+usbcore-fix-check_ctrlrecip-to-allow-control-transfers-in-state-address.patch

USB fixes

+hostap_apchostap_add_sta-inconsequent-null-checking.patch

Wireless fix

+x86_64-mm-reorder-one-field-of-the-pda-to-reduce-padding.patch
+x86_64-mm-noexec32-default.patch
+x86_64-mm-timer-broadcast-amd.patch
+x86_64-mm-memmap-alloc.patch
+x86_64-mm-lost-ticks-dump-rip.patch
+x86_64-mm-use-cpumask-bitops-for-cpu_vm_mask.patch
+x86_64-mm-kexec-interrupt-ack.patch
+x86_64-mm-free_bootmem_node-needs-__pa-in-allocate_aperture.patch
+x86_64-mm-lagrange-feature.patch

x86_64 updates

+x86_64-mm-timer-broadcast-amd-fix.patch
+x86_64-mm-timer-broadcast-amd-fix-2.patch

Fix it.

+vmscan-scan_control-cleanup-speedup.patch

Speed up vmscan-scan_control-cleanup.patch

+convert-hugetlbfs_counter-to-atomic.patch
+optimize-follow_hugetlb_page.patch
+page-migration-documentation-update.patch
+drain_node_pages-interrupt-latency-reduction--optimization.patch
+drain_node_pages-interrupt-latency-reduction-optimization-update.patch
+slab-leaks.patch
+slab-leaks3-locking-fix.patch
+slab-leaks3-default-y.patch

mm updates

+i386-spinlocks-disable-interrupts-only-if-we-enabled.patch
+x86-some-fixups-for-the-x86_numaq-dependencies.patch
+x86-make-_syscallx-macros-compile-in-pic-mode.patch

x86 updates

+efi-fixes.patch

Fix the EFI/DMI patches in -mm.

+make-the-oss-sound_via82cxxx-option-available-again.patch

Update update-obsolete_oss_driver-schedule-and-dependencies.patch

-let-dac960-supply-entropy-to-random-pool.patch

Was fixed differently.

+v9fs-print-9p-messages-fix.patch
+v9fs-print-9p-messages-fix-2.patch
+fs-9p-make-2-functions-static.patch
+v9fs-print-9p-messages-fix-3.patch

Fix v9fs-print-9p-messages.patch

+irq-uninline-migration-functions.patch
+irq-prevent-enabling-of-previously-disabled-interrupt.patch
+pollrdhup-epollrdhup-handling-for-half-closed-devices.patch
+add-a-proper-prototype-for-setup_arch.patch
+refactor-capable-to-one-implementation-add-__capable-helper.patch
+make-cap_ptrace-enforce-ptrace_tracme-checks.patch
+fix-messages-in-fs-minix.patch
+freeze_bdev-cleanup.patch
+move-cond_resched-after-iput-in-sync_sb_inodes.patch
+reduce-sched-latency-in-shrink_dcache_sb.patch
+kallsyms-handle-malloc-failure.patch
+per-cpufy-net-proto-structures-add-percpu_counter_modbh.patch
+per-cpufy-net-proto-structures-add-percpu_counter_modbh-tidy.patch
+percpu-counters-add-percpu_counter_exceeds.patch
+percpu-counters-add-percpu_counter_exceeds-tidy.patch
+per-cpufy-net-proto-structures-protomemory_allocated.patch
+per-cpufy-net-proto-structures-protomemory_allocated-use-percpu_counter_exceeds.patch
+per-cpufy-net-proto-structures-sockets_allocated.patch
+per-cpufy-net-proto-structures-protoinuse.patch
+per-cpufy-net-proto-structures-protoinuse-fix.patch
+ext3-fix-debug-logging-only-compilation-error.patch
+find_task_by_pid-needs-tasklist_lock.patch
+i2o-memory-leak-in-i2o_exec_lct_modified.patch
+blk_dev_initrd-do-not-require-blk_dev_ram=y.patch
+reiserfs-xattr_aclcreiserfs_get_acl-make-size-an-int.patch
+drivers-char-watchdog-pcwd_usbc-fix-a-null-pointer-dereference.patch
+md-bitmapcbitmap_mask_state-fix-inconsequent-null-checking.patch
+net-sunrpc-clntc-fix-a-null-pointer-dereference.patch
+rename-setuid-dumpable-sysctl.patch
+drivers-char-ipmi-ipmi_msghandlerc-fix-a-memory-leak.patch
+removal-of-long-incorrect-address-for-jamie-lokier.patch
+remove-dead-address-from-maintainers-list.patch

Misc random general patches.

+remove-redundant-check-from-autofs4_put_super.patch
+autofs4-follow_link-missing-funtionality.patch

Update autofs4 patches in -mm.

+map-multiple-blocks-for-mpage_readpages-use-buffer_mapped.patch

Simplify map-multiple-blocks-for-mpage_readpages.patch

+ext3-add-o-bh-option.patch
+ext3-nobh-writeback-support-for-filesystems-blocksize.patch

Updates to the ext3 no-buffer-head option.

+kprobe-handler-discard-user-space-trap-fix-3.patch

Fix kprobe-handler-discard-user-space-trap.patch some more.

+dead-code-in-drivers-isdn-avm-avmcardh.patch

Cleanup

-edac-kconfig-dependency-changes-fix.patch

Dropped (I think)

+knfsd-change-the-store-of-auth_domains-to-not-be-a-cache.patch
+knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix.patch
+knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-2.patch
+knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-3.patch
+knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-3-fix.patch
+knfsd-break-the-hard-linkage-from-svc_expkey-to-svc_export.patch
+knfsd-get-rid-of-inplace-sunrpc-caches.patch
+knfsd-create-cache_lookup-function-instead-of-using-a-macro-to-declare-one.patch
+knfsd-convert-ip_map-cache-to-use-the-new-lookup-routine.patch
+knfsd-use-new-cache_lookup-for-svc_export.patch
+knfsd-use-new-cache_lookup-for-svc_expkey-cache.patch
+knfsd-use-new-sunrpc-cache-for-rsi-cache.patch
+knfsd-use-new-cache-code-for-rsc-cache.patch
+knfsd-use-new-cache-code-for-name-id-lookup-caches.patch
+knfsd-an-assortment-of-little-fixes-to-the-sunrpc-cache-code.patch
+knfsd-remove-definecachelookup.patch
+knfsd-unexport-cache_fresh-and-fix-a-small-race.patch
+knfsd-convert-sunrpc_cache-to-use-krefs.patch
+knfsd-convert-sunrpc_cache-to-use-krefs-fix.patch

knfsd update

+small-schedule-optimization.patch

schedule() tweak.

-uevent-redzoning.patch
-early-boot-safety-in-cond_resched.patch
-pipe-refcounting-cleanup.patch

This was pretty specific debug stuff.

+sched2-sched-domain-sysctl-tidy.patch

Clean up sched2-sched-domain-sysctl.patch

-unify-pfn_to_page-sparc64-pfn_to_page.patch
-unify-pfn_to_page-sparc64-pfn_to_page-fix.patch

No longer needed

+notifier-chain-update-die_chain-changes-fix.patch

Fix notifier-chain-update-die_chain-changes.patch

-fork-allow-init-to-become-a-session-leader.patch
+pids-kill-pidtype_tgid.patch
+resurrect-__put_task_struct.patch
+task-rcu-protect-task-usage.patch
+task-make-task-list-manipulations-rcu-safe.patch
+make-setsid-more-robust.patch
+proc-refactor-reading-directories-of-tasks-dont-assume-pid_aliveinit_task-==-false.patch
+proc-remove-tasklist_lock-from-proc_pid_readdir.patch
+proc-remove-tasklist_lock-from-proc_pid_lookup-and.patch
+#
+pidhash-refactor-the-pid-hash-table.patch
+pidhash-refactor-the-pid-hash-table-fixes.patch
-tref-implement-task-references.patch
-tref-implement-task-references-kill-init_tref.patch
-tref-fix-task_ref-reference-counting.patch
-tref-fix-task_ref-reference-counting-fix.patch
-tref-fix-task_ref-reference-counting-ensure-the-references-is-always-on-the-first-task.patch
+proc-dont-lock-task_structs-indefinitely-always-drop-the-reference-count-in-tid_fd_revalidate.patch
+proc-use-struct-pid-not-struct-task_ref.patch
+proc-remove-tasklist_lock-from-proc_task_readdir.patch

Many updates to the proc/pid/task changes in -mm.

+rivafb-remove-null-check.patch
+nvidiafb-remove-null-check.patch
+nvidiafb-remove-null-check-2.patch
+i810fb-remove-null-check.patch
+savagefb-remove-null-check.patch
+atyfb-remove-dead-code.patch
+imsttfb-remove-dead-code.patch
+nvidiafb-add-id-for-quadro-nvs280.patch
+newportcon-sparse-fix-warnings-in-newport-driver-about.patch

fbdev updates

-kobject_add_dir.patch
-add-holders-slaves-subdirectory-to-sys-block.patch
-bd_claim_by_kobject.patch
-bd_claim_by_disk.patch
-md-to-use-bd_claim_by_disk.patch
-dm-table-store-md.patch
-dm-table-store-md-fix.patch
-dm-to-use-bd_claim_by_disk.patch
-dm-linear-debug.patch

Dropped.

+x86-e820-debugging.patch

Debug the e820 code.



All 1487 patches:


ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/patch-list



2006-03-12 13:17:06

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1

On Sunday 12 March 2006 12:10, Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/

Doesn't compile for me:

rafael@albercik:~/src/mm/linux-2.6.16-rc6-mm1> make
CHK include/linux/version.h
SPLIT include/linux/autoconf.h -> include/config/*
HOSTCC scripts/genksyms/genksyms.o
scripts/genksyms/genksyms.c:35:30: error: ../mod/elfconfig.h: No such file or directory
scripts/genksyms/genksyms.c: In function ‘export_symbol’:
scripts/genksyms/genksyms.c:461: error: ‘MODULE_SYMBOL_PREFIX’ undeclared (first use in this function)
scripts/genksyms/genksyms.c:461: error: (Each undeclared identifier is reported only once
scripts/genksyms/genksyms.c:461: error: for each function it appears in.)
make[2]: *** [scripts/genksyms/genksyms.o] Error 1
make[1]: *** [scripts/genksyms] Error 2
make: *** [scripts] Error 2

Config attached.

Greetings,
Rafael


Attachments:
(No filename) (928.00 B)
2.6.16-rc6-mm1-config (44.11 kB)
Download all attachments

2006-03-12 13:35:32

by Sam Ravnborg

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1

On Sun, Mar 12, 2006 at 02:16:26PM +0100, Rafael J. Wysocki wrote:
> On Sunday 12 March 2006 12:10, Andrew Morton wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>
> Doesn't compile for me:
>
> rafael@albercik:~/src/mm/linux-2.6.16-rc6-mm1> make
> CHK include/linux/version.h
> SPLIT include/linux/autoconf.h -> include/config/*
> HOSTCC scripts/genksyms/genksyms.o
> scripts/genksyms/genksyms.c:35:30: error: ../mod/elfconfig.h: No such file or directory
> scripts/genksyms/genksyms.c: In function ???export_symbol???:
> scripts/genksyms/genksyms.c:461: error: ???MODULE_SYMBOL_PREFIX??? undeclared (first use in this function)
> scripts/genksyms/genksyms.c:461: error: (Each undeclared identifier is reported only once
> scripts/genksyms/genksyms.c:461: error: for each function it appears in.)
> make[2]: *** [scripts/genksyms/genksyms.o] Error 1
> make[1]: *** [scripts/genksyms] Error 2
> make: *** [scripts] Error 2
My bad.

> #
> # Loadable module support
> #
> CONFIG_MODULES=y
> CONFIG_MODULE_UNLOAD=y
> CONFIG_MODULE_FORCE_UNLOAD=y
> CONFIG_MODVERSIONS=y
Use CONFIG_MODVERSIONS=n for now as workaround.

Sam

2006-03-12 13:49:53

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1

On Sunday 12 March 2006 14:35, Sam Ravnborg wrote:
> On Sun, Mar 12, 2006 at 02:16:26PM +0100, Rafael J. Wysocki wrote:
> > On Sunday 12 March 2006 12:10, Andrew Morton wrote:
> > >
> > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
> >
> > Doesn't compile for me:
> >
> > rafael@albercik:~/src/mm/linux-2.6.16-rc6-mm1> make
> > CHK include/linux/version.h
> > SPLIT include/linux/autoconf.h -> include/config/*
> > HOSTCC scripts/genksyms/genksyms.o
> > scripts/genksyms/genksyms.c:35:30: error: ../mod/elfconfig.h: No such file or directory
> > scripts/genksyms/genksyms.c: In function ???export_symbol???:
> > scripts/genksyms/genksyms.c:461: error: ???MODULE_SYMBOL_PREFIX??? undeclared (first use in this function)
> > scripts/genksyms/genksyms.c:461: error: (Each undeclared identifier is reported only once
> > scripts/genksyms/genksyms.c:461: error: for each function it appears in.)
> > make[2]: *** [scripts/genksyms/genksyms.o] Error 1
> > make[1]: *** [scripts/genksyms] Error 2
> > make: *** [scripts] Error 2
> My bad.
>
> > #
> > # Loadable module support
> > #
> > CONFIG_MODULES=y
> > CONFIG_MODULE_UNLOAD=y
> > CONFIG_MODULE_FORCE_UNLOAD=y
> > CONFIG_MODVERSIONS=y
> Use CONFIG_MODVERSIONS=n for now as workaround.

OK

Thanks,
Rafael

2006-03-12 14:30:05

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH] kbuild: fix genksyms build error

On Sun, Mar 12, 2006 at 02:16:26PM +0100, Rafael J. Wysocki wrote:
> On Sunday 12 March 2006 12:10, Andrew Morton wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>
> Doesn't compile for me:
>
> rafael@albercik:~/src/mm/linux-2.6.16-rc6-mm1> make
> CHK include/linux/version.h
> SPLIT include/linux/autoconf.h -> include/config/*
> HOSTCC scripts/genksyms/genksyms.o
> scripts/genksyms/genksyms.c:35:30: error: ../mod/elfconfig.h: No such file or directory
It a stupid dependency on a generated file.
The file only gets generated upon a successfull 'make modules', whereas
genksyms is used for every file compiled as a module.
The workaround is to do:
disable CONFIG_MODVERSIONS
make modules
enable CONFIG_MODVERSIONS
make

We could eventually fetch definition from <asm/module.h> but that seems
to drag all other stuff in.
So fix is instead to hardcode the check for the two relevant
architectures direct in genksyms.

Is genksyms used outside the kernel?

Sam


diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 7afe3e7..19ef2bc 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -166,7 +166,7 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D
cmd_modversions = \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
$(CPP) -D__GENKSYMS__ $(c_flags) $< \
- | $(GENKSYMS) \
+ | $(GENKSYMS) -a $(ARCH) \
> $(@D)/.tmp_$(@F:.o=.ver); \
\
$(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index ef8822e..da8ff4f 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -32,7 +32,6 @@
#endif /* __GNU_LIBRARY__ */

#include "genksyms.h"
-#include "../mod/elfconfig.h"
/*----------------------------------------------------------------------*/

#define HASH_BUCKETS 4096
@@ -44,6 +43,8 @@ int cur_line = 1;
char *cur_filename, *output_directory;

int flag_debug, flag_dump_defs, flag_warnings;
+const char *arch = "";
+const char *mod_prefix = "";

static int errors;
static int nsyms;
@@ -458,7 +459,7 @@ export_symbol(const char *name)
fputs(">\n", debugfile);

/* Used as a linker script. */
- printf("%s__crc_%s = 0x%08lx ;\n", MODULE_SYMBOL_PREFIX, name, crc);
+ printf("%s__crc_%s = 0x%08lx ;\n", mod_prefix, name, crc);
}
}

@@ -529,6 +530,7 @@ main(int argc, char **argv)

#ifdef __GNU_LIBRARY__
struct option long_opts[] = {
+ {"arch", 1, 0, 'a'},
{"debug", 0, 0, 'd'},
{"warnings", 0, 0, 'w'},
{"quiet", 0, 0, 'q'},
@@ -538,13 +540,16 @@ main(int argc, char **argv)
{0, 0, 0, 0}
};

- while ((o = getopt_long(argc, argv, "dwqVDk:p:",
+ while ((o = getopt_long(argc, argv, "a:dwqVDk:p:",
&long_opts[0], NULL)) != EOF)
#else /* __GNU_LIBRARY__ */
- while ((o = getopt(argc, argv, "dwqVDk:p:")) != EOF)
+ while ((o = getopt(argc, argv, "a:dwqVDk:p:")) != EOF)
#endif /* __GNU_LIBRARY__ */
switch (o)
{
+ case 'a':
+ arch = optarg;
+ break;
case 'd':
flag_debug++;
break;
@@ -567,7 +572,9 @@ main(int argc, char **argv)
genksyms_usage();
return 1;
}
-
+ if ((strcmp(arch, "v850") == 0) ||
+ (strcmp(arch, "h8300") == 0))
+ mod_prefix = "_";
{
extern int yydebug;
extern int yy_flex_debug;

2006-03-12 15:46:01

by Benoit Boissinot

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1

On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>
>

fs/9p/fcprint.c:93: error: static declaration of 'v9fs_printstat' follows non-static declaration
fs/9p/9p.h:377: error: previous declaration of 'v9fs_printstat' was here
fs/9p/fcprint.c:125: error: static declaration of 'v9fs_dumpdata' follows non-static declaration
fs/9p/9p.h:376: error: previous declaration of 'v9fs_dumpdata' was here

Signed-off-by: Benoit Boissinot <[email protected]>

Index: linux/fs/9p/9p.h
===================================================================
--- linux.orig/fs/9p/9p.h
+++ linux/fs/9p/9p.h
@@ -373,5 +373,3 @@ int v9fs_t_write(struct v9fs_session_inf
u32 count, const char __user * data,
struct v9fs_fcall **rcall);
int v9fs_printfcall(char *, int, struct v9fs_fcall *, int);
-int v9fs_dumpdata(char *, int, u8 *, int);
-int v9fs_printstat(char *, int, struct v9fs_stat *, int);

--
powered by bash/screen/(urxvt/fvwm|linux-console)/gentoo/gnu/linux OS

2006-03-12 15:48:15

by Benoit Boissinot

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1

On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>
>

fs/reiserfs/item_ops.c: In function 'indirect_print_item':
fs/reiserfs/item_ops.c:278: warning: 'num' may be used uninitialized in this function

num isn't used during the first iteration of the loop, but it does not harm to initialize
it anyway.

Signed-off-by: Benoit Boissinot <[email protected]>

Index: linux/fs/reiserfs/item_ops.c
===================================================================
--- linux.orig/fs/reiserfs/item_ops.c
+++ linux/fs/reiserfs/item_ops.c
@@ -275,7 +275,7 @@ static void indirect_print_item(struct i
int j;
__le32 *unp;
__u32 prev = INT_MAX;
- int num;
+ int num = 0;

unp = (__le32 *) item;



--
powered by bash/screen/(urxvt/fvwm|linux-console)/gentoo/gnu/linux OS

2006-03-12 15:55:09

by Benoit Boissinot

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1

On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>
>

drivers/net/tg3.c:8065: warning: type qualifiers ignored on function return type

Signed-off-by: Benoit Boissinot <[email protected]>

Index: linux/drivers/net/tg3.c
===================================================================
--- linux.orig/drivers/net/tg3.c
+++ linux/drivers/net/tg3.c
@@ -8061,7 +8061,7 @@ static int tg3_test_link(struct tg3 *tp)
}

/* Only test the commonly used registers */
-static const int tg3_test_registers(struct tg3 *tp)
+static int tg3_test_registers(struct tg3 *tp)
{
int i, is_5705;
u32 offset, read_mask, write_mask, val, save_val, read_val;

--
powered by bash/screen/(urxvt/fvwm|linux-console)/gentoo/gnu/linux OS

2006-03-12 18:45:16

by Laurent Riffard

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180

#!/bin/nash

echo "Loading dm-mod.ko module"
insmod /lib/dm-mod.ko
echo "Loading dm-mirror.ko module"
insmod /lib/dm-mirror.ko
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Mounting sysfs
mount -t sysfs none /sys
echo Creating device files
mountdev size=32M,mode=0755
echo -n /sbin/hotplug > /proc/sys/kernel/hotplug
mkdir /dev/.udevdb
mkdevices /dev
echo Making device-mapper control node
mkdmnod
echo Scanning logical volumes
vgscan -P --ignorelockingfailure
echo Activating logical volumes
vgchange -P -ay --ignorelockingfailure vglinux1
echo Making device nodes
vgmknodes --ignorelockingfailure
echo Mounting root filesystem /dev/vglinux1/lvroot
mount -o defaults --ro -t ext3 /dev/vglinux1/lvroot /sysroot
echo 0x0100 > /proc/sys/kernel/real-root-dev
pivot_root /sysroot /sysroot/initrd
umount /initrd/sys
umount /initrd/proc
echo Initrd finished


Attachments:
config-2.6.16-rc6-mm1 (40.84 kB)
dmesg.log (10.35 kB)
linuxrc (871.00 B)
Download all attachments

2006-03-12 21:43:51

by Jiri Slaby

[permalink] [raw]
Subject: BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1]

Andrew Morton wrote:
>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
[snip]
>+remove-redundant-check-from-autofs4_put_super.patch
>+autofs4-follow_link-missing-funtionality.patch
>
> Update autofs4 patches in -mm.
Hello,

I caught this during ftp browsing autofs-bind-mounted directories. I don't know
circumstancies and if the patches above are source of problem. I also don't know
if -rc6-mm1 is the first one.

BUG: atomic counter underflow at:
[<c0104736>] show_trace+0x13/0x15
[<c0104873>] dump_stack+0x1e/0x20
[<c01d6c97>] autofs4_wait+0x751/0x93a
[<c01d543b>] try_to_fill_dentry+0xca/0x11c
[<c01d59b3>] autofs4_revalidate+0xe1/0x148
[<c0171338>] do_lookup+0x40/0x157
[<c0172ec4>] __link_path_walk+0x804/0xe8c
[<c017359c>] link_path_walk+0x50/0xe8
[<c01738b7>] do_path_lookup+0x10f/0x26d
[<c017429c>] __user_walk_fd+0x33/0x50
[<c016d226>] vfs_stat_fd+0x1e/0x50
[<c016d30d>] vfs_stat+0x20/0x22
[<c016d328>] sys_stat64+0x19/0x2d
[<c0103127>] syscall_call+0x7/0xb

regards,
--
Jiri Slaby http://www.fi.muni.cz/~xslaby
~\-/~ [email protected] ~\-/~
B67499670407CE62ACC8 22A032CC55C339D47A7E

2006-03-12 21:47:47

by Grant Coady

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1

On Sun, 12 Mar 2006 03:10:36 -0800, Andrew Morton <[email protected]> wrote:

>
>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/

grant@sempro:~/linux/linux-2.6.16-rc6-mm1a$ make help
Cleaning targets:
clean - remove most generated files but keep the config
mrproper - remove all generated files + config + various backup files

Configuration targets:
config - Update current config utilising a line-oriented program
menuconfig - Update current config utilising a menu based program
xconfig - Update current config utilising a QT based front-end
gconfig - Update current config utilising a GTK based front-end
oldconfig - Update current config utilising a provided .config as base
randconfig - New config with random answer to all options
defconfig - New config with default answer to all options
allmodconfig - New config selecting modules when possible
allyesconfig - New config where all options are accepted with yes
allnoconfig - New config where all options are answered with no

Other generic targets:
all - Build all targets marked with [*]
* vmlinux - Build the bare kernel
* modules - Build all modules
modules_install - Install all modules to INSTALL_MOD_PATH (default: /)
dir/ - Build all files in dir and below
dir/file.[ois] - Build specified target only
dir/file.ko - Build module including final link
rpm - Build a kernel as an RPM package
tags/TAGS - Generate tags file for editors
cscope - Generate cscope index
kernelrelease - Output the release version string
kernelversion - Output the version stored in Makefile

Static analysers
buildcheck - List dangling references to vmlinux discarded sections
and init sections from non-init sections
checkstack - Generate a list of stack hogs
namespacecheck - Name space analysis on compiled kernel

Kernel packaging:
make[1]: *** No rule to make target `FORCE', needed by `help'. Stop.
make: *** [help] Error 2

'make help' completes on 2.6.16-rc6

Grant.

2006-03-12 22:56:01

by Alexey Dobriyan

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180

On Sun, Mar 12, 2006 at 07:45:05PM +0100, Laurent Riffard wrote:
> This kernel hangs on boot while trying to activate logical
> volumes from initrd:
>
> ------------[ cut here ]------------
> kernel BUG at fs/sysfs/inode.c:180!
> invalid opcode: 0000 [#1]
> last sysfs file: /block/ram0/dev
> Modules linked in: dm_mirror dm_mod
> CPU: 0
> EIP: 0060:[<c0172e71>] Not tainted VLI
> EFLAGS: 00010246 (2.6.16-rc6-mm1 #123)
> EIP is at sysfs_get_name+0xd/0x46
> eax: c15a49c8 ebx: dfe2b988 ecx: dff254d8 edx: c15a49cc
> esi: dfe87b05 edi: dfe2b988 ebp: dfe67d28 esp: dfe67d28
> ds: 007b es: 007b ss: 0068
> Process vgchange (pid: 242, threadinfo=dfe67000 task=dfe175d0)
> Stack: <0>dfe67d44 c01738c3 dffdc4b4 c15a49c8 dfe2b988 ffffffef dfe2b98d dfe67d60
> c0173dcd dff2a804 dfe2b984 dfe2b984 00000001 fffffffe dfe67d74 c0173f3b
> dfe67d6c c15a84d4 dfe2b984 dfe67d90 c01a33fd c03242d0 00000004 dfe2b8f8
> Call Trace:
> [<c0103a31>] show_stack_log_lvl+0x8b/0x95
> [<c0103b69>] show_registers+0x12e/0x194
> [<c0103e62>] die+0x14e/0x1db
> [<c01040ba>] do_trap+0x7c/0x96
> [<c0104319>] do_invalid_op+0x89/0x93
> [<c01034db>] error_code+0x4f/0x54
> [<c01738c3>] sysfs_dirent_exist+0x1c/0x65
> [<c0173dcd>] create_dir+0x55/0x17d
> [<c0173f3b>] sysfs_create_dir+0x46/0x61
> [<c01a33fd>] kobject_add+0xa4/0x14c
> [<c017267e>] register_disk+0x4b/0xe9
> [<c019c28c>] add_disk+0x2e/0x3d
> [<e08198a5>] create_aux+0x27e/0x2d7 [dm_mod]
> [<e081991d>] dm_create+0xe/0x10 [dm_mod]
> [<e081c317>] dev_create+0x4a/0x239 [dm_mod]
> [<e081c18c>] ctl_ioctl+0x203/0x238 [dm_mod]
> [<c0156648>] do_ioctl+0x3c/0x4f
> [<c0156851>] vfs_ioctl+0x1f6/0x20d
> [<c0156892>] sys_ioctl+0x2a/0x44
> [<c01029bb>] sysenter_past_esp+0x54/0x75
> Code: 0b 30 01 72 85 28 c0 ff 06 31 db eb 07 89 f8 e8 d1 8d fe ff 83 c4 10 89 d8 5b 5e 5f c9 c3 55 85 c0 89 e5 74 06 83 78 14 00 75 08 <0f> 0b b4 00 73 d3 28 c0 8b 50 18 83 fa 08 74 22 7f 0a 83 fa 02
> BUG: vgchange/242, lock held at task exit time!
> [dff25548] {inode_init_once}
> .. held by: vgchange: 242 [dfe175d0, 102]
> ... acquired at: create_dir+0x1d/0x17d
>
>
> There was no such problems with 2.6.16-rc5-mm3, I didn't change my
> kernel config.

Does reverting this patch make it work?

BTW, sysfs_dirent_exist() should return 0 or 1.
----------------------------------------------------------------
The following patch checks for existing sysfs_dirent before
preparing new one while creating sysfs directories and files.

Signed-off-by: Maneesh Soni <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/sysfs/dir.c | 30 +++++++++++++++++++++++++++++-
fs/sysfs/file.c | 6 ++++--
fs/sysfs/symlink.c | 5 +++--
fs/sysfs/sysfs.h | 1 +
4 files changed, 37 insertions(+), 5 deletions(-)

--- gregkh-2.6.orig/fs/sysfs/dir.c
+++ gregkh-2.6/fs/sysfs/dir.c
@@ -51,6 +51,30 @@ static struct sysfs_dirent * sysfs_new_d
return sd;
}

+/**
+ *
+ * Return -EEXIST if there is already a sysfs element with the same name for
+ * the same parent.
+ *
+ * called with parent inode's i_mutex held
+ */
+int sysfs_dirent_exist(struct sysfs_dirent *parent_sd,
+ const unsigned char *new)
+{
+ struct sysfs_dirent * sd;
+
+ list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
+ const unsigned char * existing = sysfs_get_name(sd);
+ if (strcmp(existing, new))
+ continue;
+ else
+ return -EEXIST;
+ }
+
+ return 0;
+}
+
+
int sysfs_make_dirent(struct sysfs_dirent * parent_sd, struct dentry * dentry,
void * element, umode_t mode, int type)
{
@@ -117,7 +141,11 @@ static int create_dir(struct kobject * k
mutex_lock(&p->d_inode->i_mutex);
*d = lookup_one_len(n, p, strlen(n));
if (!IS_ERR(*d)) {
- error = sysfs_make_dirent(p->d_fsdata, *d, k, mode, SYSFS_DIR);
+ if (sysfs_dirent_exist(p->d_fsdata, n))
+ error = -EEXIST;
+ else
+ error = sysfs_make_dirent(p->d_fsdata, *d, k, mode,
+ SYSFS_DIR);
if (!error) {
error = sysfs_create(*d, mode, init_dir);
if (!error) {
--- gregkh-2.6.orig/fs/sysfs/file.c
+++ gregkh-2.6/fs/sysfs/file.c
@@ -436,10 +436,12 @@ int sysfs_add_file(struct dentry * dir,
{
struct sysfs_dirent * parent_sd = dir->d_fsdata;
umode_t mode = (attr->mode & S_IALLUGO) | S_IFREG;
- int error = 0;
+ int error = -EEXIST;

mutex_lock(&dir->d_inode->i_mutex);
- error = sysfs_make_dirent(parent_sd, NULL, (void *) attr, mode, type);
+ if (!sysfs_dirent_exist(parent_sd, attr->name))
+ error = sysfs_make_dirent(parent_sd, NULL, (void *)attr,
+ mode, type);
mutex_unlock(&dir->d_inode->i_mutex);

return error;
--- gregkh-2.6.orig/fs/sysfs/symlink.c
+++ gregkh-2.6/fs/sysfs/symlink.c
@@ -82,12 +82,13 @@ exit1:
int sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name)
{
struct dentry * dentry = kobj->dentry;
- int error = 0;
+ int error = -EEXIST;

BUG_ON(!kobj || !kobj->dentry || !name);

mutex_lock(&dentry->d_inode->i_mutex);
- error = sysfs_add_link(dentry, name, target);
+ if (!sysfs_dirent_exist(dentry->d_fsdata, name))
+ error = sysfs_add_link(dentry, name, target);
mutex_unlock(&dentry->d_inode->i_mutex);
return error;
}
--- gregkh-2.6.orig/fs/sysfs/sysfs.h
+++ gregkh-2.6/fs/sysfs/sysfs.h
@@ -5,6 +5,7 @@ extern kmem_cache_t *sysfs_dir_cachep;
extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *);
extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *));

+extern int sysfs_dirent_exist(struct sysfs_dirent *, const unsigned char *);
extern int sysfs_make_dirent(struct sysfs_dirent *, struct dentry *, void *,
umode_t, int);


2006-03-12 23:07:39

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180

Laurent Riffard <[email protected]> wrote:
>
> Le 12.03.2006 12:10, Andrew Morton a ?crit :
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>
> Hello,
>
> This kernel hangs on boot while trying to activate logical
> volumes from initrd:
>
> ------------[ cut here ]------------
> kernel BUG at fs/sysfs/inode.c:180!
> invalid opcode: 0000 [#1]
> last sysfs file: /block/ram0/dev
> Modules linked in: dm_mirror dm_mod
> CPU: 0
> EIP: 0060:[<c0172e71>] Not tainted VLI
> EFLAGS: 00010246 (2.6.16-rc6-mm1 #123)
> EIP is at sysfs_get_name+0xd/0x46
> eax: c15a49c8 ebx: dfe2b988 ecx: dff254d8 edx: c15a49cc
> esi: dfe87b05 edi: dfe2b988 ebp: dfe67d28 esp: dfe67d28
> ds: 007b es: 007b ss: 0068
> Process vgchange (pid: 242, threadinfo=dfe67000 task=dfe175d0)
> Stack: <0>dfe67d44 c01738c3 dffdc4b4 c15a49c8 dfe2b988 ffffffef dfe2b98d dfe67d60
> c0173dcd dff2a804 dfe2b984 dfe2b984 00000001 fffffffe dfe67d74 c0173f3b
> dfe67d6c c15a84d4 dfe2b984 dfe67d90 c01a33fd c03242d0 00000004 dfe2b8f8
> Call Trace:
> [<c0103a31>] show_stack_log_lvl+0x8b/0x95
> [<c0103b69>] show_registers+0x12e/0x194
> [<c0103e62>] die+0x14e/0x1db
> [<c01040ba>] do_trap+0x7c/0x96
> [<c0104319>] do_invalid_op+0x89/0x93
> [<c01034db>] error_code+0x4f/0x54
> [<c01738c3>] sysfs_dirent_exist+0x1c/0x65
> [<c0173dcd>] create_dir+0x55/0x17d
> [<c0173f3b>] sysfs_create_dir+0x46/0x61
> [<c01a33fd>] kobject_add+0xa4/0x14c
> [<c017267e>] register_disk+0x4b/0xe9
> [<c019c28c>] add_disk+0x2e/0x3d
> [<e08198a5>] create_aux+0x27e/0x2d7 [dm_mod]
> [<e081991d>] dm_create+0xe/0x10 [dm_mod]
> [<e081c317>] dev_create+0x4a/0x239 [dm_mod]
> [<e081c18c>] ctl_ioctl+0x203/0x238 [dm_mod]
> [<c0156648>] do_ioctl+0x3c/0x4f
> [<c0156851>] vfs_ioctl+0x1f6/0x20d
> [<c0156892>] sys_ioctl+0x2a/0x44
> [<c01029bb>] sysenter_past_esp+0x54/0x75
> Code: 0b 30 01 72 85 28 c0 ff 06 31 db eb 07 89 f8 e8 d1 8d fe ff 83 c4 10 89 d8 5b 5e 5f c9 c3 55 85 c0 89 e5 74 06 83 78 14 00 75 08 <0f> 0b b4 00 73 d3 28 c0 8b 50 18 83 fa 08 74 22 7f 0a 83 fa 02

Thanks.

Greg, can you please interpret this? What does this BUG:

const unsigned char * sysfs_get_name(struct sysfs_dirent *sd)
{
struct attribute * attr;
struct bin_attribute * bin_attr;
struct relay_attribute * rel_attr;
struct sysfs_symlink * sl;

if (!sd || !sd->s_element)
BUG();

tell us?

I assume the bug was introduced by one of the device mapper patches:

device-mapper-snapshot-fix-origin_write-pending_exception-submission.patch
device-mapper-snapshot-replace-sibling-list.patch
device-mapper-snapshot-fix-invalidation.patch
drivers-md-dm-raid1c-fix-inconsistent-mirroring-after-interrupted.patch
dm-remove-sector_format.patch
dm-make-sure-queue_flag_cluster-is-set-properly.patch
md-make-sure-queue_flag_cluster-is-set-properly-for-md.patch


2006-03-12 23:33:10

by Laurent Riffard

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180


Le 12.03.2006 23:55, Alexey Dobriyan a ?crit :
> On Sun, Mar 12, 2006 at 07:45:05PM +0100, Laurent Riffard wrote:
>
>>This kernel hangs on boot while trying to activate logical
>>volumes from initrd:
>>
>>------------[ cut here ]------------
>>kernel BUG at fs/sysfs/inode.c:180!
>>invalid opcode: 0000 [#1]
>>last sysfs file: /block/ram0/dev
>>Modules linked in: dm_mirror dm_mod
>>CPU: 0
>>EIP: 0060:[<c0172e71>] Not tainted VLI
>>EFLAGS: 00010246 (2.6.16-rc6-mm1 #123)
>>EIP is at sysfs_get_name+0xd/0x46
>>eax: c15a49c8 ebx: dfe2b988 ecx: dff254d8 edx: c15a49cc
>>esi: dfe87b05 edi: dfe2b988 ebp: dfe67d28 esp: dfe67d28
>>ds: 007b es: 007b ss: 0068
>>Process vgchange (pid: 242, threadinfo=dfe67000 task=dfe175d0)
>>Stack: <0>dfe67d44 c01738c3 dffdc4b4 c15a49c8 dfe2b988 ffffffef dfe2b98d dfe67d60
>> c0173dcd dff2a804 dfe2b984 dfe2b984 00000001 fffffffe dfe67d74 c0173f3b
>> dfe67d6c c15a84d4 dfe2b984 dfe67d90 c01a33fd c03242d0 00000004 dfe2b8f8
>>Call Trace:
>> [<c0103a31>] show_stack_log_lvl+0x8b/0x95
>> [<c0103b69>] show_registers+0x12e/0x194
>> [<c0103e62>] die+0x14e/0x1db
>> [<c01040ba>] do_trap+0x7c/0x96
>> [<c0104319>] do_invalid_op+0x89/0x93
>> [<c01034db>] error_code+0x4f/0x54
>> [<c01738c3>] sysfs_dirent_exist+0x1c/0x65
>> [<c0173dcd>] create_dir+0x55/0x17d
>> [<c0173f3b>] sysfs_create_dir+0x46/0x61
>> [<c01a33fd>] kobject_add+0xa4/0x14c
>> [<c017267e>] register_disk+0x4b/0xe9
>> [<c019c28c>] add_disk+0x2e/0x3d
>> [<e08198a5>] create_aux+0x27e/0x2d7 [dm_mod]
>> [<e081991d>] dm_create+0xe/0x10 [dm_mod]
>> [<e081c317>] dev_create+0x4a/0x239 [dm_mod]
>> [<e081c18c>] ctl_ioctl+0x203/0x238 [dm_mod]
>> [<c0156648>] do_ioctl+0x3c/0x4f
>> [<c0156851>] vfs_ioctl+0x1f6/0x20d
>> [<c0156892>] sys_ioctl+0x2a/0x44
>> [<c01029bb>] sysenter_past_esp+0x54/0x75
>>Code: 0b 30 01 72 85 28 c0 ff 06 31 db eb 07 89 f8 e8 d1 8d fe ff 83 c4 10 89 d8 5b 5e 5f c9 c3 55 85 c0 89 e5 74 06 83 78 14 00 75 08 <0f> 0b b4 00 73 d3 28 c0 8b 50 18 83 fa 08 74 22 7f 0a 83 fa 02
>> BUG: vgchange/242, lock held at task exit time!
>> [dff25548] {inode_init_once}
>>.. held by: vgchange: 242 [dfe175d0, 102]
>>... acquired at: create_dir+0x1d/0x17d
>>
>>
>>There was no such problems with 2.6.16-rc5-mm3, I didn't change my
>>kernel config.
>
>
> Does reverting this patch make it work?
>
> BTW, sysfs_dirent_exist() should return 0 or 1.
> ----------------------------------------------------------------
> The following patch checks for existing sysfs_dirent before
> preparing new one while creating sysfs directories and files.
>
> Signed-off-by: Maneesh Soni <[email protected]>
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---
> fs/sysfs/dir.c | 30 +++++++++++++++++++++++++++++-
> fs/sysfs/file.c | 6 ++++--
> fs/sysfs/symlink.c | 5 +++--
> fs/sysfs/sysfs.h | 1 +
> 4 files changed, 37 insertions(+), 5 deletions(-)
>
[patch trimmed]

Yes, reverting this patch solved the problem, thanks.

If you need more tests, feel free to ask.
--
laurent

2006-03-13 03:18:53

by James Morris

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1

On Sun, 12 Mar 2006, Andrew Morton wrote:

> Author: Catherine Zhang <[email protected]>
> Date: Fri Mar 10 00:34:15 2006 -0800
>
> [SECURITY]: TCP/UDP getpeersec
>
> This patch implements an application of the LSM-IPSec networking
> controls whereby an application can determine the label of the
> security association its TCP or UDP sockets are currently connected to
> via getsockopt and the auxiliary data mechanism of recvmsg.
>
> Which I am sure is very good.

Think of it as an extension of the existing Linux SO_PASSCRED for Unix
sockets, which currently allow you to authenticate the uid/gid/pid of a
local peer process with which you are communicating. But now extended to
other security information such as an SELinux security context, and for
non-local processes, protected and authenticated via IPsec.



- James
--
James Morris
<[email protected]>


2006-03-13 03:36:18

by Ian Kent

[permalink] [raw]
Subject: Re: BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1]

On Sun, 12 Mar 2006, Jiri Slaby wrote:

Thanks Jiri.

Certainly looks like a problem for me.

Puzzling though as this part of the code has been in operation for a long
long time?

It would be really helpful if you could give a little more information how
it happened so I can try and reproduce it?

> Andrew Morton wrote:
> >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
> [snip]
> >+remove-redundant-check-from-autofs4_put_super.patch
> >+autofs4-follow_link-missing-funtionality.patch

Maybe it is related to the error in this patch that Andrew pointed out.
I'm still thinking about how I should deal with that.

> >
> > Update autofs4 patches in -mm.
> Hello,
>
> I caught this during ftp browsing autofs-bind-mounted directories. I don't know
> circumstancies and if the patches above are source of problem. I also don't know
> if -rc6-mm1 is the first one.
>
> BUG: atomic counter underflow at:
> [<c0104736>] show_trace+0x13/0x15
> [<c0104873>] dump_stack+0x1e/0x20
> [<c01d6c97>] autofs4_wait+0x751/0x93a
> [<c01d543b>] try_to_fill_dentry+0xca/0x11c
> [<c01d59b3>] autofs4_revalidate+0xe1/0x148
> [<c0171338>] do_lookup+0x40/0x157
> [<c0172ec4>] __link_path_walk+0x804/0xe8c
> [<c017359c>] link_path_walk+0x50/0xe8
> [<c01738b7>] do_path_lookup+0x10f/0x26d
> [<c017429c>] __user_walk_fd+0x33/0x50
> [<c016d226>] vfs_stat_fd+0x1e/0x50
> [<c016d30d>] vfs_stat+0x20/0x22
> [<c016d328>] sys_stat64+0x19/0x2d
> [<c0103127>] syscall_call+0x7/0xb
>
> regards,
> --
> Jiri Slaby http://www.fi.muni.cz/~xslaby
> ~\-/~ [email protected] ~\-/~
> B67499670407CE62ACC8 22A032CC55C339D47A7E
>

2006-03-13 05:34:03

by Ian Kent

[permalink] [raw]
Subject: Re: BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1]

On Sun, 12 Mar 2006, Jiri Slaby wrote:

> Andrew Morton wrote:
> >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
> [snip]
> >+remove-redundant-check-from-autofs4_put_super.patch
> >+autofs4-follow_link-missing-funtionality.patch
> >
> > Update autofs4 patches in -mm.
> Hello,
>
> I caught this during ftp browsing autofs-bind-mounted directories. I don't know
> circumstancies and if the patches above are source of problem. I also don't know
> if -rc6-mm1 is the first one.

btw what do you mean autofs-bind-mounted ?

>
> BUG: atomic counter underflow at:
> [<c0104736>] show_trace+0x13/0x15
> [<c0104873>] dump_stack+0x1e/0x20
> [<c01d6c97>] autofs4_wait+0x751/0x93a
> [<c01d543b>] try_to_fill_dentry+0xca/0x11c
> [<c01d59b3>] autofs4_revalidate+0xe1/0x148
> [<c0171338>] do_lookup+0x40/0x157
> [<c0172ec4>] __link_path_walk+0x804/0xe8c
> [<c017359c>] link_path_walk+0x50/0xe8
> [<c01738b7>] do_path_lookup+0x10f/0x26d
> [<c017429c>] __user_walk_fd+0x33/0x50
> [<c016d226>] vfs_stat_fd+0x1e/0x50
> [<c016d30d>] vfs_stat+0x20/0x22
> [<c016d328>] sys_stat64+0x19/0x2d
> [<c0103127>] syscall_call+0x7/0xb
>

There's some suspicious code in waitq.c.
Could you try the following patch for me please?

--- linux-2.6.16-rc6-mm1/fs/autofs4/waitq.c.notify-bug 2006-03-13 13:23:52.000000000 +0800
+++ linux-2.6.16-rc6-mm1/fs/autofs4/waitq.c 2006-03-13 13:25:40.000000000 +0800
@@ -263,7 +263,7 @@ int autofs4_wait(struct autofs_sb_info *
wq->tgid = current->tgid;
wq->status = -EINTR; /* Status return if interrupted */
atomic_set(&wq->wait_ctr, 2);
- atomic_set(&wq->notified, 1);
+ atomic_set(&wq->notify, 1);
mutex_unlock(&sbi->wq_mutex);
} else {
atomic_inc(&wq->wait_ctr);
@@ -273,9 +273,11 @@ int autofs4_wait(struct autofs_sb_info *
(unsigned long) wq->wait_queue_token, wq->len, wq->name, notify);
}

- if (notify != NFY_NONE && atomic_dec_and_test(&wq->notified)) {
+ if (notify != NFY_NONE && atomic_read(&wq->notify)) {
int type;

+ atomic_dec(&wq->notify);
+
if (sbi->version < 5) {
if (notify == NFY_MOUNT)
type = autofs_ptype_missing;
--- linux-2.6.16-rc6-mm1/fs/autofs4/autofs_i.h.notify-bug 2006-03-13 13:23:39.000000000 +0800
+++ linux-2.6.16-rc6-mm1/fs/autofs4/autofs_i.h 2006-03-13 13:24:08.000000000 +0800
@@ -85,7 +85,7 @@ struct autofs_wait_queue {
pid_t tgid;
/* This is for status reporting upon return */
int status;
- atomic_t notified;
+ atomic_t notify;
atomic_t wait_ctr;
};



2006-03-13 14:03:14

by Maneesh Soni

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180

On Sun, Mar 12, 2006 at 03:01:58PM -0800, Andrew Morton wrote:
> Laurent Riffard <[email protected]> wrote:
> >
> > Le 12.03.2006 12:10, Andrew Morton a ?crit :
> > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
> >
> > Hello,
> >
> > This kernel hangs on boot while trying to activate logical
> > volumes from initrd:
> >
> > ------------[ cut here ]------------
> > kernel BUG at fs/sysfs/inode.c:180!
> > invalid opcode: 0000 [#1]
> > last sysfs file: /block/ram0/dev
> > Modules linked in: dm_mirror dm_mod
> > CPU: 0
> > EIP: 0060:[<c0172e71>] Not tainted VLI
> > EFLAGS: 00010246 (2.6.16-rc6-mm1 #123)
> > EIP is at sysfs_get_name+0xd/0x46
> > eax: c15a49c8 ebx: dfe2b988 ecx: dff254d8 edx: c15a49cc
> > esi: dfe87b05 edi: dfe2b988 ebp: dfe67d28 esp: dfe67d28
> > ds: 007b es: 007b ss: 0068
> > Process vgchange (pid: 242, threadinfo=dfe67000 task=dfe175d0)
> > Stack: <0>dfe67d44 c01738c3 dffdc4b4 c15a49c8 dfe2b988 ffffffef dfe2b98d dfe67d60
> > c0173dcd dff2a804 dfe2b984 dfe2b984 00000001 fffffffe dfe67d74 c0173f3b
> > dfe67d6c c15a84d4 dfe2b984 dfe67d90 c01a33fd c03242d0 00000004 dfe2b8f8
> > Call Trace:
> > [<c0103a31>] show_stack_log_lvl+0x8b/0x95
> > [<c0103b69>] show_registers+0x12e/0x194
> > [<c0103e62>] die+0x14e/0x1db
> > [<c01040ba>] do_trap+0x7c/0x96
> > [<c0104319>] do_invalid_op+0x89/0x93
> > [<c01034db>] error_code+0x4f/0x54
> > [<c01738c3>] sysfs_dirent_exist+0x1c/0x65
> > [<c0173dcd>] create_dir+0x55/0x17d
> > [<c0173f3b>] sysfs_create_dir+0x46/0x61
> > [<c01a33fd>] kobject_add+0xa4/0x14c
> > [<c017267e>] register_disk+0x4b/0xe9
> > [<c019c28c>] add_disk+0x2e/0x3d
> > [<e08198a5>] create_aux+0x27e/0x2d7 [dm_mod]
> > [<e081991d>] dm_create+0xe/0x10 [dm_mod]
> > [<e081c317>] dev_create+0x4a/0x239 [dm_mod]
> > [<e081c18c>] ctl_ioctl+0x203/0x238 [dm_mod]
> > [<c0156648>] do_ioctl+0x3c/0x4f
> > [<c0156851>] vfs_ioctl+0x1f6/0x20d
> > [<c0156892>] sys_ioctl+0x2a/0x44
> > [<c01029bb>] sysenter_past_esp+0x54/0x75
> > Code: 0b 30 01 72 85 28 c0 ff 06 31 db eb 07 89 f8 e8 d1 8d fe ff 83 c4 10 89 d8 5b 5e 5f c9 c3 55 85 c0 89 e5 74 06 83 78 14 00 75 08 <0f> 0b b4 00 73 d3 28 c0 8b 50 18 83 fa 08 74 22 7f 0a 83 fa 02
>
> Thanks.
>
> Greg, can you please interpret this? What does this BUG:
>
> const unsigned char * sysfs_get_name(struct sysfs_dirent *sd)
> {
> struct attribute * attr;
> struct bin_attribute * bin_attr;
> struct relay_attribute * rel_attr;
> struct sysfs_symlink * sl;
>
> if (!sd || !sd->s_element)
> BUG();
>
> tell us?
>

I think here we have sd->s_element as NULL. This is probably due to
my mistake in

gregkh-driver-sysfs-fix-problem-with-duplicate-sysfs-directories-and-files.patch

NULL s_element which is used as cursor element is added to the s_children
list in sysfs_dir_open() and is removed in sysfs_dir_close(). So if in
between s_children is parsed, one can see sysfs_dirent with NULL s_element.

Please try the following patch on top of -mm1


Thanks
Maneesh




o sysfs_dirent_exist() should ignore sysfs_dirent with NULL s_element
as such element could have been added internally as cursor due to
->open() on parent directory.

Signed-off-by: Maneesh Soni <[email protected]>
---

linux-2.6.16-rc6-mm1-maneesh/fs/sysfs/dir.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)

diff -puN fs/sysfs/dir.c~fix-sysfs-check-existing-sysfs_dirent fs/sysfs/dir.c
--- linux-2.6.16-rc6-mm1/fs/sysfs/dir.c~fix-sysfs-check-existing-sysfs_dirent 2006-03-13 14:48:34.000000000 +0530
+++ linux-2.6.16-rc6-mm1-maneesh/fs/sysfs/dir.c 2006-03-13 15:01:32.934811856 +0530
@@ -63,11 +63,13 @@ int sysfs_dirent_exist(struct sysfs_dire
struct sysfs_dirent * sd;

list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
- const unsigned char * existing = sysfs_get_name(sd);
- if (strcmp(existing, new))
- continue;
- else
- return -EEXIST;
+ if (sd->s_element) {
+ const unsigned char * existing = sysfs_get_name(sd);
+ if (strcmp(existing, new))
+ continue;
+ else
+ return -EEXIST;
+ }
}

return 0;
_




--
Maneesh Soni
Linux Technology Center,
IBM India Software Labs,
Bangalore, India
email: [email protected]
Phone: 91-80-51776416

2006-03-13 17:04:57

by Laurent Riffard

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180


Le 13.03.2006 15:00, Maneesh Soni a ?crit :
> On Sun, Mar 12, 2006 at 03:01:58PM -0800, Andrew Morton wrote:
>>Laurent Riffard <[email protected]> wrote:
>>>Le 12.03.2006 12:10, Andrew Morton a ?crit :
>>> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>>>
>>> Hello,
>>>
>>> This kernel hangs on boot while trying to activate logical
>>> volumes from initrd:
>>>
>>> ------------[ cut here ]------------
>>> kernel BUG at fs/sysfs/inode.c:180!
>>> invalid opcode: 0000 [#1]
>>> last sysfs file: /block/ram0/dev
>>> Modules linked in: dm_mirror dm_mod
>>> CPU: 0
>>> EIP: 0060:[<c0172e71>] Not tainted VLI
>>> EFLAGS: 00010246 (2.6.16-rc6-mm1 #123)
>>> EIP is at sysfs_get_name+0xd/0x46
>>> eax: c15a49c8 ebx: dfe2b988 ecx: dff254d8 edx: c15a49cc
>>> esi: dfe87b05 edi: dfe2b988 ebp: dfe67d28 esp: dfe67d28
>>> ds: 007b es: 007b ss: 0068
>>> Process vgchange (pid: 242, threadinfo=dfe67000 task=dfe175d0)
>>> Stack: <0>dfe67d44 c01738c3 dffdc4b4 c15a49c8 dfe2b988 ffffffef dfe2b98d dfe67d60
>>> c0173dcd dff2a804 dfe2b984 dfe2b984 00000001 fffffffe dfe67d74 c0173f3b
>>> dfe67d6c c15a84d4 dfe2b984 dfe67d90 c01a33fd c03242d0 00000004 dfe2b8f8
>>> Call Trace:
>>> [<c0103a31>] show_stack_log_lvl+0x8b/0x95
>>> [<c0103b69>] show_registers+0x12e/0x194
>>> [<c0103e62>] die+0x14e/0x1db
>>> [<c01040ba>] do_trap+0x7c/0x96
>>> [<c0104319>] do_invalid_op+0x89/0x93
>>> [<c01034db>] error_code+0x4f/0x54
>>> [<c01738c3>] sysfs_dirent_exist+0x1c/0x65
>>> [<c0173dcd>] create_dir+0x55/0x17d
>>> [<c0173f3b>] sysfs_create_dir+0x46/0x61
>>> [<c01a33fd>] kobject_add+0xa4/0x14c
>>> [<c017267e>] register_disk+0x4b/0xe9
>>> [<c019c28c>] add_disk+0x2e/0x3d
>>> [<e08198a5>] create_aux+0x27e/0x2d7 [dm_mod]
>>> [<e081991d>] dm_create+0xe/0x10 [dm_mod]
>>> [<e081c317>] dev_create+0x4a/0x239 [dm_mod]
>>> [<e081c18c>] ctl_ioctl+0x203/0x238 [dm_mod]
>>> [<c0156648>] do_ioctl+0x3c/0x4f
>>> [<c0156851>] vfs_ioctl+0x1f6/0x20d
>>> [<c0156892>] sys_ioctl+0x2a/0x44
>>> [<c01029bb>] sysenter_past_esp+0x54/0x75
>>> Code: 0b 30 01 72 85 28 c0 ff 06 31 db eb 07 89 f8 e8 d1 8d fe ff 83 c4 10 89 d8 5b 5e 5f c9 c3 55 85 c0 89 e5 74 06 83 78 14 00 75 08 <0f> 0b b4 00 73 d3 28 c0 8b 50 18 83 fa 08 74 22 7f 0a 83 fa 02
>>
>>Thanks.
>>
>>Greg, can you please interpret this? What does this BUG:
>>
>>const unsigned char * sysfs_get_name(struct sysfs_dirent *sd)
>>{
>> struct attribute * attr;
>> struct bin_attribute * bin_attr;
>> struct relay_attribute * rel_attr;
>> struct sysfs_symlink * sl;
>>
>> if (!sd || !sd->s_element)
>> BUG();
>>
>>tell us?
>>
>
>
> I think here we have sd->s_element as NULL. This is probably due to
> my mistake in
>
> gregkh-driver-sysfs-fix-problem-with-duplicate-sysfs-directories-and-files.patch
>
> NULL s_element which is used as cursor element is added to the s_children
> list in sysfs_dir_open() and is removed in sysfs_dir_close(). So if in
> between s_children is parsed, one can see sysfs_dirent with NULL s_element.
>
> Please try the following patch on top of -mm1
>
>
> Thanks
> Maneesh
>
>
>
>
> o sysfs_dirent_exist() should ignore sysfs_dirent with NULL s_element
> as such element could have been added internally as cursor due to
> ->open() on parent directory.
>
> Signed-off-by: Maneesh Soni <[email protected]>
> ---
>
> linux-2.6.16-rc6-mm1-maneesh/fs/sysfs/dir.c | 12 +++++++-----
> 1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff -puN fs/sysfs/dir.c~fix-sysfs-check-existing-sysfs_dirent fs/sysfs/dir.c
> --- linux-2.6.16-rc6-mm1/fs/sysfs/dir.c~fix-sysfs-check-existing-sysfs_dirent 2006-03-13 14:48:34.000000000 +0530
> +++ linux-2.6.16-rc6-mm1-maneesh/fs/sysfs/dir.c 2006-03-13 15:01:32.934811856 +0530
> @@ -63,11 +63,13 @@ int sysfs_dirent_exist(struct sysfs_dire
> struct sysfs_dirent * sd;
>
> list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
> - const unsigned char * existing = sysfs_get_name(sd);
> - if (strcmp(existing, new))
> - continue;
> - else
> - return -EEXIST;
> + if (sd->s_element) {
> + const unsigned char * existing = sysfs_get_name(sd);
> + if (strcmp(existing, new))
> + continue;
> + else
> + return -EEXIST;
> + }
> }
>
> return 0;
> _
>

Ok, with this one, it works fine.

Thanks.
--
laurent

2006-03-13 19:23:38

by Greg KH

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180

On Mon, Mar 13, 2006 at 06:04:52PM +0100, Laurent Riffard wrote:
>
> Le 13.03.2006 15:00, Maneesh Soni a ?crit :
> > On Sun, Mar 12, 2006 at 03:01:58PM -0800, Andrew Morton wrote:
> >>Laurent Riffard <[email protected]> wrote:
> >>>Le 12.03.2006 12:10, Andrew Morton a ?crit :
> >>> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
> >>>
> >>> Hello,
> >>>
> >>> This kernel hangs on boot while trying to activate logical
> >>> volumes from initrd:
> >>>
> >>> ------------[ cut here ]------------
> >>> kernel BUG at fs/sysfs/inode.c:180!
> >>> invalid opcode: 0000 [#1]
> >>> last sysfs file: /block/ram0/dev
> >>> Modules linked in: dm_mirror dm_mod
> >>> CPU: 0
> >>> EIP: 0060:[<c0172e71>] Not tainted VLI
> >>> EFLAGS: 00010246 (2.6.16-rc6-mm1 #123)
> >>> EIP is at sysfs_get_name+0xd/0x46
> >>> eax: c15a49c8 ebx: dfe2b988 ecx: dff254d8 edx: c15a49cc
> >>> esi: dfe87b05 edi: dfe2b988 ebp: dfe67d28 esp: dfe67d28
> >>> ds: 007b es: 007b ss: 0068
> >>> Process vgchange (pid: 242, threadinfo=dfe67000 task=dfe175d0)
> >>> Stack: <0>dfe67d44 c01738c3 dffdc4b4 c15a49c8 dfe2b988 ffffffef dfe2b98d dfe67d60
> >>> c0173dcd dff2a804 dfe2b984 dfe2b984 00000001 fffffffe dfe67d74 c0173f3b
> >>> dfe67d6c c15a84d4 dfe2b984 dfe67d90 c01a33fd c03242d0 00000004 dfe2b8f8
> >>> Call Trace:
> >>> [<c0103a31>] show_stack_log_lvl+0x8b/0x95
> >>> [<c0103b69>] show_registers+0x12e/0x194
> >>> [<c0103e62>] die+0x14e/0x1db
> >>> [<c01040ba>] do_trap+0x7c/0x96
> >>> [<c0104319>] do_invalid_op+0x89/0x93
> >>> [<c01034db>] error_code+0x4f/0x54
> >>> [<c01738c3>] sysfs_dirent_exist+0x1c/0x65
> >>> [<c0173dcd>] create_dir+0x55/0x17d
> >>> [<c0173f3b>] sysfs_create_dir+0x46/0x61
> >>> [<c01a33fd>] kobject_add+0xa4/0x14c
> >>> [<c017267e>] register_disk+0x4b/0xe9
> >>> [<c019c28c>] add_disk+0x2e/0x3d
> >>> [<e08198a5>] create_aux+0x27e/0x2d7 [dm_mod]
> >>> [<e081991d>] dm_create+0xe/0x10 [dm_mod]
> >>> [<e081c317>] dev_create+0x4a/0x239 [dm_mod]
> >>> [<e081c18c>] ctl_ioctl+0x203/0x238 [dm_mod]
> >>> [<c0156648>] do_ioctl+0x3c/0x4f
> >>> [<c0156851>] vfs_ioctl+0x1f6/0x20d
> >>> [<c0156892>] sys_ioctl+0x2a/0x44
> >>> [<c01029bb>] sysenter_past_esp+0x54/0x75
> >>> Code: 0b 30 01 72 85 28 c0 ff 06 31 db eb 07 89 f8 e8 d1 8d fe ff 83 c4 10 89 d8 5b 5e 5f c9 c3 55 85 c0 89 e5 74 06 83 78 14 00 75 08 <0f> 0b b4 00 73 d3 28 c0 8b 50 18 83 fa 08 74 22 7f 0a 83 fa 02
> >>
> >>Thanks.
> >>
> >>Greg, can you please interpret this? What does this BUG:
> >>
> >>const unsigned char * sysfs_get_name(struct sysfs_dirent *sd)
> >>{
> >> struct attribute * attr;
> >> struct bin_attribute * bin_attr;
> >> struct relay_attribute * rel_attr;
> >> struct sysfs_symlink * sl;
> >>
> >> if (!sd || !sd->s_element)
> >> BUG();
> >>
> >>tell us?
> >>
> >
> >
> > I think here we have sd->s_element as NULL. This is probably due to
> > my mistake in
> >
> > gregkh-driver-sysfs-fix-problem-with-duplicate-sysfs-directories-and-files.patch
> >
> > NULL s_element which is used as cursor element is added to the s_children
> > list in sysfs_dir_open() and is removed in sysfs_dir_close(). So if in
> > between s_children is parsed, one can see sysfs_dirent with NULL s_element.
> >
> > Please try the following patch on top of -mm1
> >
> >
> > Thanks
> > Maneesh
> >
> >
> >
> >
> > o sysfs_dirent_exist() should ignore sysfs_dirent with NULL s_element
> > as such element could have been added internally as cursor due to
> > ->open() on parent directory.
> >
> > Signed-off-by: Maneesh Soni <[email protected]>
> > ---
> >
> > linux-2.6.16-rc6-mm1-maneesh/fs/sysfs/dir.c | 12 +++++++-----
> > 1 files changed, 7 insertions(+), 5 deletions(-)
> >
> > diff -puN fs/sysfs/dir.c~fix-sysfs-check-existing-sysfs_dirent fs/sysfs/dir.c
> > --- linux-2.6.16-rc6-mm1/fs/sysfs/dir.c~fix-sysfs-check-existing-sysfs_dirent 2006-03-13 14:48:34.000000000 +0530
> > +++ linux-2.6.16-rc6-mm1-maneesh/fs/sysfs/dir.c 2006-03-13 15:01:32.934811856 +0530
> > @@ -63,11 +63,13 @@ int sysfs_dirent_exist(struct sysfs_dire
> > struct sysfs_dirent * sd;
> >
> > list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
> > - const unsigned char * existing = sysfs_get_name(sd);
> > - if (strcmp(existing, new))
> > - continue;
> > - else
> > - return -EEXIST;
> > + if (sd->s_element) {
> > + const unsigned char * existing = sysfs_get_name(sd);
> > + if (strcmp(existing, new))
> > + continue;
> > + else
> > + return -EEXIST;
> > + }
> > }
> >
> > return 0;
> > _
> >
>
> Ok, with this one, it works fine.

Thanks Maneesh for the quick fix, want me to merge this with your
previous patch?

thanks,

greg k-h

2006-03-13 21:14:46

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] sound/pci/ice1712/delta.c: make 2 functions static

On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc5-mm3:
>...
> git-alsa.patch
>...
> git trees
>...


This patch makes two needlessly global functions static.


Signed-off-by: Adrian Bunk <[email protected]>

---

sound/pci/ice1712/delta.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.16-rc6-mm1-full/sound/pci/ice1712/delta.c.old 2006-03-13 21:32:49.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/sound/pci/ice1712/delta.c 2006-03-13 21:33:25.000000000 +0100
@@ -393,7 +393,7 @@
snd_ice1712_delta_cs8403_spdif_write(ice, tmp);
}

-int snd_ice1712_delta1010lt_wordclock_status_info(struct snd_kcontrol *kcontrol,
+static int snd_ice1712_delta1010lt_wordclock_status_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
@@ -403,7 +403,7 @@
return 0;
}

-int snd_ice1712_delta1010lt_wordclock_status_get(struct snd_kcontrol *kcontrol,
+static int snd_ice1712_delta1010lt_wordclock_status_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
char reg = 0x10; // cs8427 receiver error register

2006-03-13 21:17:03

by Adrian Bunk

[permalink] [raw]
Subject: [RFC: -mm patch] remove drivers/message/fusion/mptscsih.c:mptscsih_setDevicePage1Flags()

On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc5-mm3:
>...
> git-scsi-misc.patch
>...
> git trees
>...


This function no longer has any user.


Signed-off-by: Adrian Bunk <[email protected]>

---

drivers/message/fusion/mptscsih.c | 49 ------------------------------
1 file changed, 49 deletions(-)

--- linux-2.6.16-rc6-mm1-full/drivers/message/fusion/mptscsih.c.old 2006-03-13 21:28:56.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/drivers/message/fusion/mptscsih.c 2006-03-13 21:29:10.000000000 +0100
@@ -2783,55 +2783,6 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- * SCSI Config Page functionality ...
- */
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/* mptscsih_setDevicePage1Flags - add Requested and Configuration fields flags
- * based on width, factor and offset parameters.
- * @width: bus width
- * @factor: sync factor
- * @offset: sync offset
- * @requestedPtr: pointer to requested values (updated)
- * @configurationPtr: pointer to configuration values (updated)
- * @flags: flags to block WDTR or SDTR negotiation
- *
- * Return: None.
- *
- * Remark: Called by writeSDP1 and _dv_params
- */
-static void
-mptscsih_setDevicePage1Flags (u8 width, u8 factor, u8 offset, int *requestedPtr, int *configurationPtr, u8 flags)
-{
- u8 nowide = flags & MPT_TARGET_NO_NEGO_WIDE;
- u8 nosync = flags & MPT_TARGET_NO_NEGO_SYNC;
-
- *configurationPtr = 0;
- *requestedPtr = width ? MPI_SCSIDEVPAGE1_RP_WIDE : 0;
- *requestedPtr |= (offset << 16) | (factor << 8);
-
- if (width && offset && !nowide && !nosync) {
- if (factor < MPT_ULTRA160) {
- *requestedPtr |= (MPI_SCSIDEVPAGE1_RP_IU + MPI_SCSIDEVPAGE1_RP_DT);
- if ((flags & MPT_TARGET_NO_NEGO_QAS) == 0)
- *requestedPtr |= MPI_SCSIDEVPAGE1_RP_QAS;
- if (flags & MPT_TAPE_NEGO_IDP)
- *requestedPtr |= 0x08000000;
- } else if (factor < MPT_ULTRA2) {
- *requestedPtr |= MPI_SCSIDEVPAGE1_RP_DT;
- }
- }
-
- if (nowide)
- *configurationPtr |= MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED;
-
- if (nosync)
- *configurationPtr |= MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED;
-
- return;
-}
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* mptscsih_writeIOCPage4 - write IOC Page 4
* @hd: Pointer to a SCSI Host Structure
* @target_id: write IOC Page4 for this ID & Bus

2006-03-13 21:19:28

by Adrian Bunk

[permalink] [raw]
Subject: [RFC: -mm patch] fs/nfsd/export.c,net/sunrpc/cache.c: make needlessly global code static

On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>...
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-2.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-3.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-3-fix.patch
> +knfsd-break-the-hard-linkage-from-svc_expkey-to-svc_export.patch
> +knfsd-get-rid-of-inplace-sunrpc-caches.patch
> +knfsd-create-cache_lookup-function-instead-of-using-a-macro-to-declare-one.patch
> +knfsd-convert-ip_map-cache-to-use-the-new-lookup-routine.patch
> +knfsd-use-new-cache_lookup-for-svc_export.patch
> +knfsd-use-new-cache_lookup-for-svc_expkey-cache.patch
> +knfsd-use-new-sunrpc-cache-for-rsi-cache.patch
> +knfsd-use-new-cache-code-for-rsc-cache.patch
> +knfsd-use-new-cache-code-for-name-id-lookup-caches.patch
> +knfsd-an-assortment-of-little-fixes-to-the-sunrpc-cache-code.patch
> +knfsd-remove-definecachelookup.patch
> +knfsd-unexport-cache_fresh-and-fix-a-small-race.patch
> +knfsd-convert-sunrpc_cache-to-use-krefs.patch
> +knfsd-convert-sunrpc_cache-to-use-krefs-fix.patch
>
> knfsd update
>...


We can now make some code static.


Signed-off-by: Adrian Bunk <[email protected]>

---

fs/nfsd/export.c | 13 ++++++++-----
include/linux/nfsd/export.h | 5 +----
include/linux/sunrpc/cache.h | 1 -
net/sunrpc/cache.c | 2 +-
net/sunrpc/sunrpc_syms.c | 1 -
5 files changed, 10 insertions(+), 12 deletions(-)

--- linux-2.6.16-rc6-mm1-full/include/linux/nfsd/export.h.old 2006-03-13 21:18:50.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/include/linux/nfsd/export.h 2006-03-13 21:20:05.000000000 +0100
@@ -86,9 +86,6 @@
void nfsd_export_flush(void);
void exp_readlock(void);
void exp_readunlock(void);
-struct svc_expkey * exp_find_key(struct auth_domain *clp,
- int fsid_type, u32 *fsidv,
- struct cache_req *reqp);
struct svc_export * exp_get_by_name(struct auth_domain *clp,
struct vfsmount *mnt,
struct dentry *dentry,
@@ -102,7 +99,7 @@
int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq);
int nfserrno(int errno);

-extern struct cache_detail svc_export_cache, svc_expkey_cache;
+extern struct cache_detail svc_export_cache;

static inline void exp_put(struct svc_export *exp)
{
--- linux-2.6.16-rc6-mm1-full/fs/nfsd/export.c.old 2006-03-13 21:19:13.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/fs/nfsd/export.c 2006-03-13 21:25:02.000000000 +0100
@@ -57,7 +57,7 @@
#define EXPKEY_HASHMASK (EXPKEY_HASHMAX -1)
static struct cache_head *expkey_table[EXPKEY_HASHMAX];

-void expkey_put(struct kref *ref)
+static void expkey_put(struct kref *ref)
{
struct svc_expkey *key = container_of(ref, struct svc_expkey, h.ref);

@@ -87,6 +87,8 @@

static struct svc_expkey *svc_expkey_update(struct svc_expkey *new, struct svc_expkey *old);
static struct svc_expkey *svc_expkey_lookup(struct svc_expkey *);
+static struct cache_detail svc_expkey_cache;
+
static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
{
/* client fsidtype fsid [path] */
@@ -255,7 +257,7 @@
return NULL;
}

-struct cache_detail svc_expkey_cache = {
+static struct cache_detail svc_expkey_cache = {
.owner = THIS_MODULE,
.hash_size = EXPKEY_HASHMAX,
.hash_table = expkey_table,
@@ -345,7 +347,8 @@
(*bpp)[-1] = '\n';
}

-struct svc_export *svc_export_update(struct svc_export *new, struct svc_export *old);
+static struct svc_export *svc_export_update(struct svc_export *new,
+ struct svc_export *old);
static struct svc_export *svc_export_lookup(struct svc_export *);

static int check_export(struct inode *inode, int flags)
@@ -574,7 +577,7 @@
return NULL;
}

-struct svc_export *
+static struct svc_export *
svc_export_update(struct svc_export *new, struct svc_export *old)
{
struct cache_head *ch;
@@ -593,7 +596,7 @@
}


-struct svc_expkey *
+static struct svc_expkey *
exp_find_key(svc_client *clp, int fsid_type, u32 *fsidv, struct cache_req *reqp)
{
struct svc_expkey key, *ek;
--- linux-2.6.16-rc6-mm1-full/include/linux/sunrpc/cache.h.old 2006-03-13 21:26:34.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/include/linux/sunrpc/cache.h 2006-03-13 21:26:40.000000000 +0100
@@ -163,7 +163,6 @@
kref_put(&h->ref, cd->cache_put);
}

-extern void cache_init(struct cache_head *h);
extern int cache_check(struct cache_detail *detail,
struct cache_head *h, struct cache_req *rqstp);
extern void cache_flush(void);
--- linux-2.6.16-rc6-mm1-full/net/sunrpc/cache.c.old 2006-03-13 21:26:55.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/net/sunrpc/cache.c 2006-03-13 21:27:01.000000000 +0100
@@ -37,7 +37,7 @@
static void cache_defer_req(struct cache_req *req, struct cache_head *item);
static void cache_revisit_request(struct cache_head *item);

-void cache_init(struct cache_head *h)
+static void cache_init(struct cache_head *h)
{
time_t now = get_seconds();
h->next = NULL;
--- linux-2.6.16-rc6-mm1-full/net/sunrpc/sunrpc_syms.c.old 2006-03-13 21:27:10.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/net/sunrpc/sunrpc_syms.c 2006-03-13 21:27:13.000000000 +0100
@@ -105,7 +105,6 @@
EXPORT_SYMBOL(cache_check);
EXPORT_SYMBOL(cache_flush);
EXPORT_SYMBOL(cache_purge);
-EXPORT_SYMBOL(cache_init);
EXPORT_SYMBOL(cache_register);
EXPORT_SYMBOL(cache_unregister);
EXPORT_SYMBOL(qword_add);

2006-03-13 21:21:20

by Adrian Bunk

[permalink] [raw]
Subject: [RFC: -mm patch] remove drivers/scsi/constants.c:scsi_print_req_sense()

On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc5-mm3:
>...
> git-scsi-misc.patch
>...
> git trees
>...


This function is no longer used anywhere.


Signed-off-by: Adrian Bunk <[email protected]>

---

drivers/scsi/constants.c | 10 ----------
include/scsi/scsi_dbg.h | 1 -
2 files changed, 11 deletions(-)

--- linux-2.6.16-rc6-mm1-full/include/scsi/scsi_dbg.h.old 2006-03-13 21:15:08.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/include/scsi/scsi_dbg.h 2006-03-13 21:15:17.000000000 +0100
@@ -9,7 +9,6 @@
extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *);
extern void __scsi_print_command(unsigned char *);
extern void scsi_print_sense(const char *, struct scsi_cmnd *);
-extern void scsi_print_req_sense(const char *, struct scsi_request *);
extern void __scsi_print_sense(const char *name,
const unsigned char *sense_buffer,
int sense_len);
--- linux-2.6.16-rc6-mm1-full/drivers/scsi/constants.c.old 2006-03-13 21:15:41.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/drivers/scsi/constants.c 2006-03-13 21:39:51.000000000 +0100
@@ -1259,16 +1259,6 @@
}
EXPORT_SYMBOL(scsi_print_sense);

-void scsi_print_req_sense(const char *devclass, struct scsi_request *sreq)
-{
- const char *name = devclass;
-
- if (sreq->sr_request->rq_disk)
- name = sreq->sr_request->rq_disk->disk_name;
- __scsi_print_sense(name, sreq->sr_sense_buffer, SCSI_SENSE_BUFFERSIZE);
-}
-EXPORT_SYMBOL(scsi_print_req_sense);
-
void scsi_print_command(struct scsi_cmnd *cmd)
{
/* Assume appended output (i.e. not at start of line) */

2006-03-13 21:26:05

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] make drivers/net/tg3.c:tg3_request_irq()

On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc5-mm3:
>...
> git-net.patch
>...
> git trees
>...


This patch makes the needlessly global function tg3_request_irq()
static.


Signed-off-by: Adrian Bunk <[email protected]>

--- linux-2.6.16-rc6-mm1-full/drivers/net/tg3.c.old 2006-03-13 21:13:31.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/drivers/net/tg3.c 2006-03-13 21:14:26.000000000 +0100
@@ -6531,7 +6531,7 @@
add_timer(&tp->timer);
}

-int tg3_request_irq(struct tg3 *tp)
+static int tg3_request_irq(struct tg3 *tp)
{
irqreturn_t (*fn)(int, void *, struct pt_regs *);
unsigned long flags;

2006-03-13 21:28:16

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] dvb/frontends/zl10353.c: make a function static

On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc5-mm3:
>...
> git-dvb.patch
>...
> git trees
>...


This patch makes a needlessly global function static.


Signed-off-by: Adrian Bunk <[email protected]>

--- linux-2.6.16-rc6-mm1-full/drivers/media/dvb/frontends/zl10353.c.old 2006-03-13 21:11:08.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/drivers/media/dvb/frontends/zl10353.c 2006-03-13 21:11:33.000000000 +0100
@@ -88,7 +88,7 @@
return b1[0];
}

-void zl10353_dump_regs(struct dvb_frontend *fe)
+static void zl10353_dump_regs(struct dvb_frontend *fe)
{
struct zl10353_state *state = fe->demodulator_priv;
char buf[52], buf2[4];

2006-03-14 03:23:19

by Maneesh Soni

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180

Quoting Greg KH <[email protected]>:

> On Mon, Mar 13, 2006 at 06:04:52PM +0100, Laurent Riffard wrote:
>>
>> Le 13.03.2006 15:00, Maneesh Soni a ?crit :
>> > On Sun, Mar 12, 2006 at 03:01:58PM -0800, Andrew Morton wrote:
>> >>Laurent Riffard <[email protected]> wrote:
>> >>>Le 12.03.2006 12:10, Andrew Morton a ?crit :
>> >>> >
>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>> >>>
>> >>> Hello,
>> >>>
>> >>> This kernel hangs on boot while trying to activate logical
>> >>> volumes from initrd:
>> >>>
>> >>> ------------[ cut here ]------------
>> >>> kernel BUG at fs/sysfs/inode.c:180!
>> >>> invalid opcode: 0000 [#1]
>> >>> last sysfs file: /block/ram0/dev
>> >>> Modules linked in: dm_mirror dm_mod
>> >>> CPU: 0
>> >>> EIP: 0060:[<c0172e71>] Not tainted VLI
>> >>> EFLAGS: 00010246 (2.6.16-rc6-mm1 #123)
>> >>> EIP is at sysfs_get_name+0xd/0x46
>> >>> eax: c15a49c8 ebx: dfe2b988 ecx: dff254d8 edx: c15a49cc
>> >>> esi: dfe87b05 edi: dfe2b988 ebp: dfe67d28 esp: dfe67d28
>> >>> ds: 007b es: 007b ss: 0068
>> >>> Process vgchange (pid: 242, threadinfo=dfe67000 task=dfe175d0)
>> >>> Stack: <0>dfe67d44 c01738c3 dffdc4b4 c15a49c8 dfe2b988 ffffffef
>> dfe2b98d dfe67d60
>> >>> c0173dcd dff2a804 dfe2b984 dfe2b984 00000001 fffffffe
>> dfe67d74 c0173f3b
>> >>> dfe67d6c c15a84d4 dfe2b984 dfe67d90 c01a33fd c03242d0
>> 00000004 dfe2b8f8
>> >>> Call Trace:
>> >>> [<c0103a31>] show_stack_log_lvl+0x8b/0x95
>> >>> [<c0103b69>] show_registers+0x12e/0x194
>> >>> [<c0103e62>] die+0x14e/0x1db
>> >>> [<c01040ba>] do_trap+0x7c/0x96
>> >>> [<c0104319>] do_invalid_op+0x89/0x93
>> >>> [<c01034db>] error_code+0x4f/0x54
>> >>> [<c01738c3>] sysfs_dirent_exist+0x1c/0x65
>> >>> [<c0173dcd>] create_dir+0x55/0x17d
>> >>> [<c0173f3b>] sysfs_create_dir+0x46/0x61
>> >>> [<c01a33fd>] kobject_add+0xa4/0x14c
>> >>> [<c017267e>] register_disk+0x4b/0xe9
>> >>> [<c019c28c>] add_disk+0x2e/0x3d
>> >>> [<e08198a5>] create_aux+0x27e/0x2d7 [dm_mod]
>> >>> [<e081991d>] dm_create+0xe/0x10 [dm_mod]
>> >>> [<e081c317>] dev_create+0x4a/0x239 [dm_mod]
>> >>> [<e081c18c>] ctl_ioctl+0x203/0x238 [dm_mod]
>> >>> [<c0156648>] do_ioctl+0x3c/0x4f
>> >>> [<c0156851>] vfs_ioctl+0x1f6/0x20d
>> >>> [<c0156892>] sys_ioctl+0x2a/0x44
>> >>> [<c01029bb>] sysenter_past_esp+0x54/0x75
>> >>> Code: 0b 30 01 72 85 28 c0 ff 06 31 db eb 07 89 f8 e8 d1 8d fe
>> ff 83 c4 10 89 d8 5b 5e 5f c9 c3 55 85 c0 89 e5 74 06 83 78 14 00 75
>> 08 <0f> 0b b4 00 73 d3 28 c0 8b 50 18 83 fa 08 74 22 7f 0a 83 fa 02
>> >>
>> >>Thanks.
>> >>
>> >>Greg, can you please interpret this? What does this BUG:
>> >>
>> >>const unsigned char * sysfs_get_name(struct sysfs_dirent *sd)
>> >>{
>> >> struct attribute * attr;
>> >> struct bin_attribute * bin_attr;
>> >> struct relay_attribute * rel_attr;
>> >> struct sysfs_symlink * sl;
>> >>
>> >> if (!sd || !sd->s_element)
>> >> BUG();
>> >>
>> >>tell us?
>> >>
>> >
>> >
>> > I think here we have sd->s_element as NULL. This is probably due to
>> > my mistake in
>> >
>> >
>> gregkh-driver-sysfs-fix-problem-with-duplicate-sysfs-directories-and-files.patch
>> >
>> > NULL s_element which is used as cursor element is added to the s_children
>> > list in sysfs_dir_open() and is removed in sysfs_dir_close(). So if in
>> > between s_children is parsed, one can see sysfs_dirent with NULL
>> s_element.
>> >
>> > Please try the following patch on top of -mm1
>> >
>> >
>> > Thanks
>> > Maneesh
>> >
>> >
>> >
>> >
>> > o sysfs_dirent_exist() should ignore sysfs_dirent with NULL s_element
>> > as such element could have been added internally as cursor due to
>> > ->open() on parent directory.
>> >
>> > Signed-off-by: Maneesh Soni <[email protected]>
>> > ---
>> >
>> > linux-2.6.16-rc6-mm1-maneesh/fs/sysfs/dir.c | 12 +++++++-----
>> > 1 files changed, 7 insertions(+), 5 deletions(-)
>> >
>> > diff -puN fs/sysfs/dir.c~fix-sysfs-check-existing-sysfs_dirent
>> fs/sysfs/dir.c
>> > ---
>> linux-2.6.16-rc6-mm1/fs/sysfs/dir.c~fix-sysfs-check-existing-sysfs_dirent 2006-03-13 14:48:34.000000000
>> +0530
>> > +++ linux-2.6.16-rc6-mm1-maneesh/fs/sysfs/dir.c 2006-03-13
>> 15:01:32.934811856 +0530
>> > @@ -63,11 +63,13 @@ int sysfs_dirent_exist(struct sysfs_dire
>> > struct sysfs_dirent * sd;
>> >
>> > list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
>> > - const unsigned char * existing = sysfs_get_name(sd);
>> > - if (strcmp(existing, new))
>> > - continue;
>> > - else
>> > - return -EEXIST;
>> > + if (sd->s_element) {
>> > + const unsigned char * existing = sysfs_get_name(sd);
>> > + if (strcmp(existing, new))
>> > + continue;
>> > + else
>> > + return -EEXIST;
>> > + }
>> > }
>> >
>> > return 0;
>> > _
>> >
>>
>> Ok, with this one, it works fine.
>
> Thanks Maneesh for the quick fix, want me to merge this with your
> previous patch?
>

Yes, merging will be good.

Thanks
Maneesh

2006-03-14 11:16:37

by Takashi Iwai

[permalink] [raw]
Subject: Re: [-mm patch] sound/pci/ice1712/delta.c: make 2 functions static

At Mon, 13 Mar 2006 22:14:44 +0100,
Adrian Bunk wrote:
>
> On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
> >...
> > Changes since 2.6.16-rc5-mm3:
> >...
> > git-alsa.patch
> >...
> > git trees
> >...
>
>
> This patch makes two needlessly global functions static.
>
>
> Signed-off-by: Adrian Bunk <[email protected]>

Applied to ALSA tree. Thanks.


Takashi

>
> ---
>
> sound/pci/ice1712/delta.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux-2.6.16-rc6-mm1-full/sound/pci/ice1712/delta.c.old 2006-03-13 21:32:49.000000000 +0100
> +++ linux-2.6.16-rc6-mm1-full/sound/pci/ice1712/delta.c 2006-03-13 21:33:25.000000000 +0100
> @@ -393,7 +393,7 @@
> snd_ice1712_delta_cs8403_spdif_write(ice, tmp);
> }
>
> -int snd_ice1712_delta1010lt_wordclock_status_info(struct snd_kcontrol *kcontrol,
> +static int snd_ice1712_delta1010lt_wordclock_status_info(struct snd_kcontrol *kcontrol,
> struct snd_ctl_elem_info *uinfo)
> {
> uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
> @@ -403,7 +403,7 @@
> return 0;
> }
>
> -int snd_ice1712_delta1010lt_wordclock_status_get(struct snd_kcontrol *kcontrol,
> +static int snd_ice1712_delta1010lt_wordclock_status_get(struct snd_kcontrol *kcontrol,
> struct snd_ctl_elem_value *ucontrol)
> {
> char reg = 0x10; // cs8427 receiver error register
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2006-03-15 01:04:58

by David Miller

[permalink] [raw]
Subject: Re: [-mm patch] make drivers/net/tg3.c:tg3_request_irq()

From: Adrian Bunk <[email protected]>
Date: Mon, 13 Mar 2006 22:26:02 +0100

> This patch makes the needlessly global function tg3_request_irq()
> static.
>
> Signed-off-by: Adrian Bunk <[email protected]>

Applied, thanks Adrian.

2006-03-15 07:42:04

by Nishanth Aravamudan

[permalink] [raw]
Subject: Re: 2.6.16-rc6-mm1

On 12.03.2006 [03:10:36 -0800], Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>

Hrm, 2.6.16-rc6-mm1 fails to build 32-bit kernels on my Ubuntu Dapper
install (64-bit kernel, 32-bit userspace). gcc is version 4.0.3 (Ubuntu
4.0.3-1ubuntu1) and is biarch. It builds 64-bit kernels fine (including
2.6.16-rc6-mm1) and 2.6.16-rc6 as a 32-bit kernel also built fine. So
seems like a regression with patch specific to -mm :( After a quick peek
looks like 2.6.16-rc5-mm3 also suffers from this, at least (Sorry, I
only recently started building 32-bit kernels on this box).

nacc@arkanoid:~/linux/views/2.6.16-rc6-mm1-dev$ make ARCH=i386 O=$(pwd | sed s/views/build/) -j8
GEN /home/nacc/linux/build/2.6.16-rc6-mm1-dev/Makefile
CHK include/linux/version.h
Using /home/nacc/linux/views/2.6.16-rc6-mm1-dev as source for kernel
CHK usr/initramfs_list
CHK include/linux/compile.h
AS arch/i386/kernel/vsyscall-int80.o
AS arch/i386/kernel/vsyscall-sysenter.o
CC arch/i386/kernel/time_hpet.o
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S: Assembler messages:
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:131: Error: undefined symbol `RT_SIGFRAME_sigcontext' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:131: Error: undefined symbol `SIGCONTEXT_esp' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:132: Error: undefined symbol `RT_SIGFRAME_sigcontext' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:132: Error: undefined symbol `SIGCONTEXT_eax' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:133: Error: undefined symbol `RT_SIGFRAME_sigcontext' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:133: Error: undefined symbol `SIGCONTEXT_ecx' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:134: Error: undefined symbol `RT_SIGFRAME_sigcontext' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:134: Error: undefined symbol `SIGCONTEXT_edx' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:135: Error: undefined symbol `RT_SIGFRAME_sigcontext' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:135: Error: undefined symbol `SIGCONTEXT_ebx' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:136: Error: undefined symbol `RT_SIGFRAME_sigcontext' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:136: Error: undefined symbol `SIGCONTEXT_ebp' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:137: Error: undefined symbol `RT_SIGFRAME_sigcontext' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:137: Error: undefined symbol `SIGCONTEXT_esi' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:138: Error: undefined symbol `RT_SIGFRAME_sigcontext' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:138: Error: undefined symbol `SIGCONTEXT_edi' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:139: Error: undefined symbol `RT_SIGFRAME_sigcontext' in operation
/home/nacc/linux/views/2.6.16-rc6-mm1-dev/arch/i386/kernel/vsyscall-sigreturn.S:139: Error: undefined symbol `SIGCONTEXT_eip' in operation
make[2]: *** [arch/i386/kernel/vsyscall-int80.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [arch/i386/kernel/vsyscall-sysenter.o] Error 1
make[1]: *** [arch/i386/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes. Stop.
make: *** [_all] Error 2

Thanks,
Nish

2006-03-17 16:46:27

by Jiri Slaby

[permalink] [raw]
Subject: Re: BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Kent napsal(a):
> On Sun, 12 Mar 2006, Jiri Slaby wrote:
>
>> Andrew Morton wrote:
>>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>> [snip]
>>> +remove-redundant-check-from-autofs4_put_super.patch
>>> +autofs4-follow_link-missing-funtionality.patch
>>>
>>> Update autofs4 patches in -mm.
>> Hello,
>>
>> I caught this during ftp browsing autofs-bind-mounted directories. I don't know
>> circumstancies and if the patches above are source of problem. I also don't know
>> if -rc6-mm1 is the first one.
>
> btw what do you mean autofs-bind-mounted ?
For the first, sorry for the delay, I am going now to test it and gain more info
how to reproduce it. Come back soon.
>
>> BUG: atomic counter underflow at:
>> [<c0104736>] show_trace+0x13/0x15
>> [<c0104873>] dump_stack+0x1e/0x20
>> [<c01d6c97>] autofs4_wait+0x751/0x93a
>> [<c01d543b>] try_to_fill_dentry+0xca/0x11c
>> [<c01d59b3>] autofs4_revalidate+0xe1/0x148
>> [<c0171338>] do_lookup+0x40/0x157
>> [<c0172ec4>] __link_path_walk+0x804/0xe8c
>> [<c017359c>] link_path_walk+0x50/0xe8
>> [<c01738b7>] do_path_lookup+0x10f/0x26d
>> [<c017429c>] __user_walk_fd+0x33/0x50
>> [<c016d226>] vfs_stat_fd+0x1e/0x50
>> [<c016d30d>] vfs_stat+0x20/0x22
>> [<c016d328>] sys_stat64+0x19/0x2d
>> [<c0103127>] syscall_call+0x7/0xb
>>
>
> There's some suspicious code in waitq.c.
> Could you try the following patch for me please?
>
> --- linux-2.6.16-rc6-mm1/fs/autofs4/waitq.c.notify-bug 2006-03-13 13:23:52.000000000 +0800
> +++ linux-2.6.16-rc6-mm1/fs/autofs4/waitq.c 2006-03-13 13:25:40.000000000 +0800
> @@ -263,7 +263,7 @@ int autofs4_wait(struct autofs_sb_info *
> wq->tgid = current->tgid;
> wq->status = -EINTR; /* Status return if interrupted */
> atomic_set(&wq->wait_ctr, 2);
> - atomic_set(&wq->notified, 1);
> + atomic_set(&wq->notify, 1);
> mutex_unlock(&sbi->wq_mutex);
> } else {
> atomic_inc(&wq->wait_ctr);
> @@ -273,9 +273,11 @@ int autofs4_wait(struct autofs_sb_info *
> (unsigned long) wq->wait_queue_token, wq->len, wq->name, notify);
> }
>
> - if (notify != NFY_NONE && atomic_dec_and_test(&wq->notified)) {
> + if (notify != NFY_NONE && atomic_read(&wq->notify)) {
> int type;
>
> + atomic_dec(&wq->notify);
> +
> if (sbi->version < 5) {
> if (notify == NFY_MOUNT)
> type = autofs_ptype_missing;
> --- linux-2.6.16-rc6-mm1/fs/autofs4/autofs_i.h.notify-bug 2006-03-13 13:23:39.000000000 +0800
> +++ linux-2.6.16-rc6-mm1/fs/autofs4/autofs_i.h 2006-03-13 13:24:08.000000000 +0800
> @@ -85,7 +85,7 @@ struct autofs_wait_queue {
> pid_t tgid;
> /* This is for status reporting upon return */
> int status;
> - atomic_t notified;
> + atomic_t notify;
> atomic_t wait_ctr;
> };
>
>
>
>

thanks,
- --
Jiri Slaby http://www.fi.muni.cz/~xslaby
\_.-^-._ [email protected] _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFEGueJMsxVwznUen4RAh2NAKCn3If6/WX0/Ps/EGVM1TigT47zLgCfeftr
idL2GKQBfiW0MPCmsea9ZkI=
=24hQ
-----END PGP SIGNATURE-----

2006-03-17 17:47:07

by Jiri Slaby

[permalink] [raw]
Subject: Re: BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Kent napsal(a):
> On Sun, 12 Mar 2006, Jiri Slaby wrote:
>
>> Andrew Morton wrote:
>>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>> [snip]
>>> +remove-redundant-check-from-autofs4_put_super.patch
>>> +autofs4-follow_link-missing-funtionality.patch
>>>
>>> Update autofs4 patches in -mm.
>> Hello,
>>
>> I caught this during ftp browsing autofs-bind-mounted directories. I don't know
>> circumstancies and if the patches above are source of problem. I also don't know
>> if -rc6-mm1 is the first one.
>
> btw what do you mean autofs-bind-mounted ?
Hmm, I am unable to reproduce it :(.
I have ftp dir, there is misc directory which is autofs maintained and --bind
mounted directories from some corners of / (i. e. ntfs and ext3 dirs mounted
through --bind).
in /etc/auto.master:
...
/home/ftp/misc /etc/auto.ftpmisc
...

in /etc/auto.ftpmisc:
...
l -fstype=bind :/l/latest
...

Somebody was browsing through the ftp binded tree and these bugs appeared (only
twice).
>
>> BUG: atomic counter underflow at:
>> [<c0104736>] show_trace+0x13/0x15
>> [<c0104873>] dump_stack+0x1e/0x20
>> [<c01d6c97>] autofs4_wait+0x751/0x93a
>> [<c01d543b>] try_to_fill_dentry+0xca/0x11c
>> [<c01d59b3>] autofs4_revalidate+0xe1/0x148
>> [<c0171338>] do_lookup+0x40/0x157
>> [<c0172ec4>] __link_path_walk+0x804/0xe8c
>> [<c017359c>] link_path_walk+0x50/0xe8
>> [<c01738b7>] do_path_lookup+0x10f/0x26d
>> [<c017429c>] __user_walk_fd+0x33/0x50
>> [<c016d226>] vfs_stat_fd+0x1e/0x50
>> [<c016d30d>] vfs_stat+0x20/0x22
>> [<c016d328>] sys_stat64+0x19/0x2d
>> [<c0103127>] syscall_call+0x7/0xb
>>
>
> There's some suspicious code in waitq.c.
> Could you try the following patch for me please?

I can't confirm... I don't know.

regards,
- --
Jiri Slaby http://www.fi.muni.cz/~xslaby
\_.-^-._ [email protected] _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFEGvYqMsxVwznUen4RAv+YAJ44g+S/1sPkwRRa5CURQ7r2bfXG/gCfavOk
EXGCvJfqpmMgaFmTcj/9gD0=
=3o55
-----END PGP SIGNATURE-----

2006-03-19 01:05:37

by Jiri Slaby

[permalink] [raw]
Subject: Re: BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jiri Slaby napsal(a):
> Ian Kent napsal(a):
>>> On Sun, 12 Mar 2006, Jiri Slaby wrote:
>>>
>>>> Andrew Morton wrote:
>>>>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>>>> [snip]
>>>>> +remove-redundant-check-from-autofs4_put_super.patch
>>>>> +autofs4-follow_link-missing-funtionality.patch
>>>>>
>>>>> Update autofs4 patches in -mm.
>>>> Hello,
>>>>
>>>> I caught this during ftp browsing autofs-bind-mounted directories. I don't know
>>>> circumstancies and if the patches above are source of problem. I also don't know
>>>> if -rc6-mm1 is the first one.
>>> btw what do you mean autofs-bind-mounted ?
> Hmm, I am unable to reproduce it :(.
Yup, I've got it:
while /bin/true; do cd /home/ftp/misc/.ftpaccess; done
[nonexistent dir]
kill it
and

Mar 19 02:03:08 localhost automount[25680]: failed to mount
/home/ftp/misc/.ftpaccess
Mar 19 02:03:08 localhost automount[25682]: failed to mount
/home/ftp/misc/.ftpaccess
Mar 19 02:03:08 localhost kernel: BUG: atomic counter underflow at:
Mar 19 02:03:08 localhost kernel: [<c0104736>] show_trace+0x13/0x15
Mar 19 02:03:08 localhost kernel: [<c0104873>] dump_stack+0x1e/0x20
Mar 19 02:03:08 localhost kernel: [<c01d6c97>] autofs4_wait+0x751/0x93a
Mar 19 02:03:08 localhost kernel: [<c01d543b>] try_to_fill_dentry+0xca/0x11c
Mar 19 02:03:08 localhost kernel: [<c01d59b3>] autofs4_revalidate+0xe1/0x148
Mar 19 02:03:08 localhost kernel: [<c0171338>] do_lookup+0x40/0x157
Mar 19 02:03:08 localhost kernel: [<c0172ec4>] __link_path_walk+0x804/0xe8c
Mar 19 02:03:08 localhost kernel: [<c017359c>] link_path_walk+0x50/0xe8
Mar 19 02:03:08 localhost kernel: [<c01738b7>] do_path_lookup+0x10f/0x26d
Mar 19 02:03:08 localhost kernel: [<c017429c>] __user_walk_fd+0x33/0x50
Mar 19 02:03:08 localhost kernel: [<c0174412>] __user_walk+0x17/0x19
Mar 19 02:03:08 localhost automount[25683]: failed to mount
/home/ftp/misc/.ftpaccess
Mar 19 02:03:08 localhost kernel: [<c0162fb3>] sys_chdir+0x1a/0x77
Mar 19 02:03:08 localhost kernel: [<c0103127>] syscall_call+0x7/0xb
Mar 19 02:03:08 localhost automount[25684]: failed to mount
/home/ftp/misc/.ftpaccess

Now, I am going to test, if this dissapeared after your patch.

regards,
- --
Jiri Slaby http://www.fi.muni.cz/~xslaby
\_.-^-._ [email protected] _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFEHK5vMsxVwznUen4RAnFzAJ40HZllS1ypu5aH3LOLlg3AvZlhYwCfQc72
wL6CuAzQxu+IdR6+Da68vR8=
=HvFQ
-----END PGP SIGNATURE-----

2006-03-19 01:18:31

by Jiri Slaby

[permalink] [raw]
Subject: Re: BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Kent napsal(a):
> On Sun, 12 Mar 2006, Jiri Slaby wrote:
>
>> Andrew Morton wrote:
>>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>> [snip]
>>> +remove-redundant-check-from-autofs4_put_super.patch
>>> +autofs4-follow_link-missing-funtionality.patch
>>>
>>> Update autofs4 patches in -mm.
>> Hello,
>>
>> I caught this during ftp browsing autofs-bind-mounted directories. I don't know
>> circumstancies and if the patches above are source of problem. I also don't know
>> if -rc6-mm1 is the first one.
>
> btw what do you mean autofs-bind-mounted ?
>
>> BUG: atomic counter underflow at:
>> [<c0104736>] show_trace+0x13/0x15
>> [<c0104873>] dump_stack+0x1e/0x20
>> [<c01d6c97>] autofs4_wait+0x751/0x93a
>> [<c01d543b>] try_to_fill_dentry+0xca/0x11c
>> [<c01d59b3>] autofs4_revalidate+0xe1/0x148
>> [<c0171338>] do_lookup+0x40/0x157
>> [<c0172ec4>] __link_path_walk+0x804/0xe8c
>> [<c017359c>] link_path_walk+0x50/0xe8
>> [<c01738b7>] do_path_lookup+0x10f/0x26d
>> [<c017429c>] __user_walk_fd+0x33/0x50
>> [<c016d226>] vfs_stat_fd+0x1e/0x50
>> [<c016d30d>] vfs_stat+0x20/0x22
>> [<c016d328>] sys_stat64+0x19/0x2d
>> [<c0103127>] syscall_call+0x7/0xb
>>
>
> There's some suspicious code in waitq.c.
> Could you try the following patch for me please?
Yes, the patch below does solve the problem, can go upstream, good work!
>
> --- linux-2.6.16-rc6-mm1/fs/autofs4/waitq.c.notify-bug 2006-03-13 13:23:52.000000000 +0800
> +++ linux-2.6.16-rc6-mm1/fs/autofs4/waitq.c 2006-03-13 13:25:40.000000000 +0800
> @@ -263,7 +263,7 @@ int autofs4_wait(struct autofs_sb_info *
> wq->tgid = current->tgid;
> wq->status = -EINTR; /* Status return if interrupted */
> atomic_set(&wq->wait_ctr, 2);
> - atomic_set(&wq->notified, 1);
> + atomic_set(&wq->notify, 1);
> mutex_unlock(&sbi->wq_mutex);
> } else {
> atomic_inc(&wq->wait_ctr);
> @@ -273,9 +273,11 @@ int autofs4_wait(struct autofs_sb_info *
> (unsigned long) wq->wait_queue_token, wq->len, wq->name, notify);
> }
>
> - if (notify != NFY_NONE && atomic_dec_and_test(&wq->notified)) {
> + if (notify != NFY_NONE && atomic_read(&wq->notify)) {
> int type;
>
> + atomic_dec(&wq->notify);
> +
> if (sbi->version < 5) {
> if (notify == NFY_MOUNT)
> type = autofs_ptype_missing;
> --- linux-2.6.16-rc6-mm1/fs/autofs4/autofs_i.h.notify-bug 2006-03-13 13:23:39.000000000 +0800
> +++ linux-2.6.16-rc6-mm1/fs/autofs4/autofs_i.h 2006-03-13 13:24:08.000000000 +0800
> @@ -85,7 +85,7 @@ struct autofs_wait_queue {
> pid_t tgid;
> /* This is for status reporting upon return */
> int status;
> - atomic_t notified;
> + atomic_t notify;
> atomic_t wait_ctr;
> };
>
>
>
>

thanks,
- --
Jiri Slaby http://www.fi.muni.cz/~xslaby
\_.-^-._ [email protected] _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFEHLF2MsxVwznUen4RAjKxAJwMjbCTrNJ88HMXSLdEr+HuTJ7QoACfb+bS
J4s6vVAbXiJ9KDijb1C8nLI=
=MDV2
-----END PGP SIGNATURE-----

2006-03-23 11:45:17

by Ian Kent

[permalink] [raw]
Subject: Re: BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1]

On Sun, 19 Mar 2006, Jiri Slaby wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ian Kent napsal(a):
> > On Sun, 12 Mar 2006, Jiri Slaby wrote:
> >
> >> Andrew Morton wrote:
> >>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
> >> [snip]
> >>> +remove-redundant-check-from-autofs4_put_super.patch
> >>> +autofs4-follow_link-missing-funtionality.patch
> >>>
> >>> Update autofs4 patches in -mm.
> >> Hello,
> >>
> >> I caught this during ftp browsing autofs-bind-mounted directories. I don't know
> >> circumstancies and if the patches above are source of problem. I also don't know
> >> if -rc6-mm1 is the first one.
> >
> > btw what do you mean autofs-bind-mounted ?
> >
> >> BUG: atomic counter underflow at:
> >> [<c0104736>] show_trace+0x13/0x15
> >> [<c0104873>] dump_stack+0x1e/0x20
> >> [<c01d6c97>] autofs4_wait+0x751/0x93a
> >> [<c01d543b>] try_to_fill_dentry+0xca/0x11c
> >> [<c01d59b3>] autofs4_revalidate+0xe1/0x148
> >> [<c0171338>] do_lookup+0x40/0x157
> >> [<c0172ec4>] __link_path_walk+0x804/0xe8c
> >> [<c017359c>] link_path_walk+0x50/0xe8
> >> [<c01738b7>] do_path_lookup+0x10f/0x26d
> >> [<c017429c>] __user_walk_fd+0x33/0x50
> >> [<c016d226>] vfs_stat_fd+0x1e/0x50
> >> [<c016d30d>] vfs_stat+0x20/0x22
> >> [<c016d328>] sys_stat64+0x19/0x2d
> >> [<c0103127>] syscall_call+0x7/0xb
> >>
> >
> > There's some suspicious code in waitq.c.
> > Could you try the following patch for me please?
> Yes, the patch below does solve the problem, can go upstream, good work!

Sorry to take so long to get back, I've been busy.

Thanks for that.
I'll submit the patch.

Ian