04 Oct, 2018

1 commit

  • [ Upstream commit 5b7b15aee641904ae269be9846610a3950cbd64c ]

    We're encoding a single op in the reply but leaving the number of ops
    zero, so the reply makes no sense.

    Somewhat academic as this isn't a case any real client will hit, though
    in theory perhaps that could change in a future protocol extension.

    Reviewed-by: Jeff Layton
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    J. Bruce Fields
     

03 Aug, 2018

1 commit

  • [ Upstream commit 3171822fdcdd6e6d536047c425af6dc7a92dc585 ]

    When running a fuzz tester against a KASAN-enabled kernel, the following
    splat periodically occurs.

    The problem occurs when the test sends a GETDEVICEINFO request with a
    malformed xdr array (size but no data) for gdia_notify_types and the
    array size is > 0x3fffffff, which results in an overflow in the value of
    nbytes which is passed to read_buf().

    If the array size is 0x40000000, 0x80000000, or 0xc0000000, then after
    the overflow occurs, the value of nbytes 0, and when that happens the
    pointer returned by read_buf() points to the end of the xdr data (i.e.
    argp->end) when really it should be returning NULL.

    Fix this by returning NFS4ERR_BAD_XDR if the array size is > 1000 (this
    value is arbitrary, but it's the same threshold used by
    nfsd4_decode_bitmap()... in could really be any value >= 1 since it's
    expected to get at most a single bitmap in gdia_notify_types).

    [ 119.256854] ==================================================================
    [ 119.257611] BUG: KASAN: use-after-free in nfsd4_decode_getdeviceinfo+0x5a4/0x5b0 [nfsd]
    [ 119.258422] Read of size 4 at addr ffff880113ada000 by task nfsd/538

    [ 119.259146] CPU: 0 PID: 538 Comm: nfsd Not tainted 4.17.0+ #1
    [ 119.259662] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-1.fc25 04/01/2014
    [ 119.261202] Call Trace:
    [ 119.262265] dump_stack+0x71/0xab
    [ 119.263371] print_address_description+0x6a/0x270
    [ 119.264609] kasan_report+0x258/0x380
    [ 119.265854] ? nfsd4_decode_getdeviceinfo+0x5a4/0x5b0 [nfsd]
    [ 119.267291] nfsd4_decode_getdeviceinfo+0x5a4/0x5b0 [nfsd]
    [ 119.268549] ? nfs4svc_decode_compoundargs+0xa5b/0x13c0 [nfsd]
    [ 119.269873] ? nfsd4_decode_sequence+0x490/0x490 [nfsd]
    [ 119.271095] nfs4svc_decode_compoundargs+0xa5b/0x13c0 [nfsd]
    [ 119.272393] ? nfsd4_release_compoundargs+0x1b0/0x1b0 [nfsd]
    [ 119.273658] nfsd_dispatch+0x183/0x850 [nfsd]
    [ 119.274918] svc_process+0x161c/0x31a0 [sunrpc]
    [ 119.276172] ? svc_printk+0x190/0x190 [sunrpc]
    [ 119.277386] ? svc_xprt_release+0x451/0x680 [sunrpc]
    [ 119.278622] nfsd+0x2b9/0x430 [nfsd]
    [ 119.279771] ? nfsd_destroy+0x1c0/0x1c0 [nfsd]
    [ 119.281157] kthread+0x2db/0x390
    [ 119.282347] ? kthread_create_worker_on_cpu+0xc0/0xc0
    [ 119.283756] ret_from_fork+0x35/0x40

    [ 119.286041] Allocated by task 436:
    [ 119.287525] kasan_kmalloc+0xa0/0xd0
    [ 119.288685] kmem_cache_alloc+0xe9/0x1f0
    [ 119.289900] get_empty_filp+0x7b/0x410
    [ 119.291037] path_openat+0xca/0x4220
    [ 119.292242] do_filp_open+0x182/0x280
    [ 119.293411] do_sys_open+0x216/0x360
    [ 119.294555] do_syscall_64+0xa0/0x2f0
    [ 119.295721] entry_SYSCALL_64_after_hwframe+0x44/0xa9

    [ 119.298068] Freed by task 436:
    [ 119.299271] __kasan_slab_free+0x130/0x180
    [ 119.300557] kmem_cache_free+0x78/0x210
    [ 119.301823] rcu_process_callbacks+0x35b/0xbd0
    [ 119.303162] __do_softirq+0x192/0x5ea

    [ 119.305443] The buggy address belongs to the object at ffff880113ada000
    which belongs to the cache filp of size 256
    [ 119.308556] The buggy address is located 0 bytes inside of
    256-byte region [ffff880113ada000, ffff880113ada100)
    [ 119.311376] The buggy address belongs to the page:
    [ 119.312728] page:ffffea00044eb680 count:1 mapcount:0 mapping:0000000000000000 index:0xffff880113ada780
    [ 119.314428] flags: 0x17ffe000000100(slab)
    [ 119.315740] raw: 0017ffe000000100 0000000000000000 ffff880113ada780 00000001000c0001
    [ 119.317379] raw: ffffea0004553c60 ffffea00045c11e0 ffff88011b167e00 0000000000000000
    [ 119.319050] page dumped because: kasan: bad access detected

    [ 119.321652] Memory state around the buggy address:
    [ 119.322993] ffff880113ad9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 119.324515] ffff880113ad9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 119.326087] >ffff880113ada000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    [ 119.327547] ^
    [ 119.328730] ffff880113ada080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    [ 119.330218] ffff880113ada100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
    [ 119.331740] ==================================================================

    Signed-off-by: Scott Mayhew
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Scott Mayhew
     

