1. 12 4月, 2011 14 次提交
    • J
      cifs: always do is_path_accessible check in cifs_mount · 70945643
      Jeff Layton 提交于
      Currently, we skip doing the is_path_accessible check in cifs_mount if
      there is no prefixpath. I have a report of at least one server however
      that allows a TREE_CONNECT to a share that has a DFS referral at its
      root. The reporter in this case was using a UNC that had no prefixpath,
      so the is_path_accessible check was not triggered and the box later hit
      a BUG() because we were chasing a DFS referral on the root dentry for
      the mount.
      
      This patch fixes this by removing the check for a zero-length
      prefixpath.  That should make the is_path_accessible check be done in
      this situation and should allow the client to chase the DFS referral at
      mount time instead.
      
      Cc: stable@kernel.org
      Reported-and-Tested-by: NYogesh Sharma <ysharma@cymer.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      70945643
    • S
      various endian fixes to cifs · 5443d130
      Steve French 提交于
      make modules C=2 M=fs/cifs CF=-D__CHECK_ENDIAN__
      
      Found for example:
      
       CHECK   fs/cifs/cifssmb.c
      fs/cifs/cifssmb.c:728:22: warning: incorrect type in assignment (different base types)
      fs/cifs/cifssmb.c:728:22:    expected unsigned short [unsigned] [usertype] Tid
      fs/cifs/cifssmb.c:728:22:    got restricted __le16 [usertype] <noident>
      fs/cifs/cifssmb.c:1883:45: warning: incorrect type in assignment (different base types)
      fs/cifs/cifssmb.c:1883:45:    expected long long [signed] [usertype] fl_start
      fs/cifs/cifssmb.c:1883:45:    got restricted __le64 [usertype] start
      fs/cifs/cifssmb.c:1884:54: warning: restricted __le64 degrades to integer
      fs/cifs/cifssmb.c:1885:58: warning: restricted __le64 degrades to integer
      fs/cifs/cifssmb.c:1886:43: warning: incorrect type in assignment (different base types)
      fs/cifs/cifssmb.c:1886:43:    expected unsigned int [unsigned] fl_pid
      fs/cifs/cifssmb.c:1886:43:    got restricted __le32 [usertype] pid
      
      In checking new smb2 code for missing endian conversions, I noticed
      some endian errors had crept in over the last few releases into the
      cifs code (symlink, ntlmssp, posix lock, and also a less problematic warning
      in fscache).  A followon patch will address a few smb2 endian
      problems.
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      5443d130
    • S
      Elminate sparse __CHECK_ENDIAN__ warnings on port conversion · 6da97910
      Steve French 提交于
      Ports are __be16 not unsigned short int
      
      Eliminates the remaining fixable endian warnings:
      
      ~/cifs-2.6$ make modules C=1 M=fs/cifs CF=-D__CHECK_ENDIAN__
        CHECK   fs/cifs/connect.c
      fs/cifs/connect.c:2408:23: warning: incorrect type in assignment (different base types)
      fs/cifs/connect.c:2408:23:    expected unsigned short *sport
      fs/cifs/connect.c:2408:23:    got restricted __be16 *<noident>
      fs/cifs/connect.c:2410:23: warning: incorrect type in assignment (different base types)
      fs/cifs/connect.c:2410:23:    expected unsigned short *sport
      fs/cifs/connect.c:2410:23:    got restricted __be16 *<noident>
      fs/cifs/connect.c:2416:24: warning: incorrect type in assignment (different base types)
      fs/cifs/connect.c:2416:24:    expected unsigned short [unsigned] [short] <noident>
      fs/cifs/connect.c:2416:24:    got restricted __be16 [usertype] <noident>
      fs/cifs/connect.c:2423:24: warning: incorrect type in assignment (different base types)
      fs/cifs/connect.c:2423:24:    expected unsigned short [unsigned] [short] <noident>
      fs/cifs/connect.c:2423:24:    got restricted __be16 [usertype] <noident>
      fs/cifs/connect.c:2326:23: warning: incorrect type in assignment (different base types)
      fs/cifs/connect.c:2326:23:    expected unsigned short [unsigned] sport
      fs/cifs/connect.c:2326:23:    got restricted __be16 [usertype] sin6_port
      fs/cifs/connect.c:2330:23: warning: incorrect type in assignment (different base types)
      fs/cifs/connect.c:2330:23:    expected unsigned short [unsigned] sport
      fs/cifs/connect.c:2330:23:    got restricted __be16 [usertype] sin_port
      fs/cifs/connect.c:2394:22: warning: restricted __be16 degrades to integer
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      6da97910
    • S
      Max share size is too small · 2e325d59
      Steve French 提交于
      Max share name was set to 64, and (at least for Windows)
      can be 80.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      2e325d59
    • S
      Allow user names longer than 32 bytes · 8727c8a8
      Steve French 提交于
      We artificially limited the user name to 32 bytes, but modern servers handle
      larger.  Set the maximum length to a reasonable 256, and make the user name
      string dynamically allocated rather than a fixed size in session structure.
      Also clean up old checkpatch warning.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      8727c8a8
    • J
      cifs: replace /proc/fs/cifs/Experimental with a module parm · bdf1b03e
      Jeff Layton 提交于
      This flag currently only affects whether we allow "zero-copy" writes
      with signing enabled. Typically we map pages in the pagecache directly
      into the write request. If signing is enabled however and the contents
      of the page change after the signature is calculated but before the
      write is sent then the signature will be wrong. Servers typically
      respond to this by closing down the socket.
      
      Still, this can provide a performance benefit so the "Experimental" flag
      was overloaded to allow this. That's really not a good place for this
      option however since it's not clear what that flag does.
      
      Move that flag instead to a new module parameter that better describes
      its purpose. That's also better since it can be set at module insertion
      time by configuring modprobe.d.
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      bdf1b03e
    • J
      cifs: check for private_data before trying to put it · 77970693
      Jeff Layton 提交于
      cifs_close doesn't check that the filp->private_data is non-NULL before
      trying to put it. That can cause an oops in certain error conditions
      that can occur on open or lookup before the private_data is set.
      Reported-by: NBen Greear <greearb@candelatech.com>
      CC: Stable <stable@kernel.org>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      77970693
    • L
      Linux 2.6.39-rc3 · a6360dd3
      Linus Torvalds 提交于
      a6360dd3
    • L
      Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs · 1e05ff02
      Linus Torvalds 提交于
      * 'for-linus' of git://oss.sgi.com/xfs/xfs:
        xfs: use proper interfaces for on-stack plugging
        xfs: fix xfs_debug warnings
        xfs: fix variable set but not used warnings
        xfs: convert log tail checking to a warning
        xfs: catch bad block numbers freeing extents.
        xfs: push the AIL from memory reclaim and periodic sync
        xfs: clean up code layout in xfs_trans_ail.c
        xfs: convert the xfsaild threads to a workqueue
        xfs: introduce background inode reclaim work
        xfs: convert ENOSPC inode flushing to use new syncd workqueue
        xfs: introduce a xfssyncd workqueue
        xfs: fix extent format buffer allocation size
        xfs: fix unreferenced var error in xfs_buf.c
      
      Also, applied patch from Tony Luck that fixes ia64:
        xfs_destroy_workqueues() should not be tagged with__exit
      in the branch before merging.
      1e05ff02
    • L
      xfs_destroy_workqueues() should not be tagged with__exit · 39411f81
      Luck, Tony 提交于
      ia64 throws away .exit sections for the built-in CONFIG case, so routines
      that are used in other circumstances should not be tagged as __exit.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      39411f81
    • L
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · a97b5202
      Linus Torvalds 提交于
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix data corruption regression by reverting commit 6de9843d
        ext4: Allow indirect-block file to grow the file size to max file size
        ext4: allow an active handle to be started when freezing
        ext4: sync the directory inode in ext4_sync_parent()
        ext4: init timer earlier to avoid a kernel panic in __save_error_info
        jbd2: fix potential memory leak on transaction commit
        ext4: fix a double free in ext4_register_li_request
        ext4: fix credits computing for indirect mapped files
        ext4: remove unnecessary [cm]time update of quota file
        jbd2: move bdget out of critical section
      a97b5202
    • L
      Merge branch 'for-2.6.39' of git://linux-nfs.org/~bfields/linux · 18770c7c
      Linus Torvalds 提交于
      * 'for-2.6.39' of git://linux-nfs.org/~bfields/linux:
        nfsd4: fix oops on lock failure
        nfsd: fix auth_domain reference leak on nlm operations
      18770c7c
    • L
      Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6 · 6b98cd5a
      Linus Torvalds 提交于
      * 'spi/merge' of git://git.secretlab.ca/git/linux-2.6:
        dt/fsldma: fix build warning caused by of_platform_device changes
        spi: Fix race condition in stop_queue()
        gpio/pch_gpio: Fix output value of pch_gpio_direction_output()
        gpio/ml_ioh_gpio: Fix output value of ioh_gpio_direction_output()
        gpio/pca953x: fix error handling path in probe() call
      6b98cd5a
    • L
      pci: fix PCI bus allocation alignment handling · b42282e5
      Linus Torvalds 提交于
      In commit 13583b16 ("PCI: refactor io size calculation code") Ram
      had a thinko in the refactorization of the code: the end result used the
      variable 'align' for the bus alignment, but the original code used
      'min_align'.
      
      Since then, another use of that 'align' variable got introduced by
      commit c8adf9a3 ("PCI: pre-allocate additional resources to devices
      only after successful allocation of essential resources.")
      
      Fix both of those uses to use 'min_align' as they should.
      
      Daniel Hellstrom <daniel@gaisler.com>
      Acked-by: NRam Pai <linuxram@us.ibm.com>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b42282e5
  2. 11 4月, 2011 9 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · c44eaf41
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
        net: Add support for SMSC LAN9530, LAN9730 and LAN89530
        mlx4_en: Restoring RX buffer pointer in case of failure
        mlx4: Sensing link type at device initialization
        ipv4: Fix "Set rt->rt_iif more sanely on output routes."
        MAINTAINERS: add entry for Xen network backend
        be2net: Fix suspend/resume operation
        be2net: Rename some struct members for clarity
        pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
        dsa/mv88e6131: add support for mv88e6085 switch
        ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)
        be2net: Fix a potential crash during shutdown.
        bna: Fix for handling firmware heartbeat failure
        can: mcp251x: Allow pass IRQ flags through platform data.
        smsc911x: fix mac_lock acquision before calling smsc911x_mac_read
        iwlwifi: accept EEPROM version 0x423 for iwl6000
        rt2x00: fix cancelling uninitialized work
        rtlwifi: Fix some warnings/bugs
        p54usb: IDs for two new devices
        wl12xx: fix potential buffer overflow in testmode nvs push
        zd1211rw: reset rx idle timer from tasklet
        ...
      c44eaf41
    • I
      dt/fsldma: fix build warning caused by of_platform_device changes · 8faa7cf8
      Ira W. Snyder 提交于
      Commit 00006124, "dt/powerpc:
      Eliminate users of of_platform_{,un}register_driver" forgot to convert
      the type of structure passed into platform_device_register() when it
      was converted from of_platform_device_register. Fix it.
      Signed-off-by: NIra W. Snyder <iws@ovro.caltech.edu>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      8faa7cf8
    • T
      ext4: fix data corruption regression by reverting commit 6de9843d · c8205636
      Theodore Ts'o 提交于
      Revert commit 6de9843d, since it
      caused a data corruption regression with BitTorrent downloads.  Thanks
      to Damien for discovering and bisecting to find the problem commit.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=32972Reported-by: NDamien Grassart <damien@grassart.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      c8205636
    • K
      ext4: Allow indirect-block file to grow the file size to max file size · f80da1e7
      Kazuya Mio 提交于
      We can create 4402345721856 byte file with indirect block mapping.
      However, if we grow an indirect-block file to the size with ftruncate(),
      we can see an ext4 warning. The following patch fixes this problem.
      
      How to reproduce:
      # dd if=/dev/zero of=/mnt/mp1/hoge bs=1 count=0 seek=4402345721856
      0+0 records in
      0+0 records out
      0 bytes (0 B) copied, 0.000221428 s, 0.0 kB/s
      # tail -n 1 /var/log/messages
      Nov 25 15:10:27 test kernel: EXT4-fs warning (device sda8): ext4_block_to_path:345: block 1074791436 > max in inode 12
      Signed-off-by: NKazuya Mio <k-mio@sx.jp.nec.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      f80da1e7
    • Y
      ext4: allow an active handle to be started when freezing · be4f27d3
      Yongqiang Yang 提交于
      ext4_journal_start_sb() should not prevent an active handle from being
      started due to s_frozen.  Otherwise, deadlock is easy to happen, below
      is a situation.
      
      ================================================
           freeze         |       truncate
      ================================================
                          |  ext4_ext_truncate()
          freeze_super()  |   starts a handle
          sets s_frozen   |
                          |  ext4_ext_truncate()
                          |  holds i_data_sem
        ext4_freeze()     |
        waits for updates |
                          |  ext4_free_blocks()
                          |  calls dquot_free_block()
                          |
                          |  dquot_free_blocks()
                          |  calls ext4_dirty_inode()
                          |
                          |  ext4_dirty_inode()
                          |  trys to start an active
                          |  handle
                          |
                          |  block due to s_frozen
      ================================================
      Signed-off-by: NYongqiang Yang <xiaoqiangnk@gmail.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Reported-by: NAmir Goldstein <amir73il@users.sf.net>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NAndreas Dilger <adilger@dilger.ca>
      be4f27d3
    • C
      ext4: sync the directory inode in ext4_sync_parent() · 0893ed45
      Curt Wohlgemuth 提交于
      ext4 has taken the stance that, in the absence of a journal,
      when an fsync/fdatasync of an inode is done, the parent
      directory should be sync'ed if this inode entry is new.
      ext4_sync_parent(), which implements this, does indeed sync
      the dirent pages for parent directories, but it does not
      sync the directory *inode*.  This patch fixes this.
      
      Also now return error status from ext4_sync_parent().
      
      I tested this using a power fail test, which panics a
      machine running a file server getting requests from a
      client.  Without this patch, on about every other test run,
      the server is missing many, many files that had been synced.
      With this patch, on > 6 runs, I see zero files being lost.
      
      Google-Bug-Id: 4179519
      Signed-off-by: NCurt Wohlgemuth <curtw@google.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      0893ed45
    • S
      net: Add support for SMSC LAN9530, LAN9730 and LAN89530 · 88edaa41
      Steve Glendinning 提交于
      This patch adds support for SMSC's LAN9530, LAN9730 and LAN89530 USB
      ethernet controllers to the existing smsc95xx driver by adding
      their new USB VID/PID pairs.
      Signed-off-by: NSteve Glendinning <steve.glendinning@smsc.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88edaa41
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · 4263a2f1
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
        ALSA: hda - Don't query connections for widgets have no connections
        ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
        ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
        ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable
        ALSA: HDA: Fix dock mic for Lenovo X220-tablet
        ASoC: format_register_str: Don't clip register values
        ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare
        ASoC: zylonite: set .codec_dai_name in initializer
      4263a2f1
    • J
      nfsd4: fix oops on lock failure · 23fcf2ec
      J. Bruce Fields 提交于
      Lock stateid's can have access_bmap 0 if they were only partially
      initialized (due to a failed lock request); handle that case in
      free_generic_stateid.
      
      ------------[ cut here ]------------
      kernel BUG at fs/nfsd/nfs4state.c:380!
      invalid opcode: 0000 [#1] SMP
      last sysfs file: /sys/kernel/mm/ksm/run
      Modules linked in: nfs fscache md4 nls_utf8 cifs ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat bridge stp llc nfsd lockd nfs_acl auth_rpcgss sunrpc ipv6 ppdev parport_pc parport pcnet32 mii pcspkr microcode i2c_piix4 BusLogic floppy [last unloaded: mperf]
      
      Pid: 1468, comm: nfsd Not tainted 2.6.38+ #120 VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform
      EIP: 0060:[<e24f180d>] EFLAGS: 00010297 CPU: 0
      EIP is at nfs4_access_to_omode+0x1c/0x29 [nfsd]
      EAX: ffffffff EBX: dd758120 ECX: 00000000 EDX: 00000004
      ESI: dd758120 EDI: ddfe657c EBP: dd54dde0 ESP: dd54dde0
       DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Process nfsd (pid: 1468, ti=dd54c000 task=ddc92580 task.ti=dd54c000)
      Stack:
       dd54ddf0 e24f19ca 00000000 ddfe6560 dd54de08 e24f1a5d dd758130 deee3a20
       ddfe6560 31270000 dd54df1c e24f52fd 0000000f dd758090 e2505dd0 0be304cf
       dbb51d68 0000000e ddfe657c ddcd8020 dd758130 dd758128 dd7580d8 dd54de68
      Call Trace:
       [<e24f19ca>] free_generic_stateid+0x1c/0x3e [nfsd]
       [<e24f1a5d>] release_lockowner+0x71/0x8a [nfsd]
       [<e24f52fd>] nfsd4_lock+0x617/0x66c [nfsd]
       [<e24e57b6>] ? nfsd_setuser+0x199/0x1bb [nfsd]
       [<e24e056c>] ? nfsd_setuser_and_check_port+0x65/0x81 [nfsd]
       [<c07a0052>] ? _cond_resched+0x8/0x1c
       [<c04ca61f>] ? slab_pre_alloc_hook.clone.33+0x23/0x27
       [<c04cac01>] ? kmem_cache_alloc+0x1a/0xd2
       [<c04835a0>] ? __call_rcu+0xd7/0xdd
       [<e24e0dfb>] ? fh_verify+0x401/0x452 [nfsd]
       [<e24f0b61>] ? nfsd4_encode_operation+0x52/0x117 [nfsd]
       [<e24ea0d7>] ? nfsd4_putfh+0x33/0x3b [nfsd]
       [<e24f4ce6>] ? nfsd4_delegreturn+0xd4/0xd4 [nfsd]
       [<e24ea2c9>] nfsd4_proc_compound+0x1ea/0x33e [nfsd]
       [<e24de6ee>] nfsd_dispatch+0xd1/0x1a5 [nfsd]
       [<e1d6e1c7>] svc_process_common+0x282/0x46f [sunrpc]
       [<e1d6e578>] svc_process+0xdc/0xfa [sunrpc]
       [<e24de0fa>] nfsd+0xd6/0x115 [nfsd]
       [<e24de024>] ? nfsd_shutdown+0x24/0x24 [nfsd]
       [<c0454322>] kthread+0x62/0x67
       [<c04542c0>] ? kthread_worker_fn+0x114/0x114
       [<c07a6ebe>] kernel_thread_helper+0x6/0x10
      Code: eb 05 b8 00 00 27 4f 8d 65 f4 5b 5e 5f 5d c3 83 e0 03 55 83 f8 02 89 e5 74 17 83 f8 03 74 05 48 75 09 eb 09 b8 02 00 00 00 eb 0b <0f> 0b 31 c0 eb 05 b8 01 00 00 00 5d c3 55 89 e5 57 56 89 d6 8d
      EIP: [<e24f180d>] nfs4_access_to_omode+0x1c/0x29 [nfsd] SS:ESP 0068:dd54dde0
      ---[ end trace 2b0bf6c6557cb284 ]---
      
      The trace route is:
      
       -> nfsd4_lock()
         -> if (lock->lk_is_new) {
           -> alloc_init_lock_stateid()
      
              3739: stp->st_access_bmap = 0;
      
         ->if (status && lock->lk_is_new && lock_sop)
           -> release_lockowner()
            -> free_generic_stateid()
             -> nfs4_access_bmap_to_omode()
                -> nfs4_access_to_omode()
      
              380: BUG();   *****
      
      This problem was introduced by 0997b173.
      Reported-by: NMi Jinlong <mijinlong@cn.fujitsu.com>
      Tested-by: NMi Jinlong <mijinlong@cn.fujitsu.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      23fcf2ec
  3. 10 4月, 2011 1 次提交
    • L
      Merge git://git.infradead.org/mtd-2.6 · 510ec7bc
      Linus Torvalds 提交于
      * git://git.infradead.org/mtd-2.6:
        mtd: atmel_nand: use CPU I/O when buffer is in vmalloc(ed) region
        mtd: atmel_nand: modify test case for using DMA operations
        mtd: atmel_nand: fix support for CPUs that do not support DMA access
        mtd: atmel_nand: trivial: change DMA usage information trace
        mtd: mtdswap: fix printk format warning
      510ec7bc
  4. 09 4月, 2011 4 次提交
  5. 08 4月, 2011 12 次提交