07 May, 2007

7 commits

  • Convert NFSv4 to the new lock interface. We don't define any callback for now,
    so we're not taking advantage of the asynchronous feature--that's less critical
    for the multi-threaded nfsd then it is for the single-threaded lockd. But this
    does allow a cluster filesystems to export cluster-coherent locking to NFS.

    Note that it's cluster filesystems that are the issue--of the filesystems that
    define lock methods (nfs, cifs, etc.), most are not exportable by nfsd.

    Signed-off-by: Marc Eshel
    Signed-off-by: J. Bruce Fields

    Marc Eshel
     
  • Lock managers need to be able to cancel pending lock requests. In the case
    where the exported filesystem manages its own locks, it's not sufficient just
    to call posix_unblock_lock(); we need to let the filesystem know what's
    happening too.

    We do this by adding a new fcntl lock command: FL_CANCELLK. Some day this
    might also be made available to userspace applications that could benefit from
    an asynchronous locking api.

    Signed-off-by: Marc Eshel
    Signed-off-by: "J. Bruce Fields"

    Marc Eshel
     
  • The nfsv4 protocol's lock operation, in the case of a conflict, returns
    information about the conflicting lock.

    It's unclear how clients can use this, so for now we're not going so far as to
    add a filesystem method that can return a conflicting lock, but we may as well
    return something in the local case when it's easy to.

    Signed-off-by: Marc Eshel
    Signed-off-by: "J. Bruce Fields"

    Marc Eshel
     
  • Factor out the code that switches between generic and filesystem-specific lock
    methods; eventually we want to call this from lock managers (lockd and nfsd)
    too; currently they only call the generic methods.

    This patch does that for all the setlk code.

    Signed-off-by: Marc Eshel
    Signed-off-by: "J. Bruce Fields"

    Marc Eshel
     
  • Factor out the code that switches between generic and filesystem-specific lock
    methods; eventually we want to call this from lock managers (lockd and nfsd)
    too; currently they only call the generic methods.

    This patch does that for test_lock.

    Note that this hasn't been necessary until recently, because the few
    filesystems that define ->lock() (nfs, cifs...) aren't exportable via NFS.
    However GFS (and, in the future, other cluster filesystems) need to implement
    their own locking to get cluster-coherent locking, and also want to be able to
    export locking to NFS (lockd and NFSv4).

    So we accomplish this by factoring out code such as this and exporting it for
    the use of lockd and nfsd.

    Signed-off-by: "J. Bruce Fields"

    J. Bruce Fields
     
  • posix_test_lock() and ->lock() do the same job but have gratuitously
    different interfaces. Modify posix_test_lock() so the two agree,
    simplifying some code in the process.

    Signed-off-by: Marc Eshel
    Signed-off-by: "J. Bruce Fields"

    Marc Eshel
     
  • The file_lock argument to ->lock is used to return the conflicting lock
    when found. There's no reason for the filesystem to return any private
    information with this conflicting lock, but nfsv4 is.

    Fix nfsv4 client, and modify locks.c to stop calling fl_release_private
    for it in this case.

    Signed-off-by: "J. Bruce Fields"
    Cc: "Trond Myklebust" "

    J. Bruce Fields
     

17 Apr, 2007

2 commits


16 Apr, 2007

2 commits


15 Apr, 2007

8 commits


14 Apr, 2007