03 Jul, 2018

1 commit

  • commit 9c2ece6ef67e9d376f32823086169b489c422ed0 upstream.

    nfsd4_readdir_rsize restricts rd_maxcount to svc_max_payload when
    estimating the size of the readdir reply, but nfsd_encode_readdir
    restricts it to INT_MAX when encoding the reply. This can result in log
    messages like "kernel: RPC request reserved 32896 but used 1049444".

    Restrict rd_dircount similarly (no reason it should be larger than
    svc_max_payload).

    Signed-off-by: Scott Mayhew
    Cc: stable@vger.kernel.org
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    Scott Mayhew
     

19 Apr, 2018

1 commit

  • commit 880a3a5325489a143269a8e172e7563ebf9897bc upstream.

    We're neglecting to clear the umask after it's set, which can cause a
    later unrelated rpc to (incorrectly) use the same umask if it happens to
    be processed by the same thread.

    There's a more subtle problem here too:

    An NFSv4 compound request is decoded all in one pass before any
    operations are executed.

    Currently we're setting current->fs->umask at the time we decode the
    compound. In theory a single compound could contain multiple creates
    each setting a umask. In that case we'd end up using whichever umask
    was passed in the *last* operation as the umask for all the creates,
    whether that was correct or not.

    So, we should just be saving the umask at decode time and waiting to set
    it until we actually process the corresponding operation.

    In practice it's unlikely any client would do multiple creates in a
    single compound. And even if it did they'd likely be from the same
    process (hence carry the same umask). So this is a little academic, but
    we should get it right anyway.

    Fixes: 47057abde515 (nfsd: add support for the umask attribute)
    Cc: stable@vger.kernel.org
    Reported-by: Lucash Stach
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    J. Bruce Fields
     

29 Mar, 2018

1 commit

  • commit 68ef3bc3166468678d5e1fdd216628c35bd1186f upstream.

    We had some reports of panics in nfsd4_lm_notify, and that showed a
    nfs4_lockowner that had outlived its so_client.

    Ensure that we walk any leftover lockowners after tearing down all of
    the stateids, and remove any blocked locks that they hold.

    With this change, we also don't need to walk the nbl_lru on nfsd_net
    shutdown, as that will happen naturally when we tear down the clients.

    Fixes: 76d348fadff5 (nfsd: have nfsd4_lock use blocking locks for v4.1+ locks)
    Reported-by: Frank Sorenson
    Signed-off-by: Jeff Layton
    Cc: stable@vger.kernel.org # 4.9
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    Jeff Layton
     

