lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAE2MWk=X0x_y7q7jejog_iWpd965J8NXs1ffOVV5pjSUVrQ=cg@mail.gmail.com>
Date:   Sun, 7 Jul 2019 01:27:54 +0530
From:   Ujjal Roy <royujjal@...il.com>
To:     Kernel <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>
Subject: [PATCH] net, skbuff: Handle devmap managed page when skb->head_frag
 is true

When head_frag is true we have page in the SKB head. So, for devm
managed page we need to inform the device driver through callback.

Signed-off-by: Ujjal Roy <royujjal@...il.com>
---
 net/core/skbuff.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index c8cd99c3603f..0d303e694efa 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -582,10 +582,16 @@ static void skb_free_head(struct sk_buff *skb)
{
unsigned char *head = skb->head;

- if (skb->head_frag)
+ if (skb->head_frag) {
+ struct page *page = virt_to_head_page(head);
+
+ if (put_devmap_managed_page(page))
+ return;
+
  skb_free_frag(head);
- else
+ } else {
  kfree(head);
+ }
 }

 static void skb_release_data(struct sk_buff *skb)
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