10 commits

  • 3w-xxxx emulates a REQUEST_SENSE response by simply returning nothing.
    Unfortunately, it's assuming that the REQUEST_SENSE command is
    implemented with use_sg == 0, which is no longer the case. The oops
    occurs because it's clearing the scatterlist in request_buffer instead
    of the memory region.

    This is fixed by using tw_transfer_internal() to transfer correctly to
    the scatterlist.

    Acked-by: adam radford
    Signed-off-by: James Bottomley

    James Bottomley
     
  • DVB USB remotes do not support changing keycode maps but set
    input_dev->keycodesize and input_dev->keycodemax without setting
    input_dev->keycode. This causes kernel oops when user tries to
    look up (or change) current keymap.

    While the proper fix would be to make remotes handle keymap changes
    we'll just remove keycodemax and keycodesize initialization so
    EVIOCGKEYCODE and EVIOCSKEYCODE will simply return -EINVAL.

    http://bugzilla.kernel.org/show_bug.cgi?id=8312

    Signed-off-by: olaf.kirch@oracle.com
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Linus Torvalds

    Olaf Kirch
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Fix inline directive in pci_iommu.c
    [SPARC64]: Fix arg passing to compat_sys_ipc().
    [SPARC]: Fix section mismatch warnings in pci.c and pcic.c
    [SUNRPC]: Make sure on-stack cmsg buffer is properly aligned.
    [SPARC]: avoid CHILD_MAX and OPEN_MAX constants
    [SPARC64]: Fix SBUS IOMMU allocation code.

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [NETFILTER] arp_tables: Fix unaligned accesses.
    [IPV6] SNMP: Fix {In,Out}NoRoutes statistics.
    [IPSEC] XFRM_USER: kernel panic when large security contexts in ACQUIRE
    [VLAN]: Allow VLAN interface on top of bridge interface
    [PKTGEN]: Add try_to_freeze()
    [NETFILTER]: ipt_ULOG: use put_unaligned

    Linus Torvalds
     
  • There are two device string comparison loops in arp_packet_match().
    The first one goes byte-by-byte but the second one tries to be
    clever and cast the string to a long and compare by longs.

    The device name strings in the arp table entries are not guarenteed
    to be aligned enough to make this value, so just use byte-by-byte
    for both cases.

    Based upon a report by .

    Signed-off-by: David S. Miller

    David S. Miller
     
  • A packet which is being discarded because of no routes in the
    forwarding path should not be counted as OutNoRoutes but as
    InNoRoutes.
    Additionally, on this occasion, a packet whose destinaion is
    not valid should be counted as InAddrErrors separately.

    Based on patch from Mitsuru Chinen .

    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     
  • When sending a security context of 50+ characters in an ACQUIRE
    message, following kernel panic occurred.

    kernel BUG in xfrm_send_acquire at net/xfrm/xfrm_user.c:1781!
    cpu 0x3: Vector: 700 (Program Check) at [c0000000421bb2e0]
    pc: c00000000033b074: .xfrm_send_acquire+0x240/0x2c8
    lr: c00000000033b014: .xfrm_send_acquire+0x1e0/0x2c8
    sp: c0000000421bb560
    msr: 8000000000029032
    current = 0xc00000000fce8f00
    paca = 0xc000000000464b00
    pid = 2303, comm = ping
    kernel BUG in xfrm_send_acquire at net/xfrm/xfrm_user.c:1781!
    enter ? for help
    3:mon> t
    [c0000000421bb650] c00000000033538c .km_query+0x6c/0xec
    [c0000000421bb6f0] c000000000337374 .xfrm_state_find+0x7f4/0xb88
    [c0000000421bb7f0] c000000000332350 .xfrm_tmpl_resolve+0xc4/0x21c
    [c0000000421bb8d0] c0000000003326e8 .xfrm_lookup+0x1a0/0x5b0
    [c0000000421bba00] c0000000002e6ea0 .ip_route_output_flow+0x88/0xb4
    [c0000000421bbaa0] c0000000003106d8 .ip4_datagram_connect+0x218/0x374
    [c0000000421bbbd0] c00000000031bc00 .inet_dgram_connect+0xac/0xd4
    [c0000000421bbc60] c0000000002b11ac .sys_connect+0xd8/0x120
    [c0000000421bbd90] c0000000002d38d0 .compat_sys_socketcall+0xdc/0x214
    [c0000000421bbe30] c00000000000869c syscall_exit+0x0/0x40
    --- Exception: c00 (System Call) at 0000000007f0ca9c
    SP (fc0ef8f0) is in userspace

    We are using size of security context from xfrm_policy to determine
    how much space to alloc skb and then putting security context from
    xfrm_state into skb. Should have been using size of security context
    from xfrm_state to alloc skb. Following fix does that

    Signed-off-by: Joy Latten
    Acked-by: James Morris
    Signed-off-by: David S. Miller

    Joy Latten
     
  • When a VLAN interface is created on top of a bridge interface and
    netfilter is enabled to see the bridged packets, the packets can be
    corrupted when passing through the netfilter code. This is caused by the
    VLAN driver not setting the 'protocol' and 'nh' members of the sk_buff
    structure. In general, this is no problem as the VLAN interface is mostly
    connected to a physical ethernet interface which does not use the
    'protocol' and 'nh' members. For a bridge interface, however, these
    members do matter.

    Signed-off-by: Jerome Borsboom
    Signed-off-by: David S. Miller

    Jerome Borsboom
     
  • While building a test kernel for the new esp driver (against
    git-current), I hit this bug. Trivial fix, put the inline declaration
    in the right place. :)

    Signed-off-by: Tom "spot" Callaway
    Signed-off-by: David S. Miller

    Tom "spot" Callaway
     
  • Do not sign extend args using the sys32_ipc stub, that is
    buggy and unnecessary.

    Based upon an excellent report by Mikael Pettersson.

    Signed-off-by: David S. Miller

    David S. Miller
     

13 Apr, 2007

