Commit 40bb0d53 authored by Johannes Erdfelt's avatar Johannes Erdfelt Committed by Greg Kroah-Hartman

[PATCH] uhci.c 2.4.19-pre3 kmem_cache_alloc flags

My previous patch which cleaned up some of the spinlocks, moved one of
the spinlocks around a call to kmem_cache_alloc. It would sometimes
erroneously call it with GFP_KERNEL.

This patch fixes the problem by always calling it with GFP_ATOMIC.
Thanks to Greg for pointing this out to me.

JE
parent 02b43b71
...@@ -619,7 +619,7 @@ static struct urb_priv *uhci_alloc_urb_priv(struct uhci *uhci, struct urb *urb) ...@@ -619,7 +619,7 @@ static struct urb_priv *uhci_alloc_urb_priv(struct uhci *uhci, struct urb *urb)
{ {
struct urb_priv *urbp; struct urb_priv *urbp;
urbp = kmem_cache_alloc(uhci_up_cachep, in_interrupt() ? SLAB_ATOMIC : SLAB_KERNEL); urbp = kmem_cache_alloc(uhci_up_cachep, SLAB_ATOMIC);
if (!urbp) { if (!urbp) {
err("uhci_alloc_urb_priv: couldn't allocate memory for urb_priv\n"); err("uhci_alloc_urb_priv: couldn't allocate memory for urb_priv\n");
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment