1. 24 Jan, 2008 4 commits
    • Mel Gorman's avatar
      slab: partially revert list3 changes · 9c09a95c
      Mel Gorman authored
      Partial revert the changes made by 04231b30
      
      
      to the kmem_list3 management. On a machine with a memoryless node, this
      BUG_ON was triggering
      
      	static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
      	{
      		struct list_head *entry;
      		struct slab *slabp;
      		struct kmem_list3 *l3;
      		void *obj;
      		int x;
      
      		l3 = cachep->nodelists[nodeid];
      		BUG_ON(!l3);
      Signed-off-by: default avatarMel Gorman <mel@csn.ul.ie>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Acked-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Nishanth Aravamudan <nacc@us.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9c09a95c
    • Larry Woodman's avatar
      fix hugepages leak due to pagetable page sharing · c5c99429
      Larry Woodman authored
      
      
      The shared page table code for hugetlb memory on x86 and x86_64
      is causing a leak.  When a user of hugepages exits using this code
      the system leaks some of the hugepages.
      
      -------------------------------------------------------
      Part of /proc/meminfo just before database startup:
      HugePages_Total:  5500
      HugePages_Free:   5500
      HugePages_Rsvd:      0
      Hugepagesize:     2048 kB
      
      Just before shutdown:
      HugePages_Total:  5500
      HugePages_Free:   4475
      HugePages_Rsvd:      0
      Hugepagesize:     2048 kB
      
      After shutdown:
      HugePages_Total:  5500
      HugePages_Free:   4988
      HugePages_Rsvd:
      0 Hugepagesize:     2048 kB
      ----------------------------------------------------------
      
      The problem occurs durring a fork, in copy_hugetlb_page_range().  It
      locates the dst_pte using huge_pte_alloc().  Since huge_pte_alloc() calls
      huge_pmd_share() it will share the pmd page if can, yet the main loop in
      copy_hugetlb_page_range() does a get_page() on every hugepage.  This is a
      violation of the shared hugepmd pagetable protocol and creates additional
      referenced to the hugepages causing a leak when the unmap of the VMA
      occurs.  We can skip the entire replication of the ptes when the hugepage
      pagetables are shared.  The attached patch skips copying the ptes and the
      get_page() calls if the hugetlbpage pagetable is shared.
      
      [akpm@linux-foundation.org: coding-style cleanups]
      Signed-off-by: default avatarLarry Woodman <lwoodman@redhat.com>
      Signed-off-by: default avatarAdam Litke <agl@us.ibm.com>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Cc: Ken Chen <kenchen@google.com>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c5c99429
    • Eric W. Biederman's avatar
      sysctl: kill binary sysctl KERN_PPC_L2CR · c2f3dabe
      Eric W. Biederman authored
      
      
      : Stefan Roese <sr@denx.de> said:
      > ppc: 4xx: sysctl table check failed: /kernel/l2cr .1.31 Missing strategy
      >
      > I'm seeing this error message when booting an recent arch/ppc kernel on
      > 4xx platforms (tested on Ocotea and other 4xx platforms). Booting NFS
      > rootfs still works fine, but this message kind of makes me "nervous".
      > This is not seen on 4xx arch/powerpc platforms. Here the bootlog:
      
      Because the data field was never filled and a binary sysctl handler was
      never written this sysctl has never been usable through the sys_sysctl
      interface.  So just remove the binary sysctl number.  Making the kernel
      sanity checks happy.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Reported-by: default avatarStefan Roese <sr@denx.de>
      Cc: Josh Boyer <jwboyer@gmail.com>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c2f3dabe
    • Arjan van de Ven's avatar
      lockdep: fix kernel crash on module unload · fabe874a
      Arjan van de Ven authored
      Michael Wu noticed in his lkml post at
      
          http://marc.info/?l=linux-kernel&m=119396182726091&w=2
      
      
      
      that certain wireless drivers ended up having their name in module
      memory, which would then crash the kernel on module unload.
      
      The patch he proposed was a bit clumsy in that it increased the size of
      a lockdep entry significantly; the patch below tries another approach,
      it checks, on module teardown, if the name of a class is in module space
      and then zaps the class.  This is very similar to what we already do
      with keys that are in module space.
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fabe874a
  2. 23 Jan, 2008 18 commits
  3. 22 Jan, 2008 12 commits
  4. 21 Jan, 2008 6 commits
    • Sam Ravnborg's avatar
      [SPARC64]: Fix section error in sparcspkr · 2ad913ba
      Sam Ravnborg authored
      
      
      With a sparc64 defconfig modified to set CONFIG_HOTPLUG=n
      the following error happened during link of vmlinux:
      
      local symbol 0: discarded in section `.devexit.text' from drivers/built-in.o
      local symbol 1: discarded in section `.devexit.text' from drivers/built-in.o
      
      (The error message above is from kbuild.git but it happens in mainline too)
      
      The error happens becase there is a reference from .text/.data to a
      function marked __devexit. With CONFIG_HOTPLUG=n all code marked
      __devexit are discarded and the linker complains.
      
      It was tracked down to sparcspkr.c which were missing __devexit_p()
      around the function pointers.
      
      Unfortunately modpost did not catch this since modpost do not warn
      about references from .data to .devexit from variables named *_driver.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ad913ba
    • Sam Ravnborg's avatar
      [SPARC64]: Fix of section mismatch warnings. · a1f35ba3
      Sam Ravnborg authored
      
      
      Fix following Section mismatch warning in sparc64:
      
      WARNING: arch/sparc64/kernel/built-in.o(.text+0x13dec): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'psycho_scan_bus' and 'psycho_pbm_init')
      WARNING: arch/sparc64/kernel/built-in.o(.text+0x14b58): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'sabre_scan_bus' and 'sabre_init')
      WARNING: arch/sparc64/kernel/built-in.o(.text+0x15ea4): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'schizo_scan_bus' and 'schizo_pbm_init')
      WARNING: arch/sparc64/kernel/built-in.o(.text+0x17780): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'pci_sun4v_scan_bus' and 'pci_sun4v_get_head')
      WARNING: arch/sparc64/kernel/built-in.o(.text+0x17d5c): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'pci_fire_scan_bus' and 'pci_fire_get_head')
      WARNING: arch/sparc64/kernel/built-in.o(.text+0x23860): Section mismatch: reference to .devinit.text:vio_dev_release (between 'vio_create_one' and 'vio_add')
      WARNING: arch/sparc64/kernel/built-in.o(.text+0x23868): Section mismatch: reference to .devinit.text:vio_dev_release (between 'vio_create_one' and 'vio_add')
      
      The pci_* were all missing __init annotations.
      For the vio.c case it was a function with a wrong annotation which was removed.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1f35ba3
    • Linus Nilsson's avatar
      Makefile: Change typoed 'behavour' to 'behaviour' · d384e35a
      Linus Nilsson authored
      
      
      Change two occurances of "behavour" to "behaviour".
      Signed-off-by: default avatarLinus Nilsson <lajnold@acc.umu.se>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d384e35a
    • Linus Torvalds's avatar
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · f290fc36
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        [ICMP]: ICMP_MIB_OUTMSGS increment duplicated
        [IPV6]: RFC 2011 compatibility broken
        [IPV6]: ICMP6_MIB_OUTMSGS increment duplicated
        [NET]: rtnl_link: fix use-after-free
        [AF_KEY]: Fix skb leak on pfkey_send_migrate() error
        [ATM] atm/suni.c: Fix section mismatch.
        [ATM] atm/idt77105.c: Fix section mismatch.
        [IrDA]: af_irda memory leak fixes
        [NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'
        [NETFILTER]: bridge-netfilter: fix net_device refcnt leaks
        [IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861.
        [IPV4] FIB_HASH : Avoid unecessary loop in fn_hash_dump_zone()
        [NET]: Fix interrupt semaphore corruption in Intel drivers.
        [IPV4] fib_trie: fix duplicated route issue
        [IPV4] fib_hash: fix duplicated route issue
        [IPV6]: Mischecked tw match in __inet6_check_established.
        rfkill: call rfkill_led_trigger_unregister() on error
      f290fc36
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus · 240d3b54
      Linus Torvalds authored
      * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
        tc35815: Use irq number for tc35815-mac platform device id
        [MIPS] Malta: Fix reading the PCI clock frequency on big-endian
        [MIPS] SMTC: Fix build error.
      240d3b54