Revision 7ff57e98fb78ad94edafbdc7435f2d745e9e6bb5 authored by Fabio M. De Francesco on 23 February 2022, 10:02:52 UTC, committed by Jakub Kicinski on 24 February 2022, 17:09:33 UTC
smc_pnetid_by_table_ib() uses read_lock() and then it calls smc_pnet_apply_ib()
which, in turn, calls mutex_lock(&smc_ib_devices.mutex).

read_lock() disables preemption. Therefore, the code acquires a mutex while in
atomic context and it leads to a SAC bug.

Fix this bug by replacing the rwlock with a mutex.

Reported-and-tested-by: syzbot+4f322a6d84e991c38775@syzkaller.appspotmail.com
Fixes: 64e28b52c7a6 ("net/smc: add pnet table namespace support")
Confirmed-by: Tony Lu <tonylu@linux.alibaba.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Acked-by: Karsten Graul <kgraul@linux.ibm.com>
Link: https://lore.kernel.org/r/20220223100252.22562-1-fmdefrancesco@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent e13ad14
Raw File
index.rst
========================================
The Linux driver implementer's API guide
========================================

The kernel offers a wide variety of interfaces to support the development
of device drivers.  This document is an only somewhat organized collection
of some of those interfaces — it will hopefully get better over time!  The
available subsections can be seen below.

.. class:: toc-title

	   Table of contents

.. toctree::
   :maxdepth: 2

   driver-model/index
   basics
   infrastructure
   ioctl
   early-userspace/index
   pm/index
   clk
   device-io
   dma-buf
   device_link
   component
   message-based
   infiniband
   frame-buffer
   regulator
   reset
   iio/index
   input
   usb/index
   firewire
   pci/index
   cxl/index
   spi
   i2c
   ipmb
   ipmi
   i3c/index
   interconnect
   devfreq
   hsi
   edac
   scsi
   libata
   target
   mailbox
   mtdnand
   miscellaneous
   mei/index
   mtd/index
   mmc/index
   nvdimm/index
   w1
   rapidio/index
   s390-drivers
   vme
   80211/index
   uio-howto
   firmware/index
   pin-control
   gpio/index
   md/index
   media/index
   misc_devices
   nfc/index
   dmaengine/index
   slimbus
   soundwire/index
   thermal/index
   fpga/index
   acpi/index
   auxiliary_bus
   backlight/lp855x-driver.rst
   connector
   console
   dcdbas
   eisa
   isa
   isapnp
   io-mapping
   io_ordering
   generic-counter
   memory-devices/index
   men-chameleon-bus
   ntb
   nvmem
   parport-lowlevel
   pps
   ptp
   phy/index
   pwm
   pldmfw/index
   rfkill
   serial/index
   sm501
   surface_aggregator/index
   switchtec
   sync_file
   vfio-mediated-device
   vfio
   xilinx/index
   xillybus
   zorro

.. only::  subproject and html

   Indices
   =======

   * :ref:`genindex`
back to top