1. 27 11月, 2007 5 次提交
    • A
      SUNRPC: make sunrpc/xprtsock.c:xs_setup_{udp,tcp}() static · 483066d6
      Adrian Bunk 提交于
      xs_setup_{udp,tcp}() can now become static.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      483066d6
    • A
      NFS: fs/nfs/dir.c should #include "internal.h" · 4c30d56e
      Adrian Bunk 提交于
      Every file should include the headers containing the prototypes for its global
      functions (in this case nfs_access_cache_shrinker()).
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4c30d56e
    • A
      NFS: make nfs_wb_page_priority() static · 5334eb13
      Adrian Bunk 提交于
      nfs_wb_page_priority() can now become static.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5334eb13
    • R
      NFS: mount failure causes bad page state · f16c9603
      Russell King 提交于
      While testing a kernel based upon ecd744ee
      (with wrong boot arguments), I got the following bad page state entry while
      NFS was trying to mount it's rootfs:
      
      IP-Config: Complete:
            device=eth0, addr=192.168.1.101, mask=255.255.255.0, gw=255.255.255.255,
           host=192.168.1.101, domain=, nis-domain=(none),
           bootserver=192.168.1.100, rootserver=192.168.1.100, rootpath=
      Looking up port of RPC 100003/2 on 192.168.1.100
      rpcbind: server 192.168.1.100 not responding, timed out
      Root-NFS: Unable to get nfsd port number from server, using default
      Looking up port of RPC 100005/1 on 192.168.1.100
      rpcbind: server 192.168.1.100 not responding, timed out
      Root-NFS: Unable to get mountd port number from server, using default
      mount: server 192.168.1.100 not responding, timed out
      Root-NFS: Server returned error -5 while mounting /nfs/rootfs/
      VFS: Unable to mount root fs via NFS, trying floppy.
      Bad page state in process 'swapper'
      page:c02b1260 flags:0x00000400 mapping:00000000 mapcount:0 count:0
      Trying to fix it up, but a reboot is needed
      Backtrace:
      [<c0023e34>] (dump_stack+0x0/0x14) from [<c0062570>] (bad_page+0x70/0xac)
      [<c0062500>] (bad_page+0x0/0xac) from [<c0064914>] (free_hot_cold_page+0x80/0x178)
      [<c0064894>] (free_hot_cold_page+0x0/0x178) from [<c0064a74>] (free_hot_page+0x14/0x18)
      [<c0064a60>] (free_hot_page+0x0/0x18) from [<c0067078>] (put_page+0xf8/0x154)
      [<c0066f80>] (put_page+0x0/0x154) from [<c007dbc8>] (kfree+0xc8/0xd0)
      [<c007db00>] (kfree+0x0/0xd0) from [<c00cbb54>] (nfs_get_sb+0x230/0x710)
      [<c00cb924>] (nfs_get_sb+0x0/0x710) from [<c0084334>] (vfs_kern_mount+0x58/0xac)[<c00842dc>] (vfs_kern_mount+0x0/0xac) from [<c00843c0>] (do_kern_mount+0x38/0xf4)
      [<c0084388>] (do_kern_mount+0x0/0xf4) from [<c0099c7c>] (do_mount+0x1e8/0x614)
      ...
      
      This seems to be caused by use of an uninitialised structure due to NULL
      options being passed to nfs_validate_mount_data().  Ensure that the
      parsed mount data is always initialised.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
           (Trond: added fix for the same bug in nfs4_validate_mount_data()).
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f16c9603
    • J
      SUNRPC: remove NFS/RDMA client's binary sysctls · cfcb43ff
      James Lentini 提交于
      Support for binary sysctls is being deprecated in 2.6.24. Since there
      are no applications using the NFS/RDMA client's binary sysctls, it
      makes sense to remove them. The patch below does this while leaving
      the /proc/sys interface unchanged.
      
      Please consider this for 2.6.24.
      Signed-off-by: NJames Lentini <jlentini@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      cfcb43ff
  2. 18 11月, 2007 8 次提交
    • N
      kernel BUG at fs/nfs/namespace.c:108! - can be triggered by bad server · 4c1fe2f7
      Neil Brown 提交于
      
      Hi Trond,
      
      I have discovered that the BUG_ON in nfs_follow_mountpoint:
      
      	BUG_ON(IS_ROOT(dentry));
      
      can be triggered by a misbehaving server.
      
      What happens is the client does a lookup and discoveres that the named
      directory has a different fsid, so it initiates a mount.
      It then performs a GETATTR on the mounted directory and gets a
      different fsid again (due to a bug in the NFS server).
      This causes nfs_follow_mountpoint to be called on the newly mounted
      root, which triggers the BUG_ON.
      
      To duplicate this, have a directory which contains some mountpoints,
      and export that directory with the "crossmnt" flag using nfs-utils
      1.1.1 (or 1.1.0 I think)
      
      The GETATTR on the root of the mounted filesystem will return the
      information for the top exportpoint, while a lookup will return the
      correct information.  This difference causes the NFS client to BUG.
      
      I think the best way to fix this is to trap this possibility early, so
      just before completing the mount in the NFS client, check that it isn't
      going to use nfs_mountpoint_inode_operations.
      As long as i_op will never change once set (is that true?), this
      should be adequately safe.
      
      The following patch shows a possible approach, and it works for me.
      i.e. when the NFS server is misbehaving, I get ESTALE on those
      mountpoints, while when the NFS server is working correctly, I get
      correct behaviour on the client.
      
      NeilBrown
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4c1fe2f7
    • J
      sunrpc: rpc_pipe_poll may miss available data in some cases · eda4f9b7
      J. Bruce Fields 提交于
      Pipe messages start out life on a queue on the inode, but when first
      read they're moved to the filp's private pointer.  So it's possible for
      a poll here to return null even though there's a partially read message
      available.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      eda4f9b7
    • K
      sunrpc: return error if unsupported enctype or cksumtype is encountered · ef338bee
      Kevin Coffman 提交于
      Return an error from gss_import_sec_context_kerberos if the
      negotiated context contains encryption or checksum types not
      supported by the kernel code.
      
      This fixes an Oops because success was assumed and later code found
      no internal_ctx_id.
      Signed-off-by: NKevin Coffman <kwc@citi.umich.edu>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ef338bee
    • K
      sunrpc: gss_pipe_downcall(), don't assume all errors are transient · ffc40f56
      Kevin Coffman 提交于
      Instead of mapping all errors except EACCES to EAGAIN, map all errors
      except EAGAIN to EACCES.
      
      An example is user-land negotiating a Kerberos context with an encryption
      type that is not supported by the kernel code.  (This can happen due to
      mis-configuration or a bug in the Kerberos code that does not honor our
      request to limit the encryption types negotiated.)  This failure is not
      transient, and returning EAGAIN causes mount to continuously retry rather
      than giving up.
      Signed-off-by: NKevin Coffman <kwc@citi.umich.edu>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ffc40f56
    • T
      NFS: Fix the ustat() regression · b09b9417
      Trond Myklebust 提交于
      Since 2.6.18, the superblock sb->s_root has been a dummy dentry with a
      dummy inode. This breaks ustat(), which actually uses sb->s_root in a
      vfstat() call.
      
      Fix this by making the s_root a dummy alias to the directory inode that was
      used when creating the superblock.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      b09b9417
    • L
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 · 2ffbb837
      Linus Torvalds 提交于
      * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
        x86: simplify "make ARCH=x86" and fix kconfig all.config
        x86: reboot fixup for wrap2c board
        x86: check boundary in count setup resource
        x86: fix reboot with no keyboard attached
        x86: add hpet sanity checks
        x86: on x86_64, correct reading of PC RTC when update in progress in time_64.c
        x86: fix freeze in x86_64 RTC update code in time_64.c
        ntp: fix typo that makes sync_cmos_clock erratic
        Remove x86 merge artifact from top Makefile
        x86: fixup cpu_info array conversion
        x86: show cpuinfo only for online CPUs
        x86: fix cpu-hotplug regression
        x86: ignore the sys_getcpu() tcache parameter
        x86: voyager use correct header file name
        x86: fix smp init sections
        x86: fix voyager_cat_init section
        x86: fix bogus memcpy in es7000_check_dsdt()
      2ffbb837
    • S
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 6840999b
      Sam Ravnborg 提交于
      Simplify "make ARCH=x86" and fix kconfig so we again can set 64BIT in
      all.config.
      
      For a fix the diffstat is nice:
       6 files changed, 3 insertions(+), 36 deletions(-)
      
      The patch reverts these commits:
       - 0f855aa6 ("kconfig: add helper to set
         config symbol from environment variable")
       - 2a113281 ("kconfig: use $K64BIT to
         set 64BIT with all*config targets")
      
      Roman Zippel pointed out that kconfig supported string compares so
      the additional complexity introduced by the above two patches were
      not needed.
      
      With this patch we have following behaviour:
      
        # make {allno,allyes,allmod,rand}config [ARCH=...]
        option \ host arch      | 32bit         | 64bit
        =====================================================
        ./.                     | 32bit         | 64bit
        ARCH=x86                | 32bit         | 32bit
        ARCH=i386               | 32bit         | 32bit
        ARCH=x86_64             | 64bit         | 64bit
      
      The general rule are that ARCH= and native architecture takes
      precedence over the configuration.
      
      So make ARCH=i386 [whatever] will always build a 32-bit kernel
      no matter what the configuration says.  The configuration will
      be updated to 32-bit if it was configured to 64-bit and the
      other way around.
      
      This behaviour is consistent with previous behaviour so no
      suprises here.
      
      make ARCH=x86 will per default result in a 32-bit kernel but as
      the only ARCH= value x86 allow the user to select between 32-bit
      and 64-bit using menuconfig.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6840999b
    • S
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 80ef88d6
      Sam Ravnborg 提交于
      Simplify "make ARCH=x86" and fix kconfig so we again
      can set 64BIT in all.config.
      
      For a fix the diffstat is nice:
       6 files changed, 3 insertions(+), 36 deletions(-)
      
      The patch reverts these commits:
      0f855aa6
      -> kconfig: add helper to set config symbol from environment variable
      
      2a113281
      -> kconfig: use $K64BIT to set 64BIT with all*config targets
      
      Roman Zippel pointed out that kconfig supported string
      compares so the additional complexity introduced by the
      above two patches were not needed.
      
      With this patch we have following behaviour:
      
      # make {allno,allyes,allmod,rand}config [ARCH=...]
      option \ host arch      | 32bit         | 64bit
      =====================================================
      ./.                     | 32bit         | 64bit
      ARCH=x86                | 32bit         | 32bit
      ARCH=i386               | 32bit         | 32bit
      ARCH=x86_64             | 64bit         | 64bit
      
      The general rule are that ARCH= and native architecture
      takes precedence over the configuration.
      So make ARCH=i386 [whatever] will always build a 32-bit
      kernel no matter what the configuration says.
      The configuration will be updated to 32-bit if it was
      configured to 64-bit and the other way around.
      
      This behaviour is consistent with previous behaviour so
      no suprises here.
      
      make ARCH=x86 will per default result in a 32-bit kernel
      but as the only ARCH= value x86 allow the user to select
      between 32-bit and 64-bit using menuconfig. 
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      80ef88d6
  3. 17 11月, 2007 22 次提交
  4. 16 11月, 2007 5 次提交
    • L
      dirty page balancing: Get rid of broken unmapped_ratio logic · 8c086340
      Linus Torvalds 提交于
      This code harks back to the days when we didn't count dirty mapped
      pages, which led us to try to balance the number of dirty unmapped pages
      by how much unmapped memory there was in the system.
      
      That makes no sense any more, since now the dirty counts include the
      mapped pages.  Not to mention that the math doesn't work with HIGHMEM
      machines anyway, and causes the unmapped_ratio to potentially turn
      negative (which we do catch thanks to clamping it at a minimum value,
      but I mention that as an indication of how broken the code is).
      
      The code also was written at a time when the default dirty ratio was
      much larger, and the unmapped_ratio logic effectively capped that large
      dirty ratio a bit.  Again, we've since lowered the dirty ratio rather
      aggressively, further lessening the point of that code.
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8c086340
    • L
      Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 · adea27f4
      Linus Torvalds 提交于
      * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
        [NETFILTER]: Fix NULL pointer dereference in nf_nat_move_storage()
        [SUNHME]: VLAN support for sunhme
        [CHELSIO]: Fix skb->dev setting.
        [NETFILTER]: fix compat_nf_sockopt typo
        [INET]: Fix potential kfree on vmalloc-ed area of request_sock_queue
        [VIA_VELOCITY]: Don't oops on MTU change.
        iwl4965: fix not correctly dealing with hotunplug
        rt2x00: Fix chipset revision validation
        iwl3945: place CCK rates in front of OFDM for supported rates
        mac80211: Fix queuing of scan containing a SSID
      adea27f4
    • L
      Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus · 40787d00
      Linus Torvalds 提交于
      * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
        [MIPS] N32 needs to use the compat version of sys_nfsservctl.
        [MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts.
        [MIPS] Sibyte: Fix name of clocksource.
        [MIPS] SNI: s/achknowledge/acknowledge/
        [MIPS] Makefile: Fix canonical system names
        [MIPS] vpe: handle halting TCs in an errata safe way.
        [MIPS] Sibyte: Stop timers before programming next even.
        [MIPS] Sibyte: Increase minimum oneshot timer interval to two ticks.
        [MIPS] Lasat: Fix overlap of interrupt number ranges.
        [MIPS] SNI PCIT CPLUS: workaround for b0rked irq wiring of onboard PCI bus 1
        [MIPS] Fix shadow register support.
        [MIPS] Change get_cycles to always return 0.
        [MIPS] Fix typo in R3000 TRACE_IRQFLAGS code
        [MIPS] Sibyte: Replace use of removed IO_SPACE_BASE with IOADDR.
        [MIPS] iounmap if in vr41xx_pciu_init() pci clock is over 33MHz
        [MIPS] BCM1480: Remove duplicate acknowledge of timer interrupt.
        [MIPS] Sibyte: pin timer interrupt to their cores.
        [MIPS] Qemu: Add early printk, your friend in a cold night.
        [MIPS] Convert reference to mem_map to pfn_to_page().
        [MIPS] Sibyte: resurrect old cache hack.
      40787d00
    • E
      [NETFILTER]: Fix NULL pointer dereference in nf_nat_move_storage() · 77996525
      Evgeniy Polyakov 提交于
      Reported by Chuck Ebbert as:
      
      	https://bugzilla.redhat.com/show_bug.cgi?id=259501#c14
      
      This routine is called each time hash should be replaced, nf_conn has
      extension list which contains pointers to connection tracking users
      (like nat, which is right now the only such user), so when replace takes
      place it should copy own extensions. Loop above checks for own
      extension, but tries to move higer-layer one, which can lead to above
      oops.
      Signed-off-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      77996525
    • C
      [SUNHME]: VLAN support for sunhme · a5a97263
      Chris Poon 提交于
      This patch enables VLAN support on sunhme by increasing BMAC_TXMAX/BMAC_RXMAX
      and allocating extra space via skb_put for the VLAN header.
      Signed-off-by: NChris Poon <dev-null@telus.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a5a97263