Skip to content
  1. Dec 10, 2023
    • Pavel Begunkov's avatar
      io_uring/af_unix: disable sending io_uring over sockets · 69db702c
      Pavel Begunkov authored
      
      
      File reference cycles have caused lots of problems for io_uring
      in the past, and it still doesn't work exactly right and races with
      unix_stream_read_generic(). The safest fix would be to completely
      disallow sending io_uring files via sockets via SCM_RIGHT, so there
      are no possible cycles invloving registered files and thus rendering
      SCM accounting on the io_uring side unnecessary.
      
      Cc: stable@vger.kernel.org
      Fixes: 0091bfc8 ("io_uring/af_unix: defer registered files gc to io_uring release")
      Reported-and-suggested-by: default avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69db702c
    • Chengfeng Ye's avatar
      atm: solos-pci: Fix potential deadlock on &tx_queue_lock · 15319a4e
      Chengfeng Ye authored
      
      
      As &card->tx_queue_lock is acquired under softirq context along the
      following call chain from solos_bh(), other acquisition of the same
      lock inside process context should disable at least bh to avoid double
      lock.
      
      <deadlock #2>
      pclose()
      --> spin_lock(&card->tx_queue_lock)
      <interrupt>
         --> solos_bh()
         --> fpga_tx()
         --> spin_lock(&card->tx_queue_lock)
      
      This flaw was found by an experimental static analysis tool I am
      developing for irq-related deadlock.
      
      To prevent the potential deadlock, the patch uses spin_lock_bh()
      on &card->tx_queue_lock under process context code consistently to
      prevent the possible deadlock scenario.
      
      Fixes: 213e85d3 ("solos-pci: clean up pclose() function")
      Signed-off-by: default avatarChengfeng Ye <dg573847474@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      15319a4e
    • Chengfeng Ye's avatar
      atm: solos-pci: Fix potential deadlock on &cli_queue_lock · d5dba32b
      Chengfeng Ye authored
      
      
      As &card->cli_queue_lock is acquired under softirq context along the
      following call chain from solos_bh(), other acquisition of the same
      lock inside process context should disable at least bh to avoid double
      lock.
      
      <deadlock #1>
      console_show()
      --> spin_lock(&card->cli_queue_lock)
      <interrupt>
         --> solos_bh()
         --> spin_lock(&card->cli_queue_lock)
      
      This flaw was found by an experimental static analysis tool I am
      developing for irq-related deadlock.
      
      To prevent the potential deadlock, the patch uses spin_lock_bh()
      on the card->cli_queue_lock under process context code consistently
      to prevent the possible deadlock scenario.
      
      Fixes: 9c54004e ("atm: Driver for Solos PCI ADSL2+ card.")
      Signed-off-by: default avatarChengfeng Ye <dg573847474@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d5dba32b
  2. Dec 09, 2023
  3. Dec 08, 2023