* Re: [PATCH v2] jailhouse: Hold reference returned from of_find_xxx API [not found] <20220916090051.4096328-1-windhl@126.com> @ 2022-09-16 10:36 ` Juergen Gross via Virtualization 2022-09-17 5:25 ` Srivatsa S. Bhat 1 sibling, 0 replies; 3+ messages in thread From: Juergen Gross via Virtualization @ 2022-09-16 10:36 UTC (permalink / raw) To: Liang He, srivatsa, virtualization; +Cc: wangkelin2023 [-- Attachment #1.1.1.1: Type: text/plain, Size: 512 bytes --] On 16.09.22 11:00, Liang He wrote: > In jailhouse_paravirt(), we should hold the reference returned from > of_find_compatible_node() which has increased the refcount and then > call of_node_put() with it when done. > > Fixes: 63338a38db95 ("jailhouse: Provide detection for non-x86 systems") > Signed-off-by: Liang He <windhl@126.com> > Co-developed-by: Kelin Wang <wangkelin2023@163.com> > Signed-off-by: Kelin Wang <wangkelin2023@163.com> Reviewed-by: Juergen Gross <jgross@suse.com> Juergen [-- Attachment #1.1.1.2: OpenPGP public key --] [-- Type: application/pgp-keys, Size: 3149 bytes --] [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 495 bytes --] [-- Attachment #2: Type: text/plain, Size: 183 bytes --] _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] jailhouse: Hold reference returned from of_find_xxx API [not found] <20220916090051.4096328-1-windhl@126.com> 2022-09-16 10:36 ` [PATCH v2] jailhouse: Hold reference returned from of_find_xxx API Juergen Gross via Virtualization @ 2022-09-17 5:25 ` Srivatsa S. Bhat 2022-09-19 17:36 ` Bjorn Helgaas 1 sibling, 1 reply; 3+ messages in thread From: Srivatsa S. Bhat @ 2022-09-17 5:25 UTC (permalink / raw) To: Liang He, jgross, virtualization Cc: jailhouse-dev, mark.rutland, jan.kiszka, andy.shevchenko, robh+dt, wangkelin2023, linux-pci@vger.kernel.org, bhelgaas@google.com, Thomas Gleixner [ Adding author and reviewers of commit 63338a38db95 again ] On 9/16/22 2:00 AM, Liang He wrote: > In jailhouse_paravirt(), we should hold the reference returned from > of_find_compatible_node() which has increased the refcount and then > call of_node_put() with it when done. > > Fixes: 63338a38db95 ("jailhouse: Provide detection for non-x86 systems") > Signed-off-by: Liang He <windhl@126.com> > Co-developed-by: Kelin Wang <wangkelin2023@163.com> > Signed-off-by: Kelin Wang <wangkelin2023@163.com> Reviewed-by: Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu> > --- > > v2: use proper return type not the 'np' pointer > > include/linux/hypervisor.h | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/include/linux/hypervisor.h b/include/linux/hypervisor.h > index 9efbc54e35e5..f11eec57ea63 100644 > --- a/include/linux/hypervisor.h > +++ b/include/linux/hypervisor.h > @@ -27,7 +27,11 @@ static inline void hypervisor_pin_vcpu(int cpu) > > static inline bool jailhouse_paravirt(void) > { > - 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 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] jailhouse: Hold reference returned from of_find_xxx API 2022-09-17 5:25 ` Srivatsa S. Bhat @ 2022-09-19 17:36 ` Bjorn Helgaas 0 siblings, 0 replies; 3+ messages in thread From: Bjorn Helgaas @ 2022-09-19 17:36 UTC (permalink / raw) To: Srivatsa S. Bhat Cc: jgross, jailhouse-dev, jan.kiszka, virtualization, andy.shevchenko, robh+dt, wangkelin2023, linux-pci@vger.kernel.org, bhelgaas@google.com, mark.rutland, Liang He, Thomas Gleixner On Fri, Sep 16, 2022 at 10:25:31PM -0700, Srivatsa S. Bhat wrote: > [ Adding author and reviewers of commit 63338a38db95 again ] > > On 9/16/22 2:00 AM, Liang He wrote: > > In jailhouse_paravirt(), we should hold the reference returned from > > of_find_compatible_node() which has increased the refcount and then > > call of_node_put() with it when done. > > > > Fixes: 63338a38db95 ("jailhouse: Provide detection for non-x86 systems") > > Signed-off-by: Liang He <windhl@126.com> > > Co-developed-by: Kelin Wang <wangkelin2023@163.com> > > Signed-off-by: Kelin Wang <wangkelin2023@163.com> > > Reviewed-by: Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu> 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/0069849b-e6c7-5c9b-4b52-5aa6e4a328e4@csail.mit.edu/ 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 Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-19 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220916090051.4096328-1-windhl@126.com>
2022-09-16 10:36 ` [PATCH v2] jailhouse: Hold reference returned from of_find_xxx API Juergen Gross via Virtualization
2022-09-17 5:25 ` Srivatsa S. Bhat
2022-09-19 17:36 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).