11 commits

  • * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
    RDMA/cxgb3: Add set_tcb_rpl_handler

    Linus Torvalds
     
  • * 'for_linus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc:
    [PPC] Fix compilation and linking errors of mpc86xads build.
    [PPC] Fix compilation and linking errors of mpc885ads build.
    [PPC] MPC8272 ADS compile fixed, defconfig refreshed.

    Linus Torvalds
     
  • num_physpages is not exported out in mm/nommu.c, so the ip_conntrack module
    link will fail.

    Signed-off-by: Bryan Wu
    Acked-By: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu, Bryan
     
  • Commit f50b6f8691cae2e0064c499dd3ef3f31142987f0 introduced a race in
    autofs4 between autofs_lookup_unhashed() and autofs_dentry_release().

    autofs_dentry_release() ends up clearing the ->dentry and ->inode members
    of autofs_info before removing it from the rehash list. The list is
    protected by the rehash lock in both functions, but since
    autofs_dentry_release() starts tearing the autofs_info struct down before
    removing it from the list, autofs_lookup_unhashed() can get a autofs_info
    with a NULL dentry.

    This patch moves the clearing of ->dentry and ->inode after the removal
    from the rehash list.

    Signed-off-by: Jeff Mahoney
    Acked-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch fixes a bug in function decrementing a key of stat data item.

    Offset of reiserfs keys are compared as signed values. To set key offset
    to maximal possible value maximal signed value has to be used.

    This bug is responsible for severe reiserfs filesystem corruption which
    shows itself as warning vs-13060. reiserfsck fixes this corruption by
    filesystem tree rebuilding.

    Signed-off-by: Vladimir Saveliev
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vladimir Saveliev
     
  • If 'num_pages' were ever 1 more than a multiple of 8 (32bit platforms)
    or of 16 (64 bit platforms). filemap_attr would be allocated one
    'unsigned long' shorter than required. We need a round-up in there.

    Signed-off-by: Neil Brown
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Brown
     
  • We must unregister from SCSI before we unmap device resources and unhook
    the IRQ handler. Otherwise, SCSI may send us more requests, and we won't
    be able to handle them.

    I see the following oops during every reboot of my HP DL360:

    ...
    Unmounting local filesystems...done.
    Rebooting... Completed flushing cache on controller 0
    BUG: unable to handle kernel paging request at virtual address f8808040
    printing eip:
    c02dc72b
    *pde = 02120067
    *pte = 00000000
    Oops: 0002 [#1]
    SMP
    Modules linked in:
    CPU: 1
    EIP: 0060:[] Not tainted VLI
    EFLAGS: 00010046 (2.6.21-rc6 #1)
    EIP is at SA5_submit_command+0xb/0x20
    eax: f8808000 ebx: f7a00000 ecx: f79f0000 edx: 37a00000
    esi: f79f0000 edi: 00000000 ebp: 00000000 esp: dd717a44
    ds: 007b es: 007b fs: 00d8 gs: 0000 ss: 0068
    Process khelper (pid: 1427, ti=dd716000 task=c2260a70 task.ti=dd716000)
    Stack: c02df2c0 f7a00000 f7a00000 00d41008 c02df691 00000000 00000010 00000002
    00000001 f79f0000 f7fff844 c1398420 00000000 00000000 00001000 230a3020
    69666564 5420656e 50434f49 465f544b 4853554c 44414552 0a312009 66656423
    Call Trace:
    [] start_io+0x80/0x120
    [] do_cciss_request+0x331/0x350
    [] mempool_alloc+0x2a/0xe0
    [] blk_alloc_request+0x61/0x80
    [] get_request+0x15e/0x1e0
    [] cache_alloc_refill+0xb0/0x1e0
    [] as_update_rq+0x2d/0x80
    [] as_add_request+0x68/0x90
    [] elv_insert+0x119/0x160
    [] __make_request+0xcb/0x320
    [] lock_timer_base+0x20/0x50
    [] del_timer+0x56/0x60
    [] blk_remove_plug+0x38/0x70
    [] __generic_unplug_device+0x25/0x30
    [] generic_unplug_device+0x15/0x30
    ...

    Signed-off-by: Bjorn Helgaas
    Acked-by: Mike Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • Update the GPIO docs to describe the idiom whereby open drain signals are
    emulated by toggling the GPIO direction.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Catch malformed kernel parameter usage of "param = value". Spaces are not
    supported, but don't cause a kernel fault on such usage, just report an
    error.

    Signed-off-by: Randy Dunlap
    Acked-by: Larry Finger
    Acked-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • The pktgen module prevents suspend-to-disk. Fix.

    Acked-by: "Michal Piotrowski"
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     
  • Use put_unaligned to fix warnings about unaligned accesses.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy