Skip to content

Commit b2091a6

Browse files
committed
Merge tag 'for-linus-6.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen updates from Juergen Gross: "Three minor fixes" * tag 'for-linus-6.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: update pvcalls_front_accept prototype Grab mm lock before grabbing pt lock xen: pcpu: remove unnecessary __ref annotation
2 parents 9071080 + bda50f7 commit b2091a6

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

arch/x86/xen/mmu_pv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,7 @@ void xen_mm_pin_all(void)
781781
{
782782
struct page *page;
783783

784+
spin_lock(&init_mm.page_table_lock);
784785
spin_lock(&pgd_lock);
785786

786787
list_for_each_entry(page, &pgd_list, lru) {
@@ -791,6 +792,7 @@ void xen_mm_pin_all(void)
791792
}
792793

793794
spin_unlock(&pgd_lock);
795+
spin_unlock(&init_mm.page_table_lock);
794796
}
795797

796798
static void __init xen_mark_pinned(struct mm_struct *mm, struct page *page,
@@ -887,6 +889,7 @@ void xen_mm_unpin_all(void)
887889
{
888890
struct page *page;
889891

892+
spin_lock(&init_mm.page_table_lock);
890893
spin_lock(&pgd_lock);
891894

892895
list_for_each_entry(page, &pgd_list, lru) {
@@ -898,6 +901,7 @@ void xen_mm_unpin_all(void)
898901
}
899902

900903
spin_unlock(&pgd_lock);
904+
spin_unlock(&init_mm.page_table_lock);
901905
}
902906

903907
static void xen_enter_mmap(struct mm_struct *mm)

drivers/xen/pcpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static ssize_t online_show(struct device *dev,
105105
return sprintf(buf, "%u\n", !!(cpu->flags & XEN_PCPU_FLAGS_ONLINE));
106106
}
107107

108-
static ssize_t __ref online_store(struct device *dev,
108+
static ssize_t online_store(struct device *dev,
109109
struct device_attribute *attr,
110110
const char *buf, size_t count)
111111
{

drivers/xen/pvcalls-front.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ int pvcalls_front_socket(struct socket *sock)
341341
pvcalls_exit();
342342
return ret;
343343
}
344+
EXPORT_SYMBOL_GPL(pvcalls_front_socket);
344345

345346
static void free_active_ring(struct sock_mapping *map)
346347
{
@@ -486,6 +487,7 @@ int pvcalls_front_connect(struct socket *sock, struct sockaddr *addr,
486487
pvcalls_exit_sock(sock);
487488
return ret;
488489
}
490+
EXPORT_SYMBOL_GPL(pvcalls_front_connect);
489491

490492
static int __write_ring(struct pvcalls_data_intf *intf,
491493
struct pvcalls_data *data,
@@ -581,6 +583,7 @@ int pvcalls_front_sendmsg(struct socket *sock, struct msghdr *msg,
581583
pvcalls_exit_sock(sock);
582584
return tot_sent;
583585
}
586+
EXPORT_SYMBOL_GPL(pvcalls_front_sendmsg);
584587

585588
static int __read_ring(struct pvcalls_data_intf *intf,
586589
struct pvcalls_data *data,
@@ -666,6 +669,7 @@ int pvcalls_front_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
666669
pvcalls_exit_sock(sock);
667670
return ret;
668671
}
672+
EXPORT_SYMBOL_GPL(pvcalls_front_recvmsg);
669673

670674
int pvcalls_front_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
671675
{
@@ -719,6 +723,7 @@ int pvcalls_front_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
719723
pvcalls_exit_sock(sock);
720724
return 0;
721725
}
726+
EXPORT_SYMBOL_GPL(pvcalls_front_bind);
722727

723728
int pvcalls_front_listen(struct socket *sock, int backlog)
724729
{
@@ -768,8 +773,10 @@ int pvcalls_front_listen(struct socket *sock, int backlog)
768773
pvcalls_exit_sock(sock);
769774
return ret;
770775
}
776+
EXPORT_SYMBOL_GPL(pvcalls_front_listen);
771777

772-
int pvcalls_front_accept(struct socket *sock, struct socket *newsock, int flags)
778+
int pvcalls_front_accept(struct socket *sock, struct socket *newsock,
779+
struct proto_accept_arg *arg)
773780
{
774781
struct pvcalls_bedata *bedata;
775782
struct sock_mapping *map;
@@ -788,7 +795,7 @@ int pvcalls_front_accept(struct socket *sock, struct socket *newsock, int flags)
788795
return -EINVAL;
789796
}
790797

791-
nonblock = flags & SOCK_NONBLOCK;
798+
nonblock = arg->flags & SOCK_NONBLOCK;
792799
/*
793800
* Backend only supports 1 inflight accept request, will return
794801
* errors for the others
@@ -904,6 +911,7 @@ int pvcalls_front_accept(struct socket *sock, struct socket *newsock, int flags)
904911
pvcalls_exit_sock(sock);
905912
return ret;
906913
}
914+
EXPORT_SYMBOL_GPL(pvcalls_front_accept);
907915

908916
static __poll_t pvcalls_front_poll_passive(struct file *file,
909917
struct pvcalls_bedata *bedata,
@@ -1004,6 +1012,7 @@ __poll_t pvcalls_front_poll(struct file *file, struct socket *sock,
10041012
pvcalls_exit_sock(sock);
10051013
return ret;
10061014
}
1015+
EXPORT_SYMBOL_GPL(pvcalls_front_poll);
10071016

10081017
int pvcalls_front_release(struct socket *sock)
10091018
{
@@ -1087,6 +1096,7 @@ int pvcalls_front_release(struct socket *sock)
10871096
pvcalls_exit();
10881097
return 0;
10891098
}
1099+
EXPORT_SYMBOL_GPL(pvcalls_front_release);
10901100

10911101
static const struct xenbus_device_id pvcalls_front_ids[] = {
10921102
{ "pvcalls" },

drivers/xen/pvcalls-front.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int pvcalls_front_bind(struct socket *sock,
1212
int pvcalls_front_listen(struct socket *sock, int backlog);
1313
int pvcalls_front_accept(struct socket *sock,
1414
struct socket *newsock,
15-
int flags);
15+
struct proto_accept_arg *arg);
1616
int pvcalls_front_sendmsg(struct socket *sock,
1717
struct msghdr *msg,
1818
size_t len);

0 commit comments

Comments
 (0)