24 Mar, 2018

1 commit

  • [ Upstream commit 66282ec1cf004c09083c29cb5e49019037937bbd ]

    Clients must be able to read a file in order to execute it, and for pNFS
    that means the client needs to be able to perform a LAYOUTGET on the file.

    This behavior for executable-only files was added for OPEN in commit
    a043226bc140 "nfsd4: permit read opens of executable-only files".

    This fixes up xfstests generic/126 on block/scsi layouts.

    Signed-off-by: Benjamin Coddington
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Coddington
     

04 Feb, 2018

4 commits

  • [ Upstream commit 81833de1a46edce9ca20cfe079872ac1c20ef359 ]

    restart_grace() uses hardcoded init_net.
    It can cause to "list_add double add" in following scenario:

    1) nfsd and lockd was started in several net namespaces
    2) nfsd in init_net was stopped (lockd was not stopped because
    it have users from another net namespaces)
    3) lockd got signal, called restart_grace() -> set_grace_period()
    and enabled lock_manager in hardcoded init_net.
    4) nfsd in init_net is started again,
    its lockd_up() calls set_grace_period() and tries to add
    lock_manager into init_net 2nd time.

    Jeff Layton suggest:
    "Make it safe to call locks_start_grace multiple times on the same
    lock_manager. If it's already on the global grace_list, then don't try
    to add it again. (But we don't intentionally add twice, so for now we
    WARN about that case.)

    With this change, we also need to ensure that the nfsd4 lock manager
    initializes the list before we call locks_start_grace. While we're at
    it, move the rest of the nfsd_net initialization into
    nfs4_state_create_net. I see no reason to have it spread over two
    functions like it is today."

    Suggested patch was updated to generate warning in described situation.

    Suggested-by: Jeff Layton
    Signed-off-by: Vasily Averin
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Vasily Averin
     
  • [ Upstream commit ae254dac721d44c0bfebe2795df87459e2e88219 ]

    Prevent the use of the closed (invalid) special stateid by clients.

    Signed-off-by: Andrew Elble
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Andrew Elble
     
  • [ Upstream commit 9271d7e509c1bfc0b9a418caec29ec8d1ac38270 ]

    After taking the stateid st_mutex, we want to know that the stateid
    still represents valid state before performing any non-idempotent
    actions.

    Signed-off-by: Trond Myklebust
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Trond Myklebust
     
  • [ Upstream commit fb500a7cfee7f2f447d2bbf30cb59629feab6ac1 ]

    Signed-off-by: Trond Myklebust
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Trond Myklebust
     

31 Jan, 2018

