[Devel] [PATCH rh7 2/3] net/packet: do not account sock buffer to cg if kmem acct is off
Vladimir Davydov
vdavydov at parallels.com
Mon Jun 15 09:33:38 PDT 2015
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
net/packet/af_packet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index b9f09eb5d2f5..7cd659a947cb 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2438,7 +2438,7 @@ static struct cg_proto *packet_sk_charge(void)
return ERR_PTR(-ENOMEM);
psc->memcg = try_get_mem_cgroup_from_current();
- if (psc->memcg) {
+ if (psc->memcg && memcg_kmem_is_active(psc->memcg)) {
/*
* Forcedly charge the maximum amount of data this socket
* may have. It's typically not huge and packet sockets are
--
2.1.4
More information about the Devel
mailing list