diff mbox series

[net-next] ptr_ring: add include of linux/mm.h

Message ID 157891093662.53334.15580647502551818360.stgit@firesoul
State Accepted
Delegated to: David Miller
Headers show
Series [net-next] ptr_ring: add include of linux/mm.h | expand

Commit Message

Jesper Dangaard Brouer Jan. 13, 2020, 10:22 a.m. UTC
Commit 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails")
started to use kvmalloc_array and kvfree, which are defined in mm.h,
the previous functions kcalloc and kfree, which are defined in slab.h.

Add the missing include of linux/mm.h.  This went unnoticed as other
include files happened to include mm.h.

Fixes: 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
---
 include/linux/ptr_ring.h |    1 +
 1 file changed, 1 insertion(+)

Comments

Michael S. Tsirkin Jan. 13, 2020, 1:16 p.m. UTC | #1
On Mon, Jan 13, 2020 at 11:22:16AM +0100, Jesper Dangaard Brouer wrote:
> Commit 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails")
> started to use kvmalloc_array and kvfree, which are defined in mm.h,
> the previous functions kcalloc and kfree, which are defined in slab.h.
> 
> Add the missing include of linux/mm.h.  This went unnoticed as other
> include files happened to include mm.h.
> 
> Fixes: 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails")
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  include/linux/ptr_ring.h |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/ptr_ring.h b/include/linux/ptr_ring.h
> index 0abe9a4fc842..417db0a79a62 100644
> --- a/include/linux/ptr_ring.h
> +++ b/include/linux/ptr_ring.h
> @@ -23,6 +23,7 @@
>  #include <linux/types.h>
>  #include <linux/compiler.h>
>  #include <linux/slab.h>
> +#include <linux/mm.h>
>  #include <asm/errno.h>
>  #endif
>  
>
Jakub Kicinski Jan. 14, 2020, 2:19 a.m. UTC | #2
On Mon, 13 Jan 2020 11:22:16 +0100, Jesper Dangaard Brouer wrote:
> Commit 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails")
> started to use kvmalloc_array and kvfree, which are defined in mm.h,
> the previous functions kcalloc and kfree, which are defined in slab.h.
> 
> Add the missing include of linux/mm.h.  This went unnoticed as other
> include files happened to include mm.h.
> 
> Fixes: 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails")
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>

Applied to net-next as specified, let's see if bots pull it into stable
for no good reason :)  Thank you!
diff mbox series

Patch

diff --git a/include/linux/ptr_ring.h b/include/linux/ptr_ring.h
index 0abe9a4fc842..417db0a79a62 100644
--- a/include/linux/ptr_ring.h
+++ b/include/linux/ptr_ring.h
@@ -23,6 +23,7 @@ 
 #include <linux/types.h>
 #include <linux/compiler.h>
 #include <linux/slab.h>
+#include <linux/mm.h>
 #include <asm/errno.h>
 #endif