update to Ubuntu-5.4.0-43.47
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
e799b5ec0d
commit
6b841d38be
@ -55,7 +55,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
2 files changed, 111 insertions(+)
|
2 files changed, 111 insertions(+)
|
||||||
|
|
||||||
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
||||||
index dc93d6b94d82..b9a5d6aa44fb 100644
|
index 9c05c1fd8ed2..3fe28e536a56 100644
|
||||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||||
@@ -3434,6 +3434,15 @@
|
@@ -3434,6 +3434,15 @@
|
||||||
@ -75,7 +75,7 @@ index dc93d6b94d82..b9a5d6aa44fb 100644
|
|||||||
Safety option to keep boot IRQs enabled. This
|
Safety option to keep boot IRQs enabled. This
|
||||||
should never be necessary.
|
should never be necessary.
|
||||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||||
index 25f5e253decd..0a0fd4db3908 100644
|
index eaa0036878a9..f0e4c36c4e8d 100644
|
||||||
--- a/drivers/pci/quirks.c
|
--- a/drivers/pci/quirks.c
|
||||||
+++ b/drivers/pci/quirks.c
|
+++ b/drivers/pci/quirks.c
|
||||||
@@ -192,6 +192,106 @@ static int __init pci_apply_final_quirks(void)
|
@@ -192,6 +192,106 @@ static int __init pci_apply_final_quirks(void)
|
||||||
@ -185,7 +185,7 @@ index 25f5e253decd..0a0fd4db3908 100644
|
|||||||
/*
|
/*
|
||||||
* Decoding should be disabled for a PCI device during BAR sizing to avoid
|
* Decoding should be disabled for a PCI device during BAR sizing to avoid
|
||||||
* conflict. But doing so may cause problems on host bridge and perhaps other
|
* conflict. But doing so may cause problems on host bridge and perhaps other
|
||||||
@@ -4796,6 +4896,8 @@ static const struct pci_dev_acs_enabled {
|
@@ -4811,6 +4911,8 @@ static const struct pci_dev_acs_enabled {
|
||||||
{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
|
{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
|
||||||
/* APM X-Gene */
|
/* APM X-Gene */
|
||||||
{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
|
{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
|
||||||
|
@ -13,7 +13,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
||||||
index 35a82cb10556..84cf5dcb0405 100644
|
index 12813344373d..1560f78ad60e 100644
|
||||||
--- a/virt/kvm/kvm_main.c
|
--- a/virt/kvm/kvm_main.c
|
||||||
+++ b/virt/kvm/kvm_main.c
|
+++ b/virt/kvm/kvm_main.c
|
||||||
@@ -76,7 +76,7 @@ module_param(halt_poll_ns, uint, 0644);
|
@@ -76,7 +76,7 @@ module_param(halt_poll_ns, uint, 0644);
|
||||||
|
@ -18,7 +18,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
|
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
|
||||||
index 72f51275247e..597fe6f70d97 100644
|
index 3be65495aeb8..8a600e93450f 100644
|
||||||
--- a/arch/x86/kvm/vmx/vmx.c
|
--- a/arch/x86/kvm/vmx/vmx.c
|
||||||
+++ b/arch/x86/kvm/vmx/vmx.c
|
+++ b/arch/x86/kvm/vmx/vmx.c
|
||||||
@@ -103,7 +103,7 @@ module_param(enable_apicv, bool, S_IRUGO);
|
@@ -103,7 +103,7 @@ module_param(enable_apicv, bool, S_IRUGO);
|
||||||
|
@ -1,113 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Cong Wang <xiyou.wangcong@gmail.com>
|
|
||||||
Date: Tue, 16 Jun 2020 11:03:52 -0700
|
|
||||||
Subject: [PATCH] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
When we clone a socket in sk_clone_lock(), its sk_cgrp_data is
|
|
||||||
copied, so the cgroup refcnt must be taken too. And, unlike the
|
|
||||||
sk_alloc() path, sock_update_netprioidx() is not called here.
|
|
||||||
Therefore, it is safe and necessary to grab the cgroup refcnt
|
|
||||||
even when cgroup_sk_alloc is disabled.
|
|
||||||
|
|
||||||
sk_clone_lock() is in BH context anyway, the in_interrupt()
|
|
||||||
would terminate this function if called there. And for sk_alloc()
|
|
||||||
skcd->val is always zero. So it's safe to factor out the code
|
|
||||||
to make it more readable.
|
|
||||||
|
|
||||||
Fixes: 090e28b229af92dc5b ("netprio_cgroup: Fix unlimited memory leak of v2 cgroups")
|
|
||||||
Reported-by: Cameron Berkenpas <cam@neo-zeon.de>
|
|
||||||
Reported-by: Peter Geis <pgwipeout@gmail.com>
|
|
||||||
Reported-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
|
|
||||||
Reported-by: Daniël Sonck <dsonck92@gmail.com>
|
|
||||||
Tested-by: Cameron Berkenpas <cam@neo-zeon.de>
|
|
||||||
Cc: Daniel Borkmann <daniel@iogearbox.net>
|
|
||||||
Cc: Zefan Li <lizefan@huawei.com>
|
|
||||||
Cc: Tejun Heo <tj@kernel.org>
|
|
||||||
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
|
|
||||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|
||||||
---
|
|
||||||
include/linux/cgroup.h | 2 ++
|
|
||||||
kernel/cgroup/cgroup.c | 26 ++++++++++++++------------
|
|
||||||
net/core/sock.c | 2 +-
|
|
||||||
3 files changed, 17 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
|
|
||||||
index 57577075d204..14452a801d95 100644
|
|
||||||
--- a/include/linux/cgroup.h
|
|
||||||
+++ b/include/linux/cgroup.h
|
|
||||||
@@ -822,6 +822,7 @@ extern spinlock_t cgroup_sk_update_lock;
|
|
||||||
|
|
||||||
void cgroup_sk_alloc_disable(void);
|
|
||||||
void cgroup_sk_alloc(struct sock_cgroup_data *skcd);
|
|
||||||
+void cgroup_sk_clone(struct sock_cgroup_data *skcd);
|
|
||||||
void cgroup_sk_free(struct sock_cgroup_data *skcd);
|
|
||||||
|
|
||||||
static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)
|
|
||||||
@@ -847,6 +848,7 @@ static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)
|
|
||||||
#else /* CONFIG_CGROUP_DATA */
|
|
||||||
|
|
||||||
static inline void cgroup_sk_alloc(struct sock_cgroup_data *skcd) {}
|
|
||||||
+static inline void cgroup_sk_clone(struct sock_cgroup_data *skcd) {}
|
|
||||||
static inline void cgroup_sk_free(struct sock_cgroup_data *skcd) {}
|
|
||||||
|
|
||||||
#endif /* CONFIG_CGROUP_DATA */
|
|
||||||
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
|
|
||||||
index 7c9e97553a00..d56ee72f4a07 100644
|
|
||||||
--- a/kernel/cgroup/cgroup.c
|
|
||||||
+++ b/kernel/cgroup/cgroup.c
|
|
||||||
@@ -6382,18 +6382,6 @@ void cgroup_sk_alloc(struct sock_cgroup_data *skcd)
|
|
||||||
if (cgroup_sk_alloc_disabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- /* Socket clone path */
|
|
||||||
- if (skcd->val) {
|
|
||||||
- /*
|
|
||||||
- * We might be cloning a socket which is left in an empty
|
|
||||||
- * cgroup and the cgroup might have already been rmdir'd.
|
|
||||||
- * Don't use cgroup_get_live().
|
|
||||||
- */
|
|
||||||
- cgroup_get(sock_cgroup_ptr(skcd));
|
|
||||||
- cgroup_bpf_get(sock_cgroup_ptr(skcd));
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
/* Don't associate the sock with unrelated interrupted task's cgroup. */
|
|
||||||
if (in_interrupt())
|
|
||||||
return;
|
|
||||||
@@ -6415,6 +6403,20 @@ void cgroup_sk_alloc(struct sock_cgroup_data *skcd)
|
|
||||||
rcu_read_unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
+void cgroup_sk_clone(struct sock_cgroup_data *skcd)
|
|
||||||
+{
|
|
||||||
+ /* Socket clone path */
|
|
||||||
+ if (skcd->val) {
|
|
||||||
+ /*
|
|
||||||
+ * We might be cloning a socket which is left in an empty
|
|
||||||
+ * cgroup and the cgroup might have already been rmdir'd.
|
|
||||||
+ * Don't use cgroup_get_live().
|
|
||||||
+ */
|
|
||||||
+ cgroup_get(sock_cgroup_ptr(skcd));
|
|
||||||
+ cgroup_bpf_get(sock_cgroup_ptr(skcd));
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void cgroup_sk_free(struct sock_cgroup_data *skcd)
|
|
||||||
{
|
|
||||||
struct cgroup *cgrp = sock_cgroup_ptr(skcd);
|
|
||||||
diff --git a/net/core/sock.c b/net/core/sock.c
|
|
||||||
index 0adf7a9e5a90..6ef468767ab0 100644
|
|
||||||
--- a/net/core/sock.c
|
|
||||||
+++ b/net/core/sock.c
|
|
||||||
@@ -1836,7 +1836,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
|
|
||||||
/* sk->sk_memcg will be populated at accept() time */
|
|
||||||
newsk->sk_memcg = NULL;
|
|
||||||
|
|
||||||
- cgroup_sk_alloc(&newsk->sk_cgrp_data);
|
|
||||||
+ cgroup_sk_clone(&newsk->sk_cgrp_data);
|
|
||||||
|
|
||||||
rcu_read_lock();
|
|
||||||
filter = rcu_dereference(sk->sk_filter);
|
|
@ -1 +1 @@
|
|||||||
Subproject commit 51ee04d9d3b464e9aa8509013779491f0b001ebc
|
Subproject commit 367e715472ef3fa74dce26450b2326f642bcf223
|
Loading…
Reference in New Issue
Block a user