dpll: fix userspace availability of pins
authorArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Fri, 19 Jan 2024 13:43:03 +0000 (14:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jan 2024 11:01:11 +0000 (11:01 +0000)
commitdb2ec3c94667eaeecc6a74d96594fab6baf80fdc
treee2a6a8c8205e0b8bce9e557ec0a84cc9f52e8d6d
parent830ead5fb0c5855ce4d70ba2ed4a673b5f1e7d9b
dpll: fix userspace availability of pins

If parent pin was unregistered but child pin was not, the userspace
would see the "zombie" pins - the ones that were registered with
a parent pin (dpll_pin_on_pin_register(..)).
Technically those are not available - as there is no dpll device in the
system. Do not dump those pins and prevent userspace from any
interaction with them. Provide a unified function to determine if the
pin is available and use it before acting/responding for user requests.

Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions")
Reviewed-by: Jan Glaza <jan.glaza@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/dpll/dpll_netlink.c