1. 12 Sep, 2020 3 commits
    • Paul Moore's avatar
      netlabel: fix problems with mapping removal · a3a5cb67
      Paul Moore authored
      [ Upstream commit d3b990b7 ]
      
      This patch fixes two main problems seen when removing NetLabel
      mappings: memory leaks and potentially extra audit noise.
      
      The memory leaks are caused by not properly free'ing the mapping's
      address selector struct when free'ing the entire entry as well as
      not properly cleaning up a temporary mapping entry when adding new
      address selectors to an existing entry.  This patch fixes both these
      problems such that kmemleak reports no NetLabel associated leaks
      after running the SELinux test suite.
      
      The potentially extra audit noise was caused by the auditing code in
      netlbl_domhsh_remove_entry() being called regardless of the entry's
      validity.  If another thread had already marked the entry as invalid,
      but not removed/free'd it from the list of mappings, then it was
      possible that an additional mapping removal audit record would be
      generated.  This patch fixes this by returning early from the removal
      function when the entry was previously marked invalid.  This change
      also had the side benefit of improving the code by decreasing the
      indentation level of large chunk of code by one (accounting for most
      of the diffstat).
      
      Fixes: 63c41688 ("netlabel: Add network address selectors to the NetLabel/LSM domain mapping")
      Reported-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a3a5cb67
    • Jens Axboe's avatar
      block: ensure bdi->io_pages is always initialized · 732fd460
      Jens Axboe authored
      [ Upstream commit de1b0ee4 ]
      
      If a driver leaves the limit settings as the defaults, then we don't
      initialize bdi->io_pages. This means that file systems may need to
      work around bdi->io_pages == 0, which is somewhat messy.
      
      Initialize the default value just like we do for ->ra_pages.
      
      Cc: stable@vger.kernel.org
      Fixes: 9491ae4a ("mm: don't cap request size based on read-ahead setting")
      Reported-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      732fd460
    • Takashi Sakamoto's avatar
      ALSA; firewire-tascam: exclude Tascam FE-8 from detection · 9244e838
      Takashi Sakamoto authored
      Tascam FE-8 is known to support communication by asynchronous transaction
      only. The support can be implemented in userspace application and
      snd-firewire-ctl-services project has the support. However, ALSA
      firewire-tascam driver is bound to the model.
      
      This commit changes device entries so that the model is excluded. In a
      commit 53b3ffee ("ALSA: firewire-tascam: change device probing
      processing"), I addressed to the concern that version field in
      configuration differs depending on installed firmware. However, as long
      as I checked, the version number is fixed. It's safe to return version
      number back to modalias.
      
      Fixes: 53b3ffee ("ALSA: firewire-tascam: change device probing processing")
      Cc: <stable@vger.kernel.org> # 4.4+
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Link: https://lore.kernel.org/r/20200823075537.56255-1-o-takashi@sakamocchi.jpSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9244e838
  2. 09 Sep, 2020 37 commits