Files
linux/drivers/pci/switch
Bjorn Helgaas ddc10938e0 PCI: switchtec: Return -EFAULT for copy_to_user() errors
switchtec_dev_read() didn't handle copy_to_user() errors correctly: it
assigned "rc = -EFAULT", but actually returned either "size", -ENXIO, or
-EBADMSG instead.

Update the failure cases to unlock mrpc_mutex and return -EFAULT directly.

Link: https://lore.kernel.org/r/[email protected]
Fixes: 080b47def5 ("MicroSemi Switchtec management interface driver")
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Logan Gunthorpe <[email protected]>
2023-01-18 11:11:20 -06:00
..