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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yw1x37vuqmcy.fsf@unicorn.mansr.com>
Date:	Wed, 25 Nov 2015 12:45:01 +0000
From:	Måns Rullgård <mans@...sr.com>
To:	Mason <slash.tmp@...e.fr>
Cc:	netdev@...r.kernel.org, Eric Dumazet <eric.dumazet@...il.com>,
	Alexander Duyck <alexander.h.duyck@...hat.com>
Subject: Re: [PATCH v8] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

Mason <slash.tmp@...e.fr> writes:

> On 19/11/2015 14:02, Mans Rullgard wrote:
>
>> +	if (dma_mapping_error(&dev->dev, dma_addr)) {
>> +		skb_free_frag(data);
>> +		return -ENOMEM;
>> +	}
>
> I'm back-porting this driver to 4.1
>
> skb_free_frag() was introduced in 4.2 by 181edb2bfa22b IIUC.
>
> +static inline void skb_free_frag(void *addr)
> +{
> +       __free_page_frag(addr);
> +}
>
> Should I just copy the definition of __free_page_frag() ?

Looks like it ought to work.  Try and find out.  Not that you'll ever
hit that error condition unless you fake it.

> /*
>  * Frees a page fragment allocated out of either a compound or order 0 page.
>  */
> void __free_page_frag(void *addr)
> {
> 	struct page *page = virt_to_head_page(addr);
>
> 	if (unlikely(put_page_testzero(page)))
> 		__free_pages_ok(page, compound_order(page));
> }
>
> Regards.
>

-- 
Måns Rullgård
mans@...sr.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