]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once
authorKonstantin Belousov <kib@FreeBSD.org>
Tue, 7 May 2024 13:23:28 +0000 (16:23 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Sun, 12 May 2024 01:13:00 +0000 (04:13 +0300)
commite93404065177d6c909cd64bf7d74fe0d8df35edf
tree23c31799c874233e0e3abd16d1e456bcfdee767b
parent02f481a30b8269c7cad24ec2920ca09751708a1e
cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once

per allocated vm_object.  Otherwise, since constructors are not
idempotent, we e.g. leak device reference in case of non-managed pager.

PR: 278826
Reported by: Austin Zhang <austin.zhang@dell.com>
Reviewed by: alc, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D45113
sys/vm/device_pager.c