mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
xen: branch for v5.18-rc4
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRTLbB6QfY48x44uB6AXGG7T9hjvgUCYmPu9QAKCRCAXGG7T9hj vmvYAP4sD8jB17bSSUq9jGhNIr3vc6UZ6Oz+8R6G6CvSBhOa0gEAqWTU04RVHeYy Sqs6qs9dvSdF2AvGR9DydrkCF5n6sgU= =s5yA -----END PGP SIGNATURE----- Merge tag 'for-linus-5.18-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "A simple cleanup patch and a refcount fix for Xen on Arm" * tag 'for-linus-5.18-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: arm/xen: Fix some refcount leaks xen: Convert kmap() to kmap_local_page()
This commit is contained in:
commit
b51bd23c61
@ -337,12 +337,15 @@ int __init arch_xen_unpopulated_init(struct resource **res)
|
||||
|
||||
if (!nr_reg) {
|
||||
pr_err("No extended regions are found\n");
|
||||
of_node_put(np);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
regs = kcalloc(nr_reg, sizeof(*regs), GFP_KERNEL);
|
||||
if (!regs)
|
||||
if (!regs) {
|
||||
of_node_put(np);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create resource from extended regions provided by the hypervisor to be
|
||||
@ -403,8 +406,8 @@ int __init arch_xen_unpopulated_init(struct resource **res)
|
||||
*res = &xen_resource;
|
||||
|
||||
err:
|
||||
of_node_put(np);
|
||||
kfree(regs);
|
||||
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
@ -424,8 +427,10 @@ static void __init xen_dt_guest_init(void)
|
||||
|
||||
if (of_address_to_resource(xen_node, GRANT_TABLE_INDEX, &res)) {
|
||||
pr_err("Xen grant table region is not found\n");
|
||||
of_node_put(xen_node);
|
||||
return;
|
||||
}
|
||||
of_node_put(xen_node);
|
||||
xen_grant_frames = res.start;
|
||||
}
|
||||
|
||||
|
@ -178,9 +178,9 @@ static void __del_gref(struct gntalloc_gref *gref)
|
||||
unsigned long addr;
|
||||
|
||||
if (gref->notify.flags & UNMAP_NOTIFY_CLEAR_BYTE) {
|
||||
uint8_t *tmp = kmap(gref->page);
|
||||
uint8_t *tmp = kmap_local_page(gref->page);
|
||||
tmp[gref->notify.pgoff] = 0;
|
||||
kunmap(gref->page);
|
||||
kunmap_local(tmp);
|
||||
}
|
||||
if (gref->notify.flags & UNMAP_NOTIFY_SEND_EVENT) {
|
||||
notify_remote_via_evtchn(gref->notify.event);
|
||||
|
Loading…
Reference in New Issue
Block a user