Skip to content

Commit daa1a05

Browse files
jmberg-intelrichardweinberger
authored andcommitted
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/[email protected] Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 5b166b7 commit daa1a05

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/um/drivers/virtio_uml.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct virtio_uml_device {
5252
struct platform_device *pdev;
5353
struct virtio_uml_platform_data *pdata;
5454

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

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

268268
out:
269-
spin_unlock_irqrestore(&vu_dev->sock_lock, flags);
269+
raw_spin_unlock_irqrestore(&vu_dev->sock_lock, flags);
270270
return rc;
271271
}
272272

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

1242-
spin_lock_init(&vu_dev->sock_lock);
1242+
raw_spin_lock_init(&vu_dev->sock_lock);
12431243

12441244
rc = vhost_user_init(vu_dev);
12451245
if (rc)

0 commit comments

Comments
 (0)