Patch "dpll: fix register pin with unregistered parent pin" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dpll: fix register pin with unregistered parent pin

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dpll-fix-register-pin-with-unregistered-parent-pin.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c414d49fa449a866c343aa87835bb4d65c568c92
Author: Arkadiusz Kubalewski <arkadiusz.kubalewski@xxxxxxxxx>
Date:   Fri Jan 19 14:43:04 2024 +0100

    dpll: fix register pin with unregistered parent pin
    
    [ Upstream commit 7dc5b18ff71bd6f948810ab8a08b6a6ff8b315c5 ]
    
    In case of multiple kernel module instances using the same dpll device:
    if only one registers dpll device, then only that one can register
    directly connected pins with a dpll device. When unregistered parent is
    responsible for determining if the muxed pin can be registered with it
    or not, the drivers need to be loaded in serialized order to work
    correctly - first the driver instance which registers the direct pins
    needs to be loaded, then the other instances could register muxed type
    pins.
    
    Allow registration of a pin with a parent even if the parent was not
    yet registered, thus allow ability for unserialized driver instance
    load order.
    Do not WARN_ON notification for unregistered pin, which can be invoked
    for described case, instead just return error.
    
    Fixes: 9431063ad323 ("dpll: core: Add DPLL framework base functions")
    Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions")
    Reviewed-by: Jan Glaza <jan.glaza@xxxxxxxxx>
    Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>
    Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c
index 5e3b9b5679f9..f8fbf0394288 100644
--- a/drivers/dpll/dpll_core.c
+++ b/drivers/dpll/dpll_core.c
@@ -28,8 +28,6 @@ static u32 dpll_xa_id;
 	WARN_ON_ONCE(!xa_get_mark(&dpll_device_xa, (d)->id, DPLL_REGISTERED))
 #define ASSERT_DPLL_NOT_REGISTERED(d)	\
 	WARN_ON_ONCE(xa_get_mark(&dpll_device_xa, (d)->id, DPLL_REGISTERED))
-#define ASSERT_PIN_REGISTERED(p)	\
-	WARN_ON_ONCE(!xa_get_mark(&dpll_pin_xa, (p)->id, DPLL_REGISTERED))
 
 struct dpll_device_registration {
 	struct list_head list;
@@ -614,8 +612,6 @@ dpll_pin_register(struct dpll_device *dpll, struct dpll_pin *pin,
 	    WARN_ON(!ops->state_on_dpll_get) ||
 	    WARN_ON(!ops->direction_get))
 		return -EINVAL;
-	if (ASSERT_DPLL_REGISTERED(dpll))
-		return -EINVAL;
 
 	mutex_lock(&dpll_lock);
 	if (WARN_ON(!(dpll->module == pin->module &&
@@ -693,8 +689,6 @@ int dpll_pin_on_pin_register(struct dpll_pin *parent, struct dpll_pin *pin,
 	    WARN_ON(!ops->state_on_pin_get) ||
 	    WARN_ON(!ops->direction_get))
 		return -EINVAL;
-	if (ASSERT_PIN_REGISTERED(parent))
-		return -EINVAL;
 
 	mutex_lock(&dpll_lock);
 	ret = dpll_xa_ref_pin_add(&pin->parent_refs, parent, ops, priv);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux