Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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()

+9 -4
+7 -2
arch/arm/xen/enlighten.c
··· 337 337 338 338 if (!nr_reg) { 339 339 pr_err("No extended regions are found\n"); 340 + of_node_put(np); 340 341 return -EINVAL; 341 342 } 342 343 343 344 regs = kcalloc(nr_reg, sizeof(*regs), GFP_KERNEL); 344 - if (!regs) 345 + if (!regs) { 346 + of_node_put(np); 345 347 return -ENOMEM; 348 + } 346 349 347 350 /* 348 351 * Create resource from extended regions provided by the hypervisor to be ··· 406 403 *res = &xen_resource; 407 404 408 405 err: 406 + of_node_put(np); 409 407 kfree(regs); 410 - 411 408 return rc; 412 409 } 413 410 #endif ··· 427 424 428 425 if (of_address_to_resource(xen_node, GRANT_TABLE_INDEX, &res)) { 429 426 pr_err("Xen grant table region is not found\n"); 427 + of_node_put(xen_node); 430 428 return; 431 429 } 430 + of_node_put(xen_node); 432 431 xen_grant_frames = res.start; 433 432 } 434 433
+2 -2
drivers/xen/gntalloc.c
··· 178 178 unsigned long addr; 179 179 180 180 if (gref->notify.flags & UNMAP_NOTIFY_CLEAR_BYTE) { 181 - uint8_t *tmp = kmap(gref->page); 181 + uint8_t *tmp = kmap_local_page(gref->page); 182 182 tmp[gref->notify.pgoff] = 0; 183 - kunmap(gref->page); 183 + kunmap_local(tmp); 184 184 } 185 185 if (gref->notify.flags & UNMAP_NOTIFY_SEND_EVENT) { 186 186 notify_remote_via_evtchn(gref->notify.event);