1 commit

  • commit 1995266727fa8143897e89b55f5d3c79aa828420 upstream.

    Commit bdcf0a423ea1 ("kernel: make groups_sort calling a responsibility
    group_info allocators") appears to break nfsd rootsquash in a pretty
    major way.

    It adds a call to groups_sort() inside the loop that copies/squashes
    gids, which means the valid gids are sorted along with the following
    garbage. The net result is that the highest numbered valid gids are
    replaced with any lower-valued garbage gids, possibly including 0.

    We should sort only once, after filling in all the gids.

    Fixes: bdcf0a423ea1 ("kernel: make groups_sort calling a responsibility ...")
    Signed-off-by: Ben Hutchings
    Acked-by: J. Bruce Fields
    Signed-off-by: Linus Torvalds
    Cc: Wolfgang Walter
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     

20 Dec, 2017

1 commit

  • commit bdcf0a423ea1c40bbb40e7ee483b50fc8aa3d758 upstream.

    In testing, we found that nfsd threads may call set_groups in parallel
    for the same entry cached in auth.unix.gid, racing in the call of
    groups_sort, corrupting the groups for that entry and leading to
    permission denials for the client.

    This patch:
    - Make groups_sort globally visible.
    - Move the call to groups_sort to the modifiers of group_info
    - Remove the call to groups_sort from set_groups

    Link: http://lkml.kernel.org/r/20171211151420.18655-1-thiago.becker@gmail.com
    Signed-off-by: Thiago Rafael Becker
    Reviewed-by: Matthew Wilcox
    Reviewed-by: NeilBrown
    Acked-by: "J. Bruce Fields"
    Cc: Al Viro
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Thiago Rafael Becker
     

05 Dec, 2017

3 commits

  • commit 64ebe12494fd5d193f014ce38e1fd83cc57883c8 upstream.

    From kernel 4.9, my two nfsv4 servers sometimes suffer from
    "panic: unable to handle kernel page request"
    in posix_unblock_lock() called from nfs4_laundromat().

    These panics diseappear if we revert the commit "nfsd: add a LRU list
    for blocked locks".

    The cause appears to be a typo in nfs4_laundromat(), which is also
    present in nfs4_state_shutdown_net().

    Fixes: 7919d0a27f1e "nfsd: add a LRU list for blocked locks"
    Cc: jlayton@redhat.com
    Reveiwed-by: Jeff Layton
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    Naofumi Honda
     
  • commit d8a1a000555ecd1b824ac1ed6df8fe364dfbbbb0 upstream.

    If nfsd4_process_open2() is initialising a new stateid, and yet the
    call to nfs4_get_vfs_file() fails for some reason, then we must
    declare the stateid closed, and unhash it before dropping the mutex.

    Right now, we unhash the stateid after dropping the mutex, and without
    changing the stateid type, meaning that another OPEN could theoretically
    look it up and attempt to use it.

    Reported-by: Andrew W Elble
    Signed-off-by: Trond Myklebust
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    Trond Myklebust
     
  • commit 15ca08d3299682dc49bad73251677b2c5017ef08 upstream.

    Open file stateids can linger on the nfs4_file list of stateids even
    after they have been closed. In order to avoid reusing such a
    stateid, and confusing the client, we need to recheck the
    nfs4_stid's type after taking the mutex.
    Otherwise, we risk reusing an old stateid that was already closed,
    which will confuse clients that expect new stateids to conform to
    RFC7530 Sections 9.1.4.2 and 16.2.5 or RFC5661 Sections 8.2.2 and 18.2.4.

    Signed-off-by: Trond Myklebust
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    Trond Myklebust
     

30 Nov, 2017

1 commit

  • commit 95da1b3a5aded124dd1bda1e3cdb876184813140 upstream.

    If a delegation has been revoked by the server, operations using that
    delegation should error out with NFS4ERR_DELEG_REVOKED in the >4.1
    case, and NFS4ERR_BAD_STATEID otherwise.

    The server needs NFSv4.1 clients to explicitly free revoked delegations.
    If the server returns NFS4ERR_DELEG_REVOKED, the client will do that;
    otherwise it may just forget about the delegation and be unable to
    recover when it later sees SEQ4_STATUS_RECALLABLE_STATE_REVOKED set on a
    SEQUENCE reply. That can cause the Linux 4.1 client to loop in its
    stage manager.

    Signed-off-by: Andrew Elble
    Reviewed-by: Trond Myklebust
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    Andrew Elble
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

06 Oct, 2017

1 commit

  • Commit 34b1744c91cc ("nfsd4: define ->op_release for compound ops")
    defined a couple ->op_release functions and run them if necessary.

    But there's a problem with that is that it reused
    nfsd4_secinfo_release() as the op_release of OP_SECINFO_NO_NAME, and
    caused a leak on struct nfsd4_secinfo_no_name in
    nfsd4_encode_secinfo_no_name(), because there's no .si_exp field in
    struct nfsd4_secinfo_no_name.

    I found this because I was unable to umount an ext4 partition after
    exporting it via NFS & run fsstress on the nfs mount. A simplified
    reproducer would be:

    # mount a local-fs device at /mnt/test, and export it via NFS with
    # fsid=0 export option (this is required)
    mount /dev/sda5 /mnt/test
    echo "/mnt/test *(rw,no_root_squash,fsid=0)" >> /etc/exports
    service nfs restart

    # locally mount the nfs export with all default, note that I have
    # nfsv4.1 configured as the default nfs version, because of the
    # fsid export option, v4 mount would fail and fall back to v3
    mount localhost:/mnt/test /mnt/nfs

    # try to umount the underlying device, but got EBUSY
    umount /mnt/nfs
    service nfs stop
    umount /mnt/test
    Signed-off-by: J. Bruce Fields

    Eryu Guan
     

10 Sep, 2017

1 commit

  • Pull nfsd updates from Bruce Fields:
    "More RDMA work and some op-structure constification from Chuck Lever,
    and a small cleanup to our xdr encoding"

    * tag 'nfsd-4.14' of git://linux-nfs.org/~bfields/linux:
    svcrdma: Estimate Send Queue depth properly
    rdma core: Add rdma_rw_mr_payload()
    svcrdma: Limit RQ depth
    svcrdma: Populate tail iovec when receiving
    nfsd: Incoming xdr_bufs may have content in tail buffer
    svcrdma: Clean up svc_rdma_build_read_chunk()
    sunrpc: Const-ify struct sv_serv_ops
    nfsd: Const-ify NFSv4 encoding and decoding ops arrays
    sunrpc: Const-ify instances of struct svc_xprt_ops
    nfsd4: individual encoders no longer see error cases
    nfsd4: skip encoder in trivial error cases
    nfsd4: define ->op_release for compound ops
    nfsd4: opdesc will be useful outside nfs4proc.c
    nfsd4: move some nfsd4 op definitions to xdr4.h

    Linus Torvalds
     

06 Sep, 2017

2 commits

  • Since the beginning, svcsock has built a received RPC Call message
    by populating the xdr_buf's head, then placing the remaining
    message bytes in the xdr_buf's page list. The xdr_buf's tail is
    never populated.

    This means that an NFSv4 COMPOUND containing an NFS WRITE operation
    plus trailing operations has a page list that contains the WRITE
    data payload followed by the trailing operations. NFSv4 XDR decoders
    will not look in the xdr_buf's tail, ever, because svcsock never put
    anything there.

    To support transports that can pass the write payload in the
    xdr_buf's pagelist and trailing content in the xdr_buf's tail,
    introduce logic in READ_BUF that switches to the xdr_buf's tail vec
    when the decoder runs out of content in rq_arg.pages.

    Signed-off-by: Chuck Lever
    Signed-off-by: J. Bruce Fields

    Chuck Lever
     
  • J. Bruce Fields
     

01 Sep, 2017

1 commit


25 Aug, 2017

7 commits


02 Aug, 2017

1 commit


18 Jul, 2017

1 commit


14 Jul, 2017

1 commit

  • Pull nfsd updates from Bruce Fields:
    "Chuck's RDMA update overhauls the "call receive" side of the
    RPC-over-RDMA transport to use the new rdma_rw API.

    Christoph cleaned the way nfs operations are declared, removing a
    bunch of function-pointer casts and declaring the operation vectors as
    const.

    Christoph's changes touch both client and server, and both client and
    server pulls this time around should be based on the same commits from
    Christoph"

    * tag 'nfsd-4.13' of git://linux-nfs.org/~bfields/linux: (53 commits)
    svcrdma: fix an incorrect check on -E2BIG and -EINVAL
    nfsd4: factor ctime into change attribute
    svcrdma: Remove svc_rdma_chunk_ctxt::cc_dir field
    svcrdma: use offset_in_page() macro
    svcrdma: Clean up after converting svc_rdma_recvfrom to rdma_rw API
    svcrdma: Clean-up svc_rdma_unmap_dma
    svcrdma: Remove frmr cache
    svcrdma: Remove unused Read completion handlers
    svcrdma: Properly compute .len and .buflen for received RPC Calls
    svcrdma: Use generic RDMA R/W API in RPC Call path
    svcrdma: Add recvfrom helpers to svc_rdma_rw.c
    sunrpc: Allocate up to RPCSVC_MAXPAGES per svc_rqst
    svcrdma: Don't account for Receive queue "starvation"
    svcrdma: Improve Reply chunk sanity checking
    svcrdma: Improve Write chunk sanity checking
    svcrdma: Improve Read chunk sanity checking
    svcrdma: Remove svc_rdma_marshal.c
    svcrdma: Avoid Send Queue overflow
    svcrdma: Squelch disconnection messages
    sunrpc: Disable splice for krb5i
    ...

    Linus Torvalds
     

13 Jul, 2017

1 commit

  • Factoring ctime into the nfsv4 change attribute gives us better
    properties than just i_version alone.

    Eventually we'll likely also expose this (as opposed to raw i_version)
    to userspace, at which point we'll want to move it to a common helper,
    called from either userspace or individual filesystems. For now, nfsd
    is the only user.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

06 Jul, 2017

2 commits

  • Pull read/write updates from Al Viro:
    "Christoph's fs/read_write.c series - consolidation and cleanups"

    * 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    nfsd: remove nfsd_vfs_read
    nfsd: use vfs_iter_read/write
    fs: implement vfs_iter_write using do_iter_write
    fs: implement vfs_iter_read using do_iter_read
    fs: move more code into do_iter_read/do_iter_write
    fs: remove __do_readv_writev
    fs: remove do_compat_readv_writev
    fs: remove do_readv_writev

    Linus Torvalds
     
  • Pull misc user access cleanups from Al Viro:
    "The first pile is assorted getting rid of cargo-culted access_ok(),
    cargo-culted set_fs() and field-by-field copyouts.

    The same description applies to a lot of stuff in other branches -
    this is just the stuff that didn't fit into a more specific topical
    branch"

    * 'work.misc-set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    Switch flock copyin/copyout primitives to copy_{from,to}_user()
    fs/fcntl: return -ESRCH in f_setown when pid/pgid can't be found
    fs/fcntl: f_setown, avoid undefined behaviour
    fs/fcntl: f_setown, allow returning error
    lpfc debugfs: get rid of pointless access_ok()
    adb: get rid of pointless access_ok()
    isdn: get rid of pointless access_ok()
    compat statfs: switch to copy_to_user()
    fs/locks: don't mess with the address limit in compat_fcntl64
    nfsd_readlink(): switch to vfs_get_link()
    drbd: ->sendpage() never needed set_fs()
    fs/locks: pass kernel struct flock to fcntl_getlk/setlk
    fs: locks: Fix some troubles at kernel-doc comments

    Linus Torvalds
     

30 Jun, 2017

2 commits


29 Jun, 2017

1 commit


21 Jun, 2017

1 commit

  • Instead of explicitly calling scsi_req_init() after blk_get_request(),
    call that function from inside blk_get_request(). Add an
    .initialize_rq_fn() callback function to the block drivers that need
    it. Merge the IDE .init_rq_fn() function into .initialize_rq_fn()
    because it is too small to keep it as a separate function. Keep the
    scsi_req_init() call in ide_prep_sense() because it follows a
    blk_rq_init() call.

    References: commit 82ed4db499b8 ("block: split scsi_request out of struct request")
    Signed-off-by: Bart Van Assche
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Omar Sandoval
    Cc: Nicholas Bellinger
    Signed-off-by: Jens Axboe

    Bart Van Assche
     

13 Jun, 2017

1 commit