1. 02 Jul, 2020 7 commits
    • Oleksandr Natalenko's avatar
    • Nicholas Kazlauskas's avatar
      drm/amd/display: Only revalidate bandwidth on medium and fast updates · 26302dc5
      Nicholas Kazlauskas authored
      Changes that are fast don't require updating DLG parameters making
      this call unnecessary. Considering this is an expensive call it should
      not be done on every flip.
      Guard the validation to only happen if update type isn't FAST.
      Signed-off-by: default avatarNicholas Kazlauskas <[email protected]>
    • Alexander Tsoy's avatar
      ALSA: usb-audio: Fix packet size calculation · a37de84f
      Alexander Tsoy authored
      Commit f0bd62b6 ("ALSA: usb-audio: Improve frames size computation")
      introduced a regression for devices which have playback endpoints with
      bInterval > 1. Fix this by taking ep->datainterval into account.
      Note that frame and fps are actually mean packet and packets per second
      in the code introduces by the mentioned commit. This will be fixed in a
      follow-up patch.
      Fixes: f0bd62b6 ("ALSA: usb-audio: Improve frames size computation")
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208353Signed-off-by: default avatarAlexander Tsoy <[email protected]>
    • Oleksandr Natalenko's avatar
      Merge branch 'fixes-5.7' into pf-5.7 · 5f82a63d
      Oleksandr Natalenko authored
    • Kuppuswamy Sathyanarayanan's avatar
      PCI/EDR: Log only ACPI_NOTIFY_DISCONNECT_RECOVER events · f37a1217
      Kuppuswamy Sathyanarayanan authored
      Previously we logged *all* ACPI SYSTEM-level events, which may include lots
      of non-EDR events.  Move the message so we only log those related to EDR.
      Link: https://lore.kernel.org/r/01afb4e01efbe455de0[email protected]linux.intel.com
      [bhelgaas: drop the pci_dbg() of all events since ACPI can log those
      Signed-off-by: default avatarKuppuswamy Sathyanarayanan <[email protected]>
      Signed-off-by: default avatarBjorn Helgaas <[email protected]>
    • Alexander A. Klimov's avatar
      Replace HTTP links with HTTPS ones: BFQ I/O scheduler · 2d0b4173
      Alexander A. Klimov authored
      Reduces attack surface on kernel devs opening the links for MITM
      as HTTPS traffic is much harder to manipulate.
      Deterministic algorithm:
      For each file:
        If not .svg:
          For each line:
            If doesn't contain `\bxmlns\b`:
              For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
                If both the HTTP and HTTPS versions
                return 200 OK and serve the same content:
                  Replace HTTP with HTTPS.
      Signed-off-by: default avatarAlexander A. Klimov <[email protected]>
    • Dmitriy Monakhov's avatar
      bfq: fix blkio cgroup leakage · c15db115
      Dmitriy Monakhov authored
      commit db37a34c ("block, bfq: get a ref to a group when adding it to a service tree")
      introduce leak forbfq_group and blkcg_gq objects because of get/put
      imbalance. See trace balow:
      -> blkg_alloc
         -> bfq_pq_alloc
           -> bfqg_get (+1)
          -> __bfq_activate_entity
               ->bfqg_and_blkg_get (+1)  <==== : Note1
        ->bfq_deactivate_entity+0x53/0xc0 [bfq]
          ->__bfq_deactivate_entity+0x1b8/0x210 [bfq]
            -> bfq_forget_entity(is_in_service = true)
      	 entity->on_st_or_in_serv = false   <=== :Note2
      	 if (is_in_service)
      	     return;  ==> do not touch reference
      -> blkcg_css_offline
       -> blkcg_destroy_blkgs
        -> blkg_destroy
         -> bfq_pd_offline
          -> __bfq_deactivate_entity
               if (!entity->on_st_or_in_serv) /* true, because (Note2)
      		return false;
       -> bfq_pd_free
          -> bfqg_put() (-1, byt bfqg->ref == 2) because of (Note2)
      So bfq_group and blkcg_gq  will leak forever, see test-case below.
      If fact bfq_group objects reference counting are quite different
      from bfq_queue. bfq_groups object are referenced by blkcg_gq via
      blkg_policy_data pointer, so  neither nor blkg_get() neither bfqg_get
      required here.
      This patch drop commit db37a34c ("block, bfq: get a ref to a group when adding it to a service tree")
      and add corresponding comment.
      #prep cgroup mounts
      mount -t tmpfs cgroup_root /sys/fs/cgroup
      mkdir /sys/fs/cgroup/blkio
      mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
      # Prepare blkdev
      grep blkio /proc/cgroups
      truncate -s 1M img
      losetup /dev/loop0 img
      echo bfq > /sys/block/loop0/queue/scheduler
      grep blkio /proc/cgroups
      for ((i=0;i<max_iters;i++))
          mkdir -p /sys/fs/cgroup/blkio/a
          echo 0 > /sys/fs/cgroup/blkio/a/cgroup.procs
          dd if=/dev/loop0 bs=4k count=1 of=/dev/null iflag=direct 2> /dev/null
          echo 0 > /sys/fs/cgroup/blkio/cgroup.procs
          rmdir /sys/fs/cgroup/blkio/a
          grep blkio /proc/cgroups
      Signed-off-by: Dmitriy Monakhov's avatarDmitry Monakhov <[email protected]>
  2. 30 Jun, 2020 33 commits