1. 13 Oct, 2006 19 commits
    • Jeff Garzik's avatar
      mv643xx_eth: fix obvious typo, which caused build breakage · 5517ccc3
      Jeff Garzik authored
      The last minute fix submitted by the author fixed a bug, but
      broke the driver build.
      
      Noticed by Al Viro, since I can't build on said platform.
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      5517ccc3
    • Christoph Lameter's avatar
      zone_reclaim: dynamic slab reclaim · be64642c
      Christoph Lameter authored
      http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=0ff38490c836dc379ff7ec45b10a15a662f4e5f6
      
      
      Currently one can enable slab reclaim by setting an explicit option in
      /proc/sys/vm/zone_reclaim_mode.  Slab reclaim is then used as a final
      option if the freeing of unmapped file backed pages is not enough to free
      enough pages to allow a local allocation.
      
      However, that means that the slab can grow excessively and that most memory
      of a node may be used by slabs.  We have had a case where a machine with
      46GB of memory was using 40-42GB for slab.  Zone reclaim was effective in
      dealing with pagecache pages.  However, slab reclaim was only done during
      global reclaim (which is a bit rare on NUMA systems).
      
      This patch implements slab reclaim during zone reclaim.  Zone reclaim
      occurs if there is a danger of an off node allocation.  At that point we
      
      1. Shrink the per node page cache if the number of pagecache
         pages is more than min_unmapped_ratio percent of pages in a zone.
      
      2. Shrink the slab cache if the number of the nodes reclaimable slab pages
         (patch depends on earlier one that implements that counter)
         are more than min_slab_ratio (a new /proc/sys/vm tunable).
      
      The shrinking of the slab cache is a bit problematic since it is not node
      specific.  So we simply calculate what point in the slab we want to reach
      (current per node slab use minus the number of pages that neeed to be
      allocated) and then repeately run the global reclaim until that is
      unsuccessful or we have reached the limit.  I hope we will have zone based
      slab reclaim at some point which will make that easier.
      
      The default for the min_slab_ratio is 5%
      
      Also remove the slab option from /proc/sys/vm/zone_reclaim_mode.
      
      [akpm@osdl.org: cleanups]
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      be64642c
    • Christoph Lameter's avatar
      Fix longstanding load balancing bug in the scheduler · 9293b470
      Christoph Lameter authored
      The scheduler will stop load balancing if the most busy processor contains
      processes pinned via processor affinity.
      
      The scheduler currently only does one search for busiest cpu.  If it cannot
      pull any tasks away from the busiest cpu because they were pinned then the
      scheduler goes into a corner and sulks leaving the idle processors idle.
      
      F.e.  If you have processor 0 busy running four tasks pinned via taskset,
      there are none on processor 1 and one just started two processes on
      processor 2 then the scheduler will not move one of the two processes away
      from processor 2.
      
      This patch fixes that issue by forcing the scheduler to come out of its
      corner and retrying the load balancing by considering other processors for
      load balancing.
      
      This patch was originally developed by John Hawkes and discussed at
      http://marc.theaimsgroup.com/?l=linux-kernel&m=113901368523205&w=2.
      
      I have removed extraneous material and gone back to equipping struct rq
      with the cpu the queue is associated with since this makes the patch much
      easier and it is likely that others in the future will have the same
      difficulty of figuring out which processor owns which runqueue.
      
      The overhead added through these patches is a single word on the stack if
      the kernel is configured to support 32 cpus or less (32 bit).  For 32 bit
      environments the maximum number of cpus that can be configued is 255 which
      would result in the use of 32 bytes additional on the stack.  On IA64 up to
      1k cpus can be configured which will result in the use of 128 additional
      bytes on the stack.  The maximum additional cache footprint is one
      cacheline.  Typically memory use will be much less than a cacheline and the
      additional cpumask will be placed on the stack in a cacheline that already
      contains other local variable.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: John Hawkes <hawkes@sgi.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Peter Williams <pwil3058@bigpond.net.au>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9293b470
    • Jan Kara's avatar
      jbd: fix commit of ordered data buffers · 675c2387
      Jan Kara authored
      Original commit code assumes, that when a buffer on BJ_SyncData list is
      locked, it is being written to disk.  But this is not true and hence it can
      lead to a potential data loss on crash.  Also the code didn't count with
      the fact that journal_dirty_data() can steal buffers from committing
      transaction and hence could write buffers that no longer belong to the
      committing transaction.  Finally it could possibly happen that we tried
      writing out one buffer several times.
      
      The patch below tries to solve these problems by a complete rewrite of the
      data commit code.  We go through buffers on t_sync_datalist, lock buffers
      needing write out and store them in an array.  Buffers are also immediately
      refiled to BJ_Locked list or unfiled (if the write out is completed).  When
      the array is full or we have to block on buffer lock, we submit all
      accumulated buffers for IO.
      
      [suitable for 2.6.18.x around the 2.6.19-rc2 timeframe]
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      675c2387
    • Takashi Iwai's avatar
      ALSA: Fix initiailization of user-space controls · 566047d5
      Takashi Iwai authored
      ALSA: Fix initiailization of user-space controls
      
      Fix an assertion when accessing a user-defined control due to lack of
      initialization (appears only when CONFIG_SND_DEBUg is enabled).
      
        ALSA sound/core/control.c:660: BUG? (info->access == 0)
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      566047d5
    • Tony Lindgren's avatar
      USB: Allow compile in g_ether, fix typo · edd5ef83
      Tony Lindgren authored
      Allows compiling g_ether in and fixes a typo with MUSB_HDRC
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      edd5ef83
    • Jack Morgenstein's avatar
      IB/mthca: Fix lid used for sending traps · d083f6d9
      Jack Morgenstein authored
      The SM LID used to send traps to is incorrectly set to port LID.  This
      is a regression from 2.6.17 -- after a PortInfo MAD is received, no
      traps are sent to the SM LID.  The traps go to the loopback interface
      instead, and are dropped there.  The SM LID should be taken from the
      sm_lid of the PortInfo response.
      
      The bug was introduced by commit 12bbb2b7:
      	IB/mthca: Add client reregister event generation
      Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d083f6d9
    • Martin Schwidefsky's avatar
      S390: user readable uninitialised kernel memory (CVE-2006-5174) · fc51b686
      Martin Schwidefsky authored
      [S390] user readable uninitialised kernel memory.
      
      A user space program can read uninitialised kernel memory
      by appending to a file from a bad address and then reading
      the result back. The cause is the copy_from_user function
      that does not clear the remaining bytes of the kernel
      buffer after it got a fault on the user space address.
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fc51b686
    • Daniel Drake's avatar
      zd1211rw: ZD1211B ASIC/FWT, not jointly decoder · 728ffb9f
      Daniel Drake authored
      The vendor driver chooses this value based on an ifndef ASIC,
      and ASIC is never defined.
      Signed-off-by: default avatarDaniel Drake <dsd@gentoo.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      728ffb9f
    • Mike Isely's avatar
      V4L: pvrusb2: Limit hor res for 24xxx devices · f89950d3
      Mike Isely authored
      Currently it is not understood how to properly control the horizontal
      capture resolution on 24xxx devices.  The pvrusb2 driver is doing
      everything it should (pass resolution paramter(s) to cx2341x and
      cx25840 modules) but for some reason the result is corrupted video if
      any resolution other than 720 is used.  This patch causes the driver
      to only permit a horizontal resolution of 720 to be used on 24xxx
      devices.  Even if the app requests something else, the driver will
      force the resolution back to 720.  This patch still allows full
      control of the resolution for 29xxx devices.
      Signed-off-by: default avatarMike Isely <isely@pobox.com>
      Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f89950d3
    • Mike Isely's avatar
      V4L: pvrusb2: Suppress compiler warning · cd219de0
      Mike Isely authored
      The pvrusb2 driver needs to call video_devdata() in order to correctly
      transform a file pointer into a video_device pointer.  Unfortunately
      the prototype for this function has been marked V4L1-only and there's
      no official substitute that I can find for V4L2.  Adding to the
      mystery is that the implementation for this function exists whether or
      not V4L1 compatibility has been selected.  The upshot of all this is
      that we get a compilation warning here about a missing prototype but
      the code links OK.  This fix solves the warning by copying the
      prototype into the source file that is using it.  Yes this is a hack,
      but it's a safe one for 2.6.18 (any alternative would be much more
      intrusive).  A better solution should be forthcoming for the next
      kernel.
      Signed-off-by: default avatarMike Isely <isely@pobox.com>
      Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      cd219de0
    • Mike Isely's avatar
      V4L: pvrusb2: improve 24XXX config option description · 931dae02
      Mike Isely authored
      The CONFIG_VIDEO_PVRUSB2_24XXX is not nearly as "experimental" as the
      description suggests.  So refine the description to better match reality.
      Signed-off-by: default avatarMike Isely <isely@pobox.com>
      Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      931dae02
    • Mike Isely's avatar
      V4L: pvrusb2: Solve mutex deadlock · 7c34f701
      Mike Isely authored
      There is a mutex ordering problem between the pvrusb2 driver and the
      v4l core.  Two different pathways take mutexes in opposing orders and
      this (under rare circumstances) can cause a deadlock.  The two mutexes
      in question are videodev_lock in the v4l core and device_lock inside
      the pvrusb2 driver.  The device_lock instance in the driver protects a
      private global array of context pointers which had been implemented in
      advance of v4l core changes which eliminate the video_set_drvdata()
      and video_get_drvdata() functions.
      
      This patch restores the use of video_get_drvdata() and
      video_set_drvdata(), eliminating the need for the array and the mutex.
      (This is actually a patch to restore the previous implementation.)  We
      can do this for 2.6.18 since those functions are in fact still
      present.  A better (and larger) solution will be done for later
      kernels.
      Signed-off-by: default avatarMike Isely <isely@pobox.com>
      Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7c34f701
    • Yeasah Pell's avatar
      DVB: cx24123: fix PLL divisor setup · 17983c7e
      Yeasah Pell authored
      The cx24109 datasheet says: "NOTE: if A=0, then N=N+1"
      
      The current code is the result of a misinterpretation of the datasheet to
      mean exactly the opposite of the requirement -- The actual value of N is 1
      greater than the value written when A is 0, so 1 needs to be *subtracted*
      from it to compensate.
      Signed-off-by: default avatarYeasah Pell <yeasah@schwide.net>
      Signed-off-by: default avatarSteven Toth <stoth@hauppauge.com>
      Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      17983c7e
    • Hans Verkuil's avatar
      V4L: Fix msp343xG handling regression · c998b8df
      Hans Verkuil authored
      The msp3430G and msp3435G models cannot do Automatic Standard Detection,
      so these should be forced to BTSC. These chips are early production
      versions for the msp34xxG series and are quite rare.
      
      The workaround for kernel 2.6.18 is to use 'standard=32' as msp3400 module
      option.
      Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c998b8df
    • Jeff Dike's avatar
      UML: Fix UML build failure · e392c24a
      Jeff Dike authored
      don't know if the following is already queued, it fixes an ARCH=um build
      failure, evidence here:
      http://marc.theaimsgroup.com/?l=linux-kernel&m=115875912525137&w=2
      and following thread.
      Cc-ing uml maintainers and I hope I didn't follow too many
      Submitting-patches rules...
      
      The patch is taken from:
      http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.18/patches/no-syscallx
      
      Since the syscallx macros seem to be under threat, this patch stops
      using them, using syscall instead.
      Acked-by: default avatarJeff Dike <jdike@addtoit.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      e392c24a
    • Paolo 'Blaisorblade' Giarrusso's avatar
      uml: use DEFCONFIG_LIST to avoid reading host's config · bc019aa5
      Paolo 'Blaisorblade' Giarrusso authored
      This should make sure that, for UML, host's configuration files are not
      considered, which avoids various pains to the user. Our dependency are such that
      the obtained Kconfig will be valid and will lead to successful compilation -
      however they cannot prevent an user from disabling any boot device, and if an
      option is not set in the read .config (say /boot/config-XXX), with make
      menuconfig ARCH=um, it is not set. This always disables UBD and all console I/O
      channels, which leads to non-working UML kernels, so this bothers users -
      especially now, since it will happen on almost every machine
      (/boot/config-`uname -r` exists almost on every machine). It can be workarounded
      with make defconfig ARCH=um, but it is non-obvious and can be avoided, so please
      _do_ merge this patch.
      Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Acked-by: default avatarJeff Dike <jdike@addtoit.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bc019aa5
    • Paolo 'Blaisorblade' Giarrusso's avatar
      uml: allow using again x86/x86_64 crypto code · 394455f8
      Paolo 'Blaisorblade' Giarrusso authored
      Enable compilation of x86_64 crypto code;, and add the needed constant
      to make the code compile again (that macro was added to i386 asm-offsets
      between 2.6.17 and 2.6.18, in 6c2bb98b).
      Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Acked-by: default avatarJeff Dike <jdike@addtoit.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      394455f8
    • Patrick McHardy's avatar
      NET_SCHED: Fix fallout from dev->qdisc RCU change · 5f804c75
      Patrick McHardy authored
      The move of qdisc destruction to a rcu callback broke locking in the
      entire qdisc layer by invalidating previously valid assumptions about
      the context in which changes to the qdisc tree occur.
      
      The two assumptions were:
      
      - since changes only happen in process context, read_lock doesn't need
        bottem half protection. Now invalid since destruction of inner qdiscs,
        classifiers, actions and estimators happens in the RCU callback unless
        they're manually deleted, resulting in dead-locks when read_lock in
        process context is interrupted by write_lock_bh in bottem half context.
      
      - since changes only happen under the RTNL, no additional locking is
        necessary for data not used during packet processing (f.e. u32_list).
        Again, since destruction now happens in the RCU callback, this assumption
        is not valid anymore, causing races while using this data, which can
        result in corruption or use-after-free.
      
      Instead of "fixing" this by disabling bottem halfs everywhere and adding
      new locks/refcounting, this patch makes these assumptions valid again by
      moving destruction back to process context. Since only the dev->qdisc
      pointer is protected by RCU, but ->enqueue and the qdisc tree are still
      protected by dev->qdisc_lock, destruction of the tree can be performed
      immediately and only the final free needs to happen in the rcu callback
      to make sure dev_queue_xmit doesn't access already freed memory.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5f804c75
  2. 20 Sep, 2006 2 commits
  3. 19 Sep, 2006 14 commits
  4. 18 Sep, 2006 5 commits
    • Linus Torvalds's avatar
      x86: save/restore eflags in context switch · 47a5c6fa
      Linus Torvalds authored
      (And reset it on new thread creation)
      
      It turns out that eflags is important to save and restore not just
      because of iopl, but due to the magic bits like the NT bit, which we
      don't want leaking between different threads.
      Tested-by: default avatarMike Galbraith <efault@gmx.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      47a5c6fa
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 · 1d19f176
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
        [ATM] CLIP: Do not refer freed skbuff in clip_mkip().
        [NET]: Drop tx lock in dev_watchdog_up
        [PACKET]: Don't truncate non-linear skbs with mmaped IO
        [NET]: Mark frame diverter for future removal.
        [NETFILTER]: Add secmark headers to header-y
        [ATM]: linux-atm-general mailing list is subscribers only
        [ATM]: [he] when transmit fails, unmap the dma regions
        [TCP] tcp-lp: update information to MAINTAINERS
        [TCP] tcp-lp: bug fix for oops in 2.6.18-rc6
        [BRIDGE]: random extra bytes on STP TCN packet
        [IPV6]: Accept -1 for IPV6_TCLASS
        [IPV6]: Fix tclass setting for raw sockets.
        [IPVS]: remove the debug option go ip_vs_ftp
        [IPVS]: Make sure ip_vs_ftp ports are valid
        [IPVS]: auto-help for ip_vs_ftp
        [IPVS]: Document the ports option to ip_vs_ftp in kernel-parameters.txt
        [TCP]: Turn ABC off.
        [NEIGH]: neigh_table_clear() doesn't free stats
      1d19f176
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 · 20bf94e2
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
        [SPARC]: Fix regression in sys_getdomainname()
        [OPENPROMIO]: Handle current_node being NULL correctly.
      20bf94e2
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · 77e2782f
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm:
        [ARM] 3815/1: headers_install support for ARM
        [ARM] 3794/1: S3C24XX: do not defined set_irq_wake when no CONFIG_PM
        [ARM] 3793/1: S3C2412: fix wrong serial info struct
        [ARM] 3780/1: Fix iop321 cpuid
        [ARM] 3786/1: pnx4008: update defconfig
        [ARM] 3785/1: S3C2412: Fix idle code as default uses wrong clocks
        [ARM] 3784/1: S3C2413: fix config for MACH_S3C2413/MACH_SMDK2413
      77e2782f
    • Ralph Siemsen's avatar
      [ARM] 3815/1: headers_install support for ARM · e40b1074
      Ralph Siemsen authored
      Move kernel-only #includes into #ifdef __KERNEL__, so that
      headers_install target can be used on ARM.
      Signed-off-by: default avatarRalph Siemsen <ralphs@netwinder.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      e40b1074