Re: [PATCH v2 1/7] KVM: s390: Remove user triggerable WARN_ON

Douglas Freimuth <[email protected]>
Newsgroups org.kernel.vger.linux-s390,org.kernel.vger.kvm
Message-ID <[email protected]>

On 8/4/26 12:24 PM, Christian Borntraeger wrote:
> pin_map_page() fails legitimately whenever the userspace mapping behind
> the adapter route has gone away, e.g. when the VMM unmaps that memory.
> As this can happen without a kernel programming error, remove the
> WARN_ON.
> 
> Fixes: 1e95e3bc6b05 ("KVM: s390: Enable adapter_indicators_set to use mapped pages")
> Cc: Douglas Freimuth <[email protected]>
> Cc: Matthew Rosato <[email protected]>
> Signed-off-by: Christian Borntraeger <[email protected]>
> Reviewed-by: Matthew Rosato <[email protected]>

Reviewed-by: Douglas Freimuth <[email protected]>

> ---
>   arch/s390/kvm/interrupt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
> index 8f24bcd1a6d3..23f0e0821474 100644
> --- a/arch/s390/kvm/interrupt.c
> +++ b/arch/s390/kvm/interrupt.c
> @@ -3013,7 +3013,7 @@ static int adapter_indicators_set(struct kvm *kvm,
>   	if (!summary_info) {
>   		spin_unlock_irqrestore(&adapter->maps_lock, flags);
>   		summary_page = pin_map_page(kvm, adapter_int->summary_addr, 0);
> -		if (WARN_ON_ONCE(!summary_page))
> +		if (!summary_page)
>   			return -1;
>   		idx = srcu_read_lock(&kvm->srcu);
>   		map = page_address(summary_page);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.