Commit daa1a05b authored by Johannes Berg's avatar Johannes Berg Committed by Richard Weinberger
Browse files

um: virtio_uml: use raw spinlock

This is needed because at least in time-travel the code
can be called directly from the deep architecture and
IRQ handling code.

Link: https://patch.msgid.link/20250110125550.32479-7-johannes@sipsolutions.net


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 5b166b78
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ struct virtio_uml_device {
	struct platform_device *pdev;
	struct virtio_uml_platform_data *pdata;

	spinlock_t sock_lock;
	raw_spinlock_t sock_lock;
	int sock, req_fd, irq;
	u64 features;
	u64 protocol_features;
@@ -246,7 +246,7 @@ static int vhost_user_send(struct virtio_uml_device *vu_dev,
	if (request_ack)
		msg->header.flags |= VHOST_USER_FLAG_NEED_REPLY;

	spin_lock_irqsave(&vu_dev->sock_lock, flags);
	raw_spin_lock_irqsave(&vu_dev->sock_lock, flags);
	rc = full_sendmsg_fds(vu_dev->sock, msg, size, fds, num_fds);
	if (rc < 0)
		goto out;
@@ -266,7 +266,7 @@ static int vhost_user_send(struct virtio_uml_device *vu_dev,
	}

out:
	spin_unlock_irqrestore(&vu_dev->sock_lock, flags);
	raw_spin_unlock_irqrestore(&vu_dev->sock_lock, flags);
	return rc;
}

@@ -1239,7 +1239,7 @@ static int virtio_uml_probe(struct platform_device *pdev)
		goto error_free;
	vu_dev->sock = rc;

	spin_lock_init(&vu_dev->sock_lock);
	raw_spin_lock_init(&vu_dev->sock_lock);

	rc = vhost_user_init(vu_dev);
	if (rc)