]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: f_rndis: Protect RNDIS options with mutex
authorKuen-Han Tsai <khtsai@google.com>
Fri, 20 Mar 2026 08:54:45 +0000 (16:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Apr 2026 08:33:35 +0000 (10:33 +0200)
commitc1b3d5b0acb194efe20fc5864ee03439fa7bd45c
tree7237e804aa53e6a81374363e2f870536226eae4d
parentd7d702407b61e96286a15b6e715572f541a8d41c
usb: gadget: f_rndis: Protect RNDIS options with mutex

commit 8d8c68b1fc06ece60cf43e1306ff0f4ac121547e upstream.

The class/subclass/protocol options are suspectible to race conditions
as they can be accessed concurrently through configfs.

Use existing mutex to protect these options. This issue was identified
during code inspection.

Fixes: 73517cf49bd4 ("usb: gadget: add RNDIS configfs options for class/subclass/protocol")
Cc: stable@vger.kernel.org
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
Link: https://patch.msgid.link/20260320-usb-net-lifecycle-v1-2-4886b578161b@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_rndis.c