jailhouse: Hold reference returned from of_find_xxx API
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Juergen Gross via Virtualization
Reviewed-by Juergen GrossQuoted 8 lines · Liang He
In
jailhouse_paravirt(), we should hold the reference returned fromof_find_compatible_node()which has increased the refcount and then callof_node_put()with it when done.Fixes 63338a38db95 ("jailhouse: Provide detection for non-x86 systems")Signed-off-by Liang He <[email protected]>Co-developed-by Kelin Wang <[email protected]>Signed-off-by Kelin Wang <[email protected]>
Juergen
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Srivatsa S. Bhat
Reviewed-by[ Adding author and reviewers of commit 63338a38db95 again ]
Quoted 8 lines · Liang He
In
jailhouse_paravirt(), we should hold the reference returned fromof_find_compatible_node()which has increased the refcount and then callof_node_put()with it when done.Fixes 63338a38db95 ("jailhouse: Provide detection for non-x86 systems")Signed-off-by Liang He <[email protected]>Co-developed-by Kelin Wang <[email protected]>Signed-off-by Kelin Wang <[email protected]>
Quoted 15 lines
---
v2: use proper return type not the 'np' pointer
include/linux/hypervisor.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)include/linux/hypervisor.h +0
-0@@ -27,7 +27,11 @@ static inline void hypervisor_pin_vcpu(int cpu)static inline bool jailhouse_paravirt (void )
include/linux/hypervisor.h static inline void hypervisor_pin_vcpu(int cpu) · line 37
Quoted 10 lines
include/linux/hypervisor.h +5
-1{ -return of_find_compatible_node (NULL ,NULL ,"jailhouse,cell" ); +struct device_node *np =of_find_compatible_node (NULL ,NULL ,"jailhouse,cell" ); + +of_node_put (np); + +return np ? true : false; }#endif /* !CONFIG_X86 */
Regards,
Srivatsa
VMware Photon OS
Quoted 7 lines · Srivatsa S. Bhat
[ Adding author and reviewers of commit
63338a38db95again ]Quoted 4 lines · Liang He
In
jailhouse_paravirt(), we should hold the reference returned fromof_find_compatible_node()which has increased the refcount and then callof_node_put()with it when done.
Quoted 6 lines
Quoted 4 lines
Fixes 63338a38db95 ("jailhouse: Provide detection for non-x86 systems")Signed-off-by Liang He <[email protected]>Co-developed-by Kelin Wang <[email protected]>Signed-off-by Kelin Wang <[email protected]>Reviewed-by Srivatsa S. Bhat (VMware) <[email protected]>
The message to which you are responding didn't make it to the mailing list, so it's unlikely that anybody will pick it up. See the archive:
https://lore.kernel.org/all/[email protected]/
Maybe it was a multipart message or was HTML, which the mailing lists
reject: http://vger.kernel.org/majordomo-info.html
Bjorn
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization