1. 10 Jan, 2007 22 commits
  2. 11 Dec, 2006 18 commits
    • Chris Wright's avatar
      Linux 2.6.19.1 · 1edb5a2d
      Chris Wright authored
      1edb5a2d
    • David Miller's avatar
      [PATCH] NETLINK: Put {IFA,IFLA}_{RTA,PAYLOAD} macros back for userspace. · f558fdfa
      David Miller authored
      GLIBC uses them etc.
      
      They are guarded by ifndef __KERNEL__ so nobody will start
      accidently using them in the kernel again, it's just for
      userspace.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      f558fdfa
    • Daniel Barkalow's avatar
      [PATCH] forcedeth: Disable INTx when enabling MSI in forcedeth · 39a17363
      Daniel Barkalow authored
      At least some nforce cards continue to send legacy interrupts when MSI
      is enabled, and these interrupts are treated as unhandled by the
      kernel. This patch disables legacy interrupts explicitly when enabling
      MSI mode.
      
      The correct fix is to change the MSI infrastructure to disable legacy
      interrupts when enabling MSI, but this is potentially risky if the
      device isn't PCI-2.3 or is quirky, so the correct fix is going into
      mainline, while patches like this one go into -stable.
      
      Legend has it that it is most correct to disable legacy interrupts
      before enabling MSI, but the mainline patch does it in the other
      order, and this patch is "obviously" the same as mainline.
      Signed-off-by: default avatarDaniel Barkalow <barkalow@iabervon.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Greg KH <gregkh@suse.de>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      39a17363
    • Ravikiran G Thirumalai's avatar
      [PATCH] x86: Fix boot hang due to nmi watchdog init code · 3667bf6d
      Ravikiran G Thirumalai authored
      2.6.19  stopped booting (or booted based on build/config) on our x86_64
      systems due to a bug introduced in 2.6.19.  check_nmi_watchdog schedules an
      IPI on all cpus to  busy wait on a flag, but fails to set the busywait
      flag if NMI functionality is disabled.  This causes the secondary cpus
      to spin in an endless loop, causing the kernel bootup to hang.
      Depending upon the build, the  busywait flag got overwritten (stack variable)
      and caused  the kernel to bootup on certain builds.  Following patch fixes
      the bug by setting the busywait flag before returning from check_nmi_watchdog.
      I guess using a stack variable is not good here as the calling function could
      potentially return while the busy wait loop is still spinning on the flag.
      
      AK: I redid the patch significantly to be cleaner
      Signed-off-by: default avatarRavikiran Thirumalai <kiran@scalex86.org>
      Signed-off-by: default avatarShai Fultheim <shai@scalex86.org>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      3667bf6d
    • Hirokazu Takata's avatar
      [PATCH] m32r: make userspace headers platform-independent · a10457cc
      Hirokazu Takata authored
      The m32r kernel 2.6.18-rc1 or after cause build errors of "unknown isa
      configuration" for userspace application programs, such as glibc, gdb, etc.
      
      This is because the recent kernel do not include linux/config.h not to expose
      kernel headers for userspace.
      
      To fix the above compile errors, this patch fixes two headers ptrace.h and
      sigcontext.h for m32r and makes them platform-independent.
      Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      a10457cc
    • Zachary Amsden's avatar
      [PATCH] softirq: remove BUG_ONs which can incorrectly trigger · a3956ef7
      Zachary Amsden authored
      It is possible to have tasklets get scheduled before softirqd has had a chance
      to spawn on all CPUs.  This is totally harmless; after success during action
      CPU_UP_PREPARE, action CPU_ONLINE will be called, which immediately wakes
      softirqd on the appropriate CPU to process the already pending tasklets.  So
      there is no danger of having a missed wakeup for any tasklets that were
      already pending.
      
      In particular, i386 is affected by this during startup, and is visible when
      using a very large initrd; during the time it takes for the initrd to be
      decompressed, a timer IRQ can come in and schedule RCU callbacks.  It is also
      possible that resending of a hardware IRQ via a softirq triggers the same bug.
      
      Because of different timing conditions, this shows up in all emulators and
      virtual machines tested, including Xen, VMware, Virtual PC, and Qemu.  It is
      also possible to trigger on native hardware with a large enough initrd,
      although I don't have a reliable case demonstrating that.
      Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
      Cc: <caglar@pardus.org.tr>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      a3956ef7
    • Jiri Kosina's avatar
      [PATCH] autofs: fix error code path in autofs_fill_sb() · 7f803f51
      Jiri Kosina authored
      When kernel is compiled with old version of autofs (CONFIG_AUTOFS_FS), and
      new (observed at least with 5.x.x) automount deamon is started, kernel
      correctly reports incompatible version of kernel and userland daemon, but
      then screws things up instead of correct handling of the error:
      
       autofs: kernel does not match daemon version
       =====================================
       [ BUG: bad unlock balance detected! ]
       -------------------------------------
       automount/4199 is trying to release lock (&type->s_umount_key) at:
       [<c0163b9e>] get_sb_nodev+0x76/0xa4
       but there are no more locks to release!
      
       other info that might help us debug this:
       no locks held by automount/4199.
      
       stack backtrace:
        [<c0103b15>] dump_trace+0x68/0x1b2
        [<c0103c77>] show_trace_log_lvl+0x18/0x2c
        [<c01041db>] show_trace+0xf/0x11
        [<c010424d>] dump_stack+0x12/0x14
        [<c012e02c>] print_unlock_inbalance_bug+0xe7/0xf3
        [<c012fd4f>] lock_release+0x8d/0x164
        [<c012b452>] up_write+0x14/0x27
        [<c0163b9e>] get_sb_nodev+0x76/0xa4
        [<c0163689>] vfs_kern_mount+0x83/0xf6
        [<c016373e>] do_kern_mount+0x2d/0x3e
        [<c017513f>] do_mount+0x607/0x67a
        [<c0175224>] sys_mount+0x72/0xa4
        [<c0102b96>] sysenter_past_esp+0x5f/0x99
       DWARF2 unwinder stuck at sysenter_past_esp+0x5f/0x99
       Leftover inexact backtrace:
        =======================
      
      and then deadlock comes.
      
      The problem: autofs_fill_super() returns EINVAL to get_sb_nodev(), but
      before that, it calls kill_anon_super() to destroy the superblock which
      won't be needed.  This is however way too soon to call kill_anon_super(),
      because get_sb_nodev() has to perform its own cleanup of the superblock
      first (deactivate_super(), etc.).  The correct time to call
      kill_anon_super() is in the autofs_kill_sb() callback, which is called by
      deactivate_super() at proper time, when the superblock is ready to be
      killed.
      
      I can see the same faulty codepath also in autofs4.  This patch solves
      issues in both filesystems in a same way - it postpones the
      kill_anon_super() until the proper time is signalized by deactivate_super()
      calling the kill_sb() callback.
      
      [raven@themaw.net: update comment]
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Acked-by: default avatarIan Kent <raven@themaw.net>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarIan Kent <raven@themaw.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      7f803f51
    • Rafael J Wysocki's avatar
      [PATCH] PM: Fix swsusp debug mode testproc · 1f583f62
      Rafael J Wysocki authored
      The 'testproc' swsusp debug mode thaws tasks twice in a row, which is _very_
      confusing.  Fix that.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      1f583f62
    • Andrey Mirkin's avatar
      [PATCH] compat: skip data conversion in compat_sys_mount when data_page is NULL · 1157f828
      Andrey Mirkin authored
      OpenVZ Linux kernel team has found a problem with mounting in compat mode.
      
      Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode
      leads to oops:
      
      Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
      [<ffffffff802bc7c6>] compat_sys_mount+0xd6/0x290
      PGD 34d48067 PUD 34d03067 PMD 0
      Oops: 0000 [1] SMP
      CPU: 0
      Modules linked in: iptable_nat simfs smbfs ip_nat ip_conntrack vzdquota
      parport_pc lp parport 8021q bridge llc vznetdev vzmon nfs lockd sunrpc vzdev
      iptable_filter af_packet xt_length ipt_ttl xt_tcpmss ipt_TCPMSS
      iptable_mangle xt_limit ipt_tos ipt_REJECT ip_tables x_tables thermal
      processor fan button battery asus_acpi ac uhci_hcd ehci_hcd usbcore i2c_i801
      i2c_core e100 mii floppy ide_cd cdrom
      Pid: 14656, comm: mount
      RIP: 0060:[<ffffffff802bc7c6>]  [<ffffffff802bc7c6>]
      compat_sys_mount+0xd6/0x290
      RSP: 0000:ffff810034d31f38  EFLAGS: 00010292
      RAX: 000000000000002c RBX: 0000000000000000 RCX: 0000000000000000
      RDX: ffff810034c86bc0 RSI: 0000000000000096 RDI: ffffffff8061fc90
      RBP: ffff810034d31f78 R08: 0000000000000000 R09: 000000000000000d
      R10: ffff810034d31e58 R11: 0000000000000001 R12: ffff810039dc3000
      R13: 000000000805ea48 R14: 0000000000000000 R15: 00000000c0ed0000
      FS:  0000000000000000(0000) GS:ffffffff80749000(0033) knlGS:00000000b7d556b0
      CS:  0060 DS: 007b ES: 007b CR0: 000000008005003b
      CR2: 0000000000000000 CR3: 0000000034d43000 CR4: 00000000000006e0
      Process mount (pid: 14656, veid=300, threadinfo ffff810034d30000, task
      ffff810034c86bc0)
      Stack:  0000000000000000 ffff810034dd0000 ffff810034e4a000 000000000805ea48
       0000000000000000 0000000000000000 0000000000000000 0000000000000000
       000000000805ea48 ffffffff8021e64e 0000000000000000 0000000000000000
      Call Trace:
       [<ffffffff8021e64e>] ia32_sysret+0x0/0xa
      
      Code: 83 3b 06 0f 85 41 01 00 00 0f b7 43 0c 89 43 14 0f b7 43 0a
      RIP  [<ffffffff802bc7c6>] compat_sys_mount+0xd6/0x290
       RSP <ffff810034d31f38>
      CR2: 0000000000000000
      
      The problem is that data_page pointer can be NULL, so we should skip data
      conversion in this case.
      Signed-off-by: default avatarAndrey Mirkin <amirkin@openvz.org>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      1157f828
    • Andrew Morton's avatar
      [PATCH] drm-sis linkage fix · ce9507af
      Andrew Morton authored
      Fix http://bugzilla.kernel.org/show_bug.cgi?id=7606
      
      WARNING: "drm_sman_set_manager" [drivers/char/drm/sis.ko] undefined!
      
      Cc: <daniel-silveira@gee.inatel.br>
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      ce9507af
    • Andrew Morton's avatar
      [PATCH] add bottom_half.h · a030daed
      Andrew Morton authored
      With CONFIG_SMP=n:
      
      drivers/input/ff-memless.c:384: warning: implicit declaration of function 'local_bh_disable'
      drivers/input/ff-memless.c:393: warning: implicit declaration of function 'local_bh_enable'
      
      Really linux/spinlock.h should include linux/interrupt.h.  But interrupt.h
      includes sched.h which will need spinlock.h.
      
      So the patch breaks the _bh declarations out into a separate header and
      includes it in bothj interrupt.h and spinlock.h.
      
      Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
      Cc: Andi Kleen <ak@suse.de>
      Cc: <stable@kernel.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      a030daed
    • Thomas Graf's avatar
      [PATCH] NETLINK: Restore API compatibility of address and neighbour bits · 04ff1391
      Thomas Graf authored
      Restore API compatibility due to bits moved from rtnetlink.h to
      separate headers.
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      04ff1391
    • Jeet Chaudhuri's avatar
      [PATCH] IrDA: Incorrect TTP header reservation · d58808bc
      Jeet Chaudhuri authored
      We must reserve SAR + MAX_HEADER bytes for IrLMP to fit in.
      This fixes an oops reported (and fixed) by Jeet Chaudhuri, when max_sdu_size
      is greater than 0.
      Signed-off-by: default avatarSamuel Ortiz <samuel@sortiz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      d58808bc
    • David Miller's avatar
      [PATCH] IPSEC: Fix inetpeer leak in ipv4 xfrm dst entries. · 5bcd4af5
      David Miller authored
      We grab a reference to the route's inetpeer entry but
      forget to release it in xfrm4_dst_destroy().
      
      Bug discovered by Kazunori MIYAZAWA <kazunori@miyazawa.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      5bcd4af5
    • Sean Young's avatar
      [PATCH] USB: Fix oops in PhidgetServo · 53f95659
      Sean Young authored
      The PhidgetServo causes an Oops when any of its sysfs attributes are read
      or written too, making the driver useless.
      Signed-off-by: default avatarSean Young <sean@mess.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      53f95659
    • Patrick McHardy's avatar
      [PATCH] XFRM: Use output device disable_xfrm for forwarded packets · 4bcae319
      Patrick McHardy authored
      Currently the behaviour of disable_xfrm is inconsistent between
      locally generated and forwarded packets. For locally generated
      packets disable_xfrm disables the policy lookup if it is set on
      the output device, for forwarded traffic however it looks at the
      input device. This makes it impossible to disable xfrm on all
      devices but a dummy device and use normal routing to direct
      traffic to that device.
      
      Always use the output device when checking disable_xfrm.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      4bcae319
    • David Miller's avatar
      [PATCH] TOKENRING: Remote memory corruptor in ibmtr.c · ad8ca99c
      David Miller authored
      ip_summed changes last summer had missed that one.  As the result,
      we have ip_summed interpreted as CHECKSUM_PARTIAL now.  IOW,
      ->csum is interpreted as offset of checksum in the packet.  net/core/*
      will both read and modify the value as that offset, with obvious
      reasons.  At the very least it's a remote memory corruptor.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      ad8ca99c
    • Alexey Dobriyan's avatar
      [PATCH] do_coredump() and not stopping rewrite attacks? (CVE-2006-6304) · a526d58e
      Alexey Dobriyan authored
      On Sat, Dec 02, 2006 at 11:47:44PM +0300, Alexey Dobriyan wrote:
      > David Binderman compiled 2.6.19 with icc and grepped for "was set but never
      > used". Many warnings are on
      > 	http://coderock.org/kj/unused-2.6.19-fs
      
      Heh, the very first line:
      fs/exec.c(1465): remark #593: variable "flag" was set but never used
      
      fs/exec.c:
        1477		/*
        1478		 *	We cannot trust fsuid as being the "true" uid of the
        1479		 *	process nor do we know its entire history. We only know it
        1480		 *	was tainted so we dump it as root in mode 2.
        1481		 */
        1482		if (mm->dumpable == 2) {	/* Setuid core dump mode */
        1483			flag = O_EXCL;		/* Stop rewrite attacks */
        1484			current->fsuid = 0;	/* Dump root private */
        1485		}
      
      And then filp_open follows with "flag" totally ignored.
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      a526d58e