Centos-kernel-stream-9/drivers/usb/common
Desnes Nunes 07ac0d6d6f USB: make single lock for all usb dynamic id lists
JIRA: https://issues.redhat.com/browse/RHEL-78828

commit 0b3144da31f855fce652303f588416a60991bdef
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Wed, 13 Nov 2024 07:49:22 +0100

  There are a number of places where we accidentally pass in a constant
  structure to later cast it off to a dynamic one, and then attempt to
  grab a lock on it, which is not a good idea.  To help resolve this, move
  the dynamic id lock out of the dynamic id structure for the driver and
  into one single lock for all USB dynamic ids.  As this lock should never
  have any real contention (it's only every accessed when a device is
  added or removed, which is always serialized) there should not be any
  difference except for some memory savings.

  Note, this just converts the existing use of the dynamic id lock to the
  new static lock, there is one place that is accessing the dynamic id
  list without grabbing the lock, that will be fixed up in a follow-on
  change.

  Cc: Johan Hovold <johan@kernel.org>
  Cc: Herve Codina <herve.codina@bootlin.com>
  Cc: Rob Herring <robh@kernel.org>
  Cc: Alan Stern <stern@rowland.harvard.edu>
  Cc: Grant Grundler <grundler@chromium.org>
  Cc: Oliver Neukum <oneukum@suse.com>
  Cc: Yajun Deng <yajun.deng@linux.dev>
  Cc: Douglas Anderson <dianders@chromium.org>
  Cc: linux-usb@vger.kernel.org
  Link: https://lore.kernel.org/r/2024111322-kindly-finalist-d247@gregkh
  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Desnes Nunes <desnesn@redhat.com>
2025-03-19 21:24:05 -03:00
..
Kconfig
Makefile
common.c USB: make single lock for all usb dynamic id lists 2025-03-19 21:24:05 -03:00
common.h
debug.c
led.c
ulpi.c
usb-conn-gpio.c
usb-otg-fsm.c usb: common: add missing MODULE_DESCRIPTION() macros 2024-11-07 23:01:35 -03:00