1. 29 Nov, 2006 2 commits
  2. 19 Nov, 2006 29 commits
  3. 04 Nov, 2006 9 commits
    • Chris Wright's avatar
      Linux 2.6.18.2 · b4d85466
      Chris Wright authored
      b4d85466
    • Alan Stern's avatar
      [PATCH] usbfs: private mutex for open, release, and remove · 108d51a5
      Alan Stern authored
      The usbfs code doesn't provide sufficient mutual exclusion among open,
      release, and remove.  Release vs. remove is okay because they both
      acquire the device lock, but open is not exclusive with either one.  All
      three routines modify the udev->filelist linked list, so they must not
      run concurrently.
      
      Apparently someone gave this a minimum amount of thought in the past by
      explicitly acquiring the BKL at the start of the usbdev_open routine.
      Oddly enough, there's a comment pointing out that locking is unnecessary
      because chrdev_open already has acquired the BKL.
      
      But this ignores the point that the files in /proc/bus/usb/* are not
      char device files; they are regular files and so they don't get any
      special locking.  Furthermore it's necessary to acquire the same lock in
      the release and remove routines, which the code does not do.
      
      Yet another problem arises because the same file_operations structure is
      accessible through both the /proc/bus/usb/* and /...
      108d51a5
    • NeilBrown's avatar
      [PATCH] md: check bio address after mapping through partitions. · 3b076a94
      NeilBrown authored
      
      Partitions are not limited to live within a device.  So
      we should range check after partition mapping.
      
      Note that 'maxsector' was being used for two different things.  I have
      split off the second usage into 'old_sector' so that maxsector can be
      still be used for it's primary usage later in the function.
      
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      3b076a94
    • James Morris's avatar
      [PATCH] IPV6: fix lockup via /proc/net/ip6_flowlabel [CVE-2006-5619] · d0239f35
      James Morris authored
      
      There's a bug in the seqfile handling for /proc/net/ip6_flowlabel, where,
      after finding a flowlabel, the code will loop forever not finding any
      further flowlabels, first traversing the rest of the hash bucket then just
      looping.
      
      This patch fixes the problem by breaking after the hash bucket has been
      traversed.
      
      Note that this bug can cause lockups and oopses, and is trivially invoked
      by an unpriveleged user.
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      d0239f35
    • Stephen Hemminger's avatar
      [PATCH] tcp: cubic scaling error · f3fcd7f6
      Stephen Hemminger authored
      Doug Leith observed a discrepancy between the version of CUBIC described
      in the papers and the version in 2.6.18. A math error related to scaling
      causes Cubic to grow too slowly.
      
      Patch is from "Sangtae Ha" <sha2@ncsu.edu>. I validated that
      it does fix the problems.
      
      See the following to show behavior over 500ms 100 Mbit link.
      
      Sender (2.6.19-rc3) ---  Bridge (2.6.18-rt7) ------- Receiver (2.6.19-rc3)
                          1G      [netem]           100M
      
      	http://developer.osdl.org/shemminger/tcp/2.6.19-rc3/cubic-orig.png
      	http://developer.osdl.org/shemminger/tcp/2.6.19-rc3/cubic-fix.png
      
      Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      f3fcd7f6
    • Alan Cox's avatar
      [PATCH] JMB 368 PATA detection · a5f1d1d1
      Alan Cox authored
      
      The Jmicron JMB368 is PATA only so has the PATA on function zero.  Don't
      therefore skip function zero on this device when probing
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      a5f1d1d1
    • Oleg Nesterov's avatar
      [PATCH] fill_tgid: fix task_struct leak and possible oops · e17f8851
      Oleg Nesterov authored
      
      1. fill_tgid() forgets to do put_task_struct(first).
      
      2. release_task(first) can happen after fill_tgid() drops tasklist_lock,
         it is unsafe to dereference first->signal.
      
      This is a temporary fix, imho the locking should be reworked.
      Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Jay Lan <jlan@sgi.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      e17f8851
    • Martin Bligh's avatar
      [PATCH] Use min of two prio settings in calculating distress for reclaim · 1406fd4e
      Martin Bligh authored
      
      If try_to_free_pages / balance_pgdat are called with a gfp_mask specifying
      GFP_IO and/or GFP_FS, they will reclaim the requisite number of pages, and the
      reset prev_priority to DEF_PRIORITY (or to some other high (ie: unurgent)
      value).
      
      However, another reclaimer without those gfp_mask flags set (say, GFP_NOIO)
      may still be struggling to reclaim pages.  The concurrent overwrite of
      zone->prev_priority will cause this GFP_NOIO thread to unexpectedly cease
      deactivating mapped pages, thus causing reclaim difficulties.
      
      Fix this is to key the distress calculation not off zone->prev_priority, but
      also take into account the local caller's priority by using
      min(zone->prev_priority, sc->priority)
      Signed-off-by: default avatarMartin J. Bligh <mbligh@google.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: Chris Wright <chrisw@s...
      1406fd4e
    • Martin Bligh's avatar
      [PATCH] vmscan: Fix temp_priority race · 252287f4
      Martin Bligh authored
      The temp_priority field in zone is racy, as we can walk through a reclaim
      path, and just before we copy it into prev_priority, it can be overwritten
      (say with DEF_PRIORITY) by another reclaimer.
      
      The same bug is contained in both try_to_free_pages and balance_pgdat, but
      it is fixed slightly differently.  In balance_pgdat, we keep a separate
      priority record per zone in a local array.  In try_to_free_pages there is
      no need to do this, as the priority level is the same for all zones that we
      reclaim from.
      
      Impact of this bug is that temp_priority is copied into prev_priority, and
      setting this artificially high causes reclaimers to set distress
      artificially low.  They then fail to reclaim mapped pages, when they are,
      in fact, under severe memory pressure (their priority may be as low as 0).
      This causes the OOM killer to fire incorrectly.
      
      From: Andrew Morton <akpm@osdl.org>
      
      __zone_reclaim() isn't modifying zone->prev_priority.  But zone->prev_priority
      is used in the deci...
      252287f4