Thread (17 messages) flat view 17 messages, 2 authors, 2024-01-11

RE: [PATCH net v2 4/4] dpll: hide "zombie" pins for userspace

From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@intel.com>
Date: 2024-01-11 09:16:36

From: Jiri Pirko <jiri@resnulli.us>
Sent: Thursday, January 4, 2024 4:07 PM

Thu, Jan 04, 2024 at 12:11:32PM CET, arkadiusz.kubalewski@intel.com wrote:

[...]

quoted
@@ -1179,6 +1195,10 @@ int dpll_nl_pin_set_doit(struct sk_buff *skb,
struct genl_info *info)


What about dpll_nl_pin_get_doit(), dpll_nl_pin_id_get_doit()?

I think it would be better to move the check to:
dpll_pin_pre_doit()
Yes, makes sense, will move it to dpll_pin_pre_doit().
Then won't be needed in dpll_nl_pin_get_doit() and
dpll_nl_pin_set_doit().

Plus, will add check in dpll_nl_pin_id_get_doit().


Thank you!
Arkadiusz
quoted
{
	struct dpll_pin *pin = info->user_ptr[0];

+	if (!xa_empty(&pin->parent_refs) &&
+	    !dpll_pin_parents_registered(pin))
+		return -ENODEV;
+
	return dpll_pin_set_from_nlattr(pin, info);
}

--
2.38.1
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help