Skip to content
  1. May 31, 2020
    • David Howells's avatar
      afs: Actively poll fileservers to maintain NAT or firewall openings · f6cbb368
      David Howells authored
      
      
      When an AFS client accesses a file, it receives a limited-duration callback
      promise that the server will notify it if another client changes a file.
      This callback duration can be a few hours in length.
      
      If a client mounts a volume and then an application prevents it from being
      unmounted, say by chdir'ing into it, but then does nothing for some time,
      the rxrpc_peer record will expire and rxrpc-level keepalive will cease.
      
      If there is NAT or a firewall between the client and the server, the route
      back for the server may close after a comparatively short duration, meaning
      that attempts by the server to notify the client may then bounce.
      
      The client, however, may (so far as it knows) still have a valid unexpired
      promise and will then rely on its cached data and will not see changes made
      on the server by a third party until it incidentally rechecks the status or
      the promise needs renewal.
      
      To deal with this, the client needs to regularly probe the server.  This
      has two effects: firstly, it keeps a route open back for the server, and
      secondly, it causes the server to disgorge any notifications that got
      queued up because they couldn't be sent.
      
      Fix this by adding a mechanism to emit regular probes.
      
      Two levels of probing are made available: Under normal circumstances the
      'slow' queue will be used for a fileserver - this just probes the preferred
      address once every 5 mins or so; however, if server fails to respond to any
      probes, the server will shift to the 'fast' queue from which all its
      interfaces will be probed every 30s.  When it finally responds, the record
      will switch back to the slow queue.
      
      Further notes:
      
       (1) Probing is now no longer driven from the fileserver rotation
           algorithm.
      
       (2) Probes are dispatched to all interfaces on a fileserver when that an
           afs_server object is set up to record it.
      
       (3) The afs_server object is removed from the probe queues when we start
           to probe it.  afs_is_probing_server() returns true if it's not listed
           - ie. it's undergoing probing.
      
       (4) The afs_server object is added back on to the probe queue when the
           final outstanding probe completes, but the probed_at time is set when
           we're about to launch a probe so that it's not dependent on the probe
           duration.
      
       (5) The timer and the work item added for this must be handed a count on
           net->servers_outstanding, which they hand on or release.  This makes
           sure that network namespace cleanup waits for them.
      
      Fixes: d2ddc776 ("afs: Overhaul volume and server record caching and fileserver rotation")
      Reported-by: default avatarDave Botsch <botsch@cnf.cornell.edu>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      f6cbb368
    • David Howells's avatar
      afs: Split the usage count on struct afs_server · 977e5f8e
      David Howells authored
      
      
      Split the usage count on the afs_server struct to have an active count that
      registers who's actually using it separately from the reference count on
      the object.
      
      This allows a future patch to dispatch polling probes without advancing the
      "unuse" time into the future each time we emit a probe, which would
      otherwise prevent unused server records from expiring.
      
      Included in this:
      
       (1) The latter part of afs_destroy_server() in which the RCU destruction
           of afs_server objects is invoked and the outstanding server count is
           decremented is split out into __afs_put_server().
      
       (2) afs_put_server() now calls __afs_put_server() rather then setting the
           management timer.
      
       (3) The calls begun by afs_fs_give_up_all_callbacks() and
           afs_fs_get_capabilities() can now take a ref on the server record, so
           afs_destroy_server() can just drop its ref and needn't wait for the
           completion of these calls.  They'll put the ref when they're done.
      
       (4) Because of (3), afs_fs_probe_done() no longer needs to wake up
           afs_destroy_server() with server->probe_outstanding.
      
       (5) afs_gc_servers can be simplified.  It only needs to check if
           server->active is 0 rather than playing games with the refcount.
      
       (6) afs_manage_servers() can propose a server for gc if usage == 0 rather
           than if ref == 1.  The gc is effected by (5).
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      977e5f8e
    • David Howells's avatar
      afs: Use the serverUnique field in the UVLDB record to reduce rpc ops · 81006805
      David Howells authored
      
      
      The U-version VLDB volume record retrieved by the VL.GetEntryByNameU rpc op
      carries a change counter (the serverUnique field) for each fileserver
      listed in the record as backing that volume.  This is incremented whenever
      the registration details for a fileserver change (such as its address
      list).  Note that the same value will be seen in all UVLDB records that
      refer to that fileserver.
      
      This should be checked before calling the VL server to re-query the address
      list for a fileserver.  If it's the same, there's no point doing the query.
      
      Reported-by: default avatarJeffrey Altman <jaltman@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      81006805
    • David Howells's avatar
      afs: Always include dir in bulk status fetch from afs_do_lookup() · 13fcc635
      David Howells authored
      
      
      When a lookup is done in an AFS directory, the filesystem will speculate
      and fetch up to 49 other statuses for files in the same directory and fetch
      those as well, turning them into inodes or updating inodes that already
      exist.
      
      However, occasionally, a callback break might go missing due to NAT timing
      out, but the afs filesystem doesn't then realise that the directory is not
      up to date.
      
      Alleviate this by using one of the status slots to check the directory in
      which the lookup is being done.
      
      Reported-by: default avatarDave Botsch <botsch@cnf.cornell.edu>
      Suggested-by: default avatarJeffrey Altman <jaltman@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      13fcc635
    • David Howells's avatar
      rxrpc: Adjust /proc/net/rxrpc/calls to display call->debug_id not user_ID · 32f71aa4
      David Howells authored
      
      
      The user ID value isn't actually much use - and leaks a kernel pointer or a
      userspace value - so replace it with the call debug ID, which appears in trace
      points.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      32f71aa4
    • David Howells's avatar
      rxrpc: Map the EACCES error produced by some ICMP6 to EHOSTUNREACH · 23e2db31
      David Howells authored
      
      
      Map the EACCES error that is produced by some ICMP6 packets to EHOSTUNREACH
      when we get them as EACCES has other meanings within a filesystem context.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      23e2db31
    • David Howells's avatar
      vfs, afs, ext4: Make the inode hash table RCU searchable · 3f19b2ab
      David Howells authored
      
      
      Make the inode hash table RCU searchable so that searches that want to
      access or modify an inode without taking a ref on that inode can do so
      without taking the inode hash table lock.
      
      The main thing this requires is some RCU annotation on the list
      manipulation operations.  Inodes are already freed by RCU in most cases.
      
      Users of this interface must take care as the inode may be still under
      construction or may be being torn down around them.
      
      There are at least three instances where this can be of use:
      
       (1) Testing whether the inode number iunique() is going to return is
           currently unique (the iunique_lock is still held).
      
       (2) Ext4 date stamp updating.
      
       (3) AFS callback breaking.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      cc: linux-ext4@vger.kernel.org
      cc: linux-afs@lists.infradead.org
      3f19b2ab
  2. May 25, 2020
    • Linus Torvalds's avatar
      Linux 5.7-rc7 · 9cb1fd0e
      Linus Torvalds authored
      9cb1fd0e
    • Linus Torvalds's avatar
      Merge tag 'efi-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 98790bba
      Linus Torvalds authored
      Pull EFI fixes from Thomas Gleixner:
       "A set of EFI fixes:
      
         - Don't return a garbage screen info when EFI framebuffer is not
           available
      
         - Make the early EFI console work properly with wider fonts instead
           of drawing garbage
      
         - Prevent a memory buffer leak in allocate_e820()
      
         - Print the firmware error record properly so it can be decoded by
           users
      
         - Fix a symbol clash in the host tool build which only happens with
           newer compilers.
      
         - Add a missing check for the event log version of TPM which caused
           boot failures on several Dell systems due to an attempt to decode
           SHA-1 format with the crypto agile algorithm"
      
      * tag 'efi-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tpm: check event log version before reading final events
        efi: Pull up arch-specific prototype efi_systab_show_arch()
        x86/boot: Mark global variables as static
        efi: cper: Add support for printing Firmware Error Record Reference
        efi/libstub/x86: Avoid EFI map buffer alloc in allocate_e820()
        efi/earlycon: Fix early printk for wider fonts
        efi/libstub: Avoid returning uninitialized data from setup_graphics()
      98790bba
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 667b6249
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Two fixes for x86:
      
         - Unbreak stack dumps for inactive tasks by interpreting the special
           first frame left by __switch_to_asm() correctly.
      
           The recent change not to skip the first frame so ORC and frame
           unwinder behave in the same way caused all entries to be
           unreliable, i.e. prepended with '?'.
      
         - Use cpumask_available() instead of an implicit NULL check of a
           cpumask_var_t in mmio trace to prevent a Clang build warning"
      
      * tag 'x86-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/unwind/orc: Fix unwind_get_return_address_ptr() for inactive tasks
        x86/mmiotrace: Use cpumask_available() for cpumask_var_t variables
      667b6249
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9e61d12b
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "A set of fixes for the scheduler:
      
         - Fix handling of throttled parents in enqueue_task_fair() completely.
      
           The recent fix overlooked a corner case where the first iteration
           terminates due to an entity already being on the runqueue which
           makes the list management incomplete and later triggers the
           assertion which checks for completeness.
      
         - Fix a similar problem in unthrottle_cfs_rq().
      
         - Show the correct uclamp values in procfs which prints the effective
           value twice instead of requested and effective"
      
      * tag 'sched-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Fix unthrottle_cfs_rq() for leaf_cfs_rq list
        sched/debug: Fix requested task uclamp values shown in procfs
        sched/fair: Fix enqueue_task_fair() warning some more
      9e61d12b
  3. May 24, 2020
  4. May 23, 2020
    • Greg Kroah-Hartman's avatar
      Revert "kobject: Make sure the parent does not get released before its children" · e6764aa0
      Greg Kroah-Hartman authored
      
      
      This reverts commit 4ef12f71.
      
      Guenter reports:
      
      	All my arm64be (arm64 big endian) boot tests crash with this
      	patch applied. Reverting it fixes the problem. Crash log and
      	bisect results (from pending-fixes branch) below.
      
      And also:
      	arm64 images don't crash but report lots of "poison overwritten"
      	backtraces like the one below. On arm, I see "refcount_t:
      	underflow", also attached.  I didn't bisect those, but given the
      	context I would suspect the same culprit.
      
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Link: https://lore.kernel.org/r/20200513151840.36400-1-heikki.krogerus@linux.intel.com
      
      
      Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
      Cc: kernel test robot <rong.a.chen@intel.com>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Brendan Higgins <brendanhiggins@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e6764aa0
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · e644645a
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Three minor fixes, two in drivers, one to fix a hang after reset with
        iSCSI, and one to avoid a spurious log message; and the final core one
        to correct a suspend/resume miscount with quiesced devices"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: target: Put lun_ref at end of tmr processing
        scsi: pm: Balance pm_only counter of request queue during system resume
        scsi: qla2xxx: Do not log message when reading port speed via sysfs
      e644645a
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-05-23' of git://anongit.freedesktop.org/drm/drm · a24deb9d
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Things seemed to have quieten down, though no i915 pull (I even gave
        them an extra 12 hours in case they were late).
      
        The amdgpu floating point fix is probably the largest, but it just
        moves some code around to it doesn't do fpu stuff outside the fpu
        boundaries. Otherwise it's just a couple of vmwgfx fixes (maintainer
        change) and two etnaviv fixes.
      
        vmwgfx:
         - change maintainers
         - fix redundant assignment
         - fix parameter name
         - fix return value
      
        etnaviv:
         - memory leak fix when userspace passes a invalid softpin address
         - off-by-one crashing the kernel in the perfmon domain iteration when
           the GPU core has both 2D and 3D capabilities
      
        amdgpu:
         - DP fix
         - Floating point fix
         - Fix cursor stutter issue"
      
      * tag 'drm-fixes-2020-05-23' of git://anongit.freedesktop.org/drm/drm:
        drm/amd/display: Defer cursor lock until after VUPDATE
        drm/amd/display: Remove dml_common_def file
        drm/amd/display: DP training to set properly SCRAMBLING_DISABLE
        drm/edid: Add Oculus Rift S to non-desktop list
        drm/etnaviv: Fix a leak in submit_pin_objects()
        drm/etnaviv: fix perfmon domain interation
        drm/vmwgfx: Return true in function vmw_fence_obj_signaled()
        drm/vmwgfx: remove redundant assignment to variable ret
        drm/vmwgfx: Fix parameter name in vmw_bo_init
        drm/vmwgfx: update MAINTAINERS entry
      a24deb9d