1. 25 May, 2003 40 commits
    • Linus Torvalds's avatar
      Merge bk://kernel.bkbits.net/jgarzik/irda-2.5 · 01166d96
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      01166d96
    • Rusty Russell's avatar
      [irda] module refcounts in irlan · df3a5c9f
      Rusty Russell authored
      df3a5c9f
    • Jeff Garzik's avatar
      Merge redhat.com:/garz/repo/linus-2.5 · 4bcb7d97
      Jeff Garzik authored
      into redhat.com:/garz/repo/irda-2.5
      4bcb7d97
    • Benjamin Herrenschmidt's avatar
      [PATCH] drivers/ide/ppc/pmac.c compile fix · e71eb380
      Benjamin Herrenschmidt authored
      This patch fixes the build of drivers/ide/ppc/pmac.c.
      e71eb380
    • Paul Mackerras's avatar
      [PATCH] Fix mac adbhid driver · e575a62b
      Paul Mackerras authored
      e575a62b
    • Ben Collins's avatar
      [PATCH] Fix snd_seq_queue_find_name() · 9ebc87ac
      Ben Collins authored
      While going through sound/ for strncpy replacing, I came across this
      routine:
      
      /* return the (first) queue matching with the specified name */
      queue_t *snd_seq_queue_find_name(char *name)
      {
              int i;
              queue_t *q;
      
              for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
                      if ((q = queueptr(i)) != NULL) {
                              if (strncpy(q->name, name, sizeof(q->name)) == 0)
                                      return q;
                              queuefree(q);
                      }
              }
              return NULL;
      }
      
      
      I'm _really_ sure that they meant to use strncmp() here instead.
      
      Like this.
      9ebc87ac
    • Greg Ungerer's avatar
      [PATCH] return valid vma from get_user_pages for non-MMU systems · d0500d3e
      Greg Ungerer authored
      A couple of updates for the non-MMU memory managment code:
      
       - declare the overcommit variables
       - return a real vma pointer from get_user_pages (it is used by some code)
       - correct args to vmap()
      d0500d3e
    • Ben Collins's avatar
      [PATCH] do_mounts.c strlcpy · 2abfb785
      Ben Collins authored
      Use strlcpy in root_dev_setup()
      2abfb785
    • Ben Collins's avatar
      [PATCH] fs/* conversions for strlcpy · 03b9f57b
      Ben Collins authored
      I only converted the cases where it was obvious that the intent was to
      truncate on overflow. Lots of places for maxpath/readlink type stuff I
      left alone.
      03b9f57b
    • Ben Collins's avatar
      [PATCH] sound/* strncpy conversion · 9c07f108
      Ben Collins authored
      This does a lot of cleanup for strncpy->strlcpy, replaces some
      sprintf/snprintf's aswell.  There were only two places where things
      weren't straight forward.  All-in-all a good cleanup though.
      9c07f108
    • Ben Collins's avatar
      a25b982e
    • Linus Torvalds's avatar
      Do a strlcat() to go with the strlcpy(). · faad0c27
      Linus Torvalds authored
      faad0c27
    • Manfred Spraul's avatar
      [PATCH] credits update · dc2f9764
      Manfred Spraul authored
      dc2f9764
    • Sam Ravnborg's avatar
      [PATCH] kbuild: Get more focus on warnings · cea3390c
      Sam Ravnborg authored
      Make the default kernel build less verbose, to make warnings show up
      more clearly.
      cea3390c
    • Andries E. Brouwer's avatar
      [PATCH] namespace.c fix · 4e5405e5
      Andries E. Brouwer authored
      Yet another one in the namespace.c series.
      
      The code in graft_tree() used to be correct, but the code
      
              err = -ENOENT;
              down(&nd->dentry->d_inode->i_sem);
              if (IS_DEADDIR(nd->dentry->d_inode))
                      goto out_unlock;
      
              spin_lock(&dcache_lock);
              if (IS_ROOT(nd->dentry) || !d_unhashed(nd->dentry)) {
      		...
      	}
      	spin_unlock(&dcache_lock);
       out_unlock:
      
      was made incorrect in 2.5.29 when
      
              err = security_sb_check_sb(mnt, nd);
              if (err)
                      goto out_unlock;
      
      was inserted.  It has happened more often that people overlooked
      a preexisting setting of err.
      4e5405e5
    • Andrew Morton's avatar
      [PATCH] use update_mmu_cache() in install_page · cc3f8774
      Andrew Morton authored
      Tell the arch that install_page() has just added a page into the pagetables.
      cc3f8774
    • Andrew Morton's avatar
      [PATCH] tulip warning fix · 3ce6eb89
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      Silence a printk warning.
      3ce6eb89
    • Andrew Morton's avatar
      [PATCH] ACPI constant overflow fixes · 2de9a741
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      64-bit ACPI fixes
      2de9a741
    • Andrew Morton's avatar
      [PATCH] arch/i386/kernel/srat.c cast warning fix · 1c9b29ce
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      Fix "cast to pointer from integer of a different size".
      1c9b29ce
    • Andrew Morton's avatar
      [PATCH] Change mmu_gathers into per-cpu data · 4235488c
      Andrew Morton authored
      From: Martin Hicks <mort@wildopensource.com>
      
      Here is a patch that changes mmu_gathers into a per-cpu resource.  It
      includes the changes for all arches except ia64.  I've sent a separate patch
      to David Mosberger for ia64.
      4235488c
    • Andrew Morton's avatar
      [PATCH] two PNP memory leaks · 0e621015
      Andrew Morton authored
      From: Hollis Blanchard <hollis@austin.ibm.com>
      
      Fix two pnp error-path memory leaks, caught by Stanford memory leak checker
      circa 2.5.48.
      0e621015
    • Andrew Morton's avatar
      [PATCH] fix init/do_mounts_rd.c memory leak · 1f2d5f71
      Andrew Morton authored
      From: Hollis Blanchard <hollis@austin.ibm.com>
      
      Another potential memory leak the Stanford checker caught at 2.5.48: while
      closing and opening floppy disks, buf could be allocated and never freed.
      1f2d5f71
    • Andrew Morton's avatar
      [PATCH] fix drivers/net/ewrk.c memory leak · e03dd6bd
      Andrew Morton authored
      From: Hollis Blanchard <hollis@austin.ibm.com>
      
      Hi, this was caught by the Stanford memory leak checker a while ago
      (2.5.48). If the tmp_stats allocation fails, tmp is not being freed.
      e03dd6bd
    • Andrew Morton's avatar
      [PATCH] Better fix for ia32 subarch circular dependencies · fb8ce055
      Andrew Morton authored
      From: john stultz <johnstul@us.ibm.com>
      
      This is a rework of John's recent change which resolved a circular include
      dependency: a function in mach_apic.h requires hard_smp_processor_id() and
      hard_smp_processor_id() requires macros from mach_apic.h
      
      So this patch (against bk-current) reverts the previous, and fixes the same
      circular dependency in a much cleaner way, by moving a piece of the circular
      chain into its own .h file, rather then removing hard_smp_processor_id() and
      accessing the apic by hand.
      fb8ce055
    • Andrew Morton's avatar
      [PATCH] rd.c: separate queue per disk · cd388069
      Andrew Morton authored
      From: Maneesh Soni <maneesh@in.ibm.com>
      
      Provides a separate request queue for each ramdisk instance.  Without this,
      the kernel oopses when the block later tries to unregister the same set of
      kobject things multiple times.  This makes rd.c consistent with all other
      "disk" devices.
      cd388069
    • Andrew Morton's avatar
      [PATCH] Remove floating point use in cpia.c · 1e7c16a9
      Andrew Morton authored
      From: Duncan Haldane <f.duncan.m.haldane@worldnet.att.net>
      
      Gerd Knorr noticed a small use of floating point math in the cpia driver
      updates for 2.5.x I sent you a while ago, and this is not allowed in the
      kernel.
      
      This was in some code taken essentially verbatim from the Windows cpia
      driver released under the GPL by STM inc.  that had been incorporated in
      the later versions of the cpia drivera sourceforge.
      
      It turns out that the use of floating point was quite inessential, and I've
      reimplemented the couple of lines of code involved in integer arithmetic.
      1e7c16a9
    • Andrew Morton's avatar
      [PATCH] Documentation for disk iostats · 0af6874c
      Andrew Morton authored
      From: Rick Lindsley <ricklind@us.ibm.com>
      
      Here is a file to add to the Documentation/ directory which describes the
      disk statistics fields.
      0af6874c
    • Andrew Morton's avatar
      [PATCH] misc fixes · 4a81c9aa
      Andrew Morton authored
      - Add an explanation for clearing the focus bit on P4 (zwane)
      
      - __d_path kerneldoc fix (John Levon)
      
      - generic-hdlc documentation fix (Krzysztof Halasa <khc@pm.waw.pl>)
      
      - cmdline_read_proc cleanup (Oleg Drokin)
      
      - remove a couple of unused vars from drivers/ide/pci/hpt366.c
      
      - sound/core/sgbuf.c needs mm.h at least on alpha, for mem_map and other
        page stuff.  (Ivan Kokshaysky <ink@jurassic.park.msu.ru>)
      
      - Don't use "u32 long" in cs46xx.c (Kevin Puetz <puetzk@puetzk.org>)
      
      - fs/nfs/nfs4xdr.c warning fix: all the `goto out;' statements are
        commented away, so comment away the label too.
      
      - net/ipv6/af_inet6.c: remove unused var
      
      - drivers/media/video/bttv-cards.c: jiffies are unsigned long
      
      - drivers/media/video/saa7134/saa7134-cards.c: unused var
      
      - Fix Documentation/Changes comment wrt sparc compiler version
      
      - drivers/pnp/quirks.c needs slab.h for kfree().  (Daniele Bellucci
        <bellucda@tiscali.it>)
      4a81c9aa
    • Andrew Morton's avatar
      [PATCH] extend-check_valid_hugepage_range.patch · 76e5699d
      Andrew Morton authored
      From: David Gibson <david@gibson.dropbear.id.au>
      
      
      Renames check_valid_hugepage_range() to is_hugepage_only_range(), which makes
      more sense.
      76e5699d
    • Andrew Morton's avatar
      [PATCH] add notify_count for de_thread · 73accc3d
      Andrew Morton authored
      From: Manfred Spraul <manfred@colorfullife.com>
      
      de_thread is called by exec to kill all threads in the thread group except
      the threads required for exec.
      
      The waiting is implemented by waiting for a wakeup from __exit_signal: If
      the reference count is less or equal to 2, then the waiter is woken up.  If
      exec is called by a non-leader thread, then two threads are required for
      exec.
      
      But if a thread group leader calls exec, then only one thread is required
      for exec.  Thus the hardcoded "2" leads to a superfluous wakeup.  The patch
      fixes that by adding a "notify_count" field to the signal structure.
      73accc3d
    • Andrew Morton's avatar
      [PATCH] net/sunrpc/sunrpc_syms.c typo fix · 9ee208ea
      Andrew Morton authored
      From: Frank Cusack <fcusack@fcusack.com>
      
      net/sunrpc/sunrpc_syms.c typo fix
      9ee208ea
    • Andrew Morton's avatar
      [PATCH] overcommit root margin · cf50f395
      Andrew Morton authored
      From: Dave Hansen <haveblue@us.ibm.com>
      
      This patch makes vm_enough_memory(), more likely return failure when
      overcommit_memory==0 and !CAP_SYS_ADMIN.  I'm not sure it's worth having
      another tunable just for this.
      
      I also reworked the documentation a bit.  It should be a lot clearer to
      read now.
      cf50f395
    • Andrew Morton's avatar
      [PATCH] devpts xattr handler for security labels · 4a3fbc84
      Andrew Morton authored
      From: Stephen Smalley <sds@epoch.ncsc.mil>
      
      This patch against 2.5.69-bk adds an xattr handler for security labels
      to devpts and corresponding hooks to the LSM API to support conversion
      between xattr values and the security labels stored in the inode
      security field by the security module.
      
      This allows userspace to get and set the security labels on devpts
      nodes, e.g.  so that sshd can set the security label for the pty using
      setxattr, just as sshd already sets the ownership using chown.
      
      SELinux uses this support to protect the pty in accordance with the user
      process' security label.  The changes to the LSM API are general and
      should be re-useable by xattr handlers in other pseudo filesystems to
      support similar security labeling.  The xattr handler for devpts
      includes the same generic framework as in ext[23], so handlers for other
      kinds of attributes can be added easily in the future.
      4a3fbc84
    • Andrew Morton's avatar
      [PATCH] CONFIG_EPOLL · fb39f360
      Andrew Morton authored
      From: Christopher Hoover <ch@murgatroid.com>
      
      Here's a patch to drop some more text/data/bss out of 2.5.  This time
      the ``victim'' is eventpollfs (epoll).
      fb39f360
    • Andrew Morton's avatar
      [PATCH] CONFIG_FUTEX · e8c0de6e
      Andrew Morton authored
      From: Christopher Hoover <ch@murgatroid.com>
      
      Not everyone needs futex support, so it should be optional.  This is needed
      for small platforms.
      e8c0de6e
    • Andrew Morton's avatar
      [PATCH] /proc/pid inode security labels · 20378c29
      Andrew Morton authored
      From: Stephen Smalley <sds@epoch.ncsc.mil>
      
      This patch against 2.5.69-bk adds a hook to proc_pid_make_inode to allow
      security modules to set the security attributes on /proc/pid inodes based on
      the security attributes of the associated task.  This is required by SELinux
      in order to control access to the process state accessible via /proc/pid
      inodes in accordance with the task's security label.
      
      An alternative approach that was considered was to implement an xattr handler
      for /proc/pid inodes.  That approach would still require a hook call from the
      xattr handler to the security module to obtain an xattr value based on the
      task security attributes, so it would add a further level of
      indirection/translation.  The only benefit of implementing an xattr handler
      for the /proc/pid inodes would be that the /proc/pid inode security labels
      could then be exported to userspace.  However, the /proc/pid inode security
      labels are only used internally by the security module for access control
      purposes, and userspace access to the full range of process attributes is
      already provided via the /proc/pid/attr interface.  Consequently, a simple
      hook in proc_pid_make_inode seemed preferable.
      20378c29
    • Andrew Morton's avatar
      [PATCH] Process Attribute API for Security Modules (fixlet) · 09d35c2a
      Andrew Morton authored
      From: Stephen Smalley <sds@epoch.ncsc.mil>
      
      This patch, relative to the /proc/pid/attr patch against 2.5.69, fixes the
      mode values of the /proc/pid/attr nodes to avoid interference by the normal
      Linux access checks for these nodes (and also fixes the /proc/pid/attr/prev
      mode to reflect its read-only nature).
      
      Otherwise, when the dumpable flag is cleared by a set[ug]id or unreadable
      executable, a process will lose the ability to set its own attributes via
      writes to /proc/pid/attr due to a DAC failure (/proc/pid inodes are
      assigned the root uid/gid if the task is not dumpable, and the original
      mode only permitted the owner to write).
      
      The security module should implement appropriate permission checking in its
      [gs]etprocattr hook functions.  In the case of SELinux, the setprocattr
      hook function only allows a process to write to its own /proc/pid/attr
      nodes as well as imposing other policy-based restrictions, and the
      getprocattr hook function performs a permission check between the security
      labels of the current process and target process to determine whether the
      operation is permitted.
      09d35c2a
    • Andrew Morton's avatar
      [PATCH] Process Attribute API for Security Modules · ea7870c8
      Andrew Morton authored
      From: Stephen Smalley <sds@epoch.ncsc.mil>
      
      This updated patch against 2.5.69 merges the readdir and lookup routines
      for proc_base and proc_attr, fixes the copy_to_user call in proc_attr_read
      and proc_info_read, moves the new data and code within CONFIG_SECURITY, and
      uses ARRAY_SIZE, per the comments from Al Viro and Andrew Morton.  As
      before, this patch implements a process attribute API for security modules
      via a set of nodes in a /proc/pid/attr directory.  Credit for the idea of
      implementing this API via /proc/pid/attr nodes goes to Al Viro.  Jan Harkes
      provided a nice cleanup of the implementation to reduce the code bloat.
      ea7870c8
    • Andrew Morton's avatar
      [PATCH] mark shrinkable slabs as being reclaimable · 6f333c22
      Andrew Morton authored
      All slabs which can be reclaimed via VM presure are marked as being
      shrinkable, so the core slab code will keep count of their pages.
      
      Except for the one in XFS.  It has strange wrapper stuff.
      6f333c22
    • Andrew Morton's avatar
      [PATCH] slab: account for reclaimable caches · 8f542f30
      Andrew Morton authored
      We have a problem at present in vm_enough_memory(): it uses smoke-n-mirrors
      to try to work out how much memory can be reclaimed from dcache and icache.
      it sometimes gets it quite wrong, especially if the slab has internal
      fragmentation.  And it often does.
      
      So here we take a new approach.  Rather than trying to work out how many
      pages are reclaimable by counting up the number of inodes and dentries, we
      change the slab allocator to keep count of how many pages are currently used
      by slabs which can be shrunk by the VM.
      
      The creator of the slab marks the slab as being reclaimable at
      kmem_cache_create()-time.  Slab keeps a global counter of pages which are
      currently in use by thus-tagged slabs.
      
      Of course, we now slightly overestimate the amount of reclaimable memory,
      because not _all_ of the icache, dcache, mbcache and quota caches are
      reclaimable.
      
      But I think it's better to be a bit permissive rather than bogusly failing
      brk() calls as we do at present.
      8f542f30