From ef5e7173e759776950afbb0075361b3c9a3e6e84 Mon Sep 17 00:00:00 2001 From: eeb Date: Wed, 7 Jan 2004 13:26:29 +0000 Subject: [PATCH] . fixed assertion when called from interrupt handler (allocating lib_msg_t) --- lnet/include/linux/kp30.h | 4 +++- lustre/portals/include/linux/kp30.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lnet/include/linux/kp30.h b/lnet/include/linux/kp30.h index 815375c..63eaee7 100644 --- a/lnet/include/linux/kp30.h +++ b/lnet/include/linux/kp30.h @@ -282,7 +282,9 @@ do { \ #define PORTAL_ALLOC_GFP(ptr, size, mask) \ do { \ - LASSERT (!in_interrupt()); \ + LASSERT (!in_interrupt() || \ + (size <= PORTAL_VMALLOC_SIZE && \ + (mask & __GFP_WAIT) == 0)); \ if ((size) > PORTAL_VMALLOC_SIZE) \ (ptr) = vmalloc(size); \ else \ diff --git a/lustre/portals/include/linux/kp30.h b/lustre/portals/include/linux/kp30.h index 815375c..63eaee7 100644 --- a/lustre/portals/include/linux/kp30.h +++ b/lustre/portals/include/linux/kp30.h @@ -282,7 +282,9 @@ do { \ #define PORTAL_ALLOC_GFP(ptr, size, mask) \ do { \ - LASSERT (!in_interrupt()); \ + LASSERT (!in_interrupt() || \ + (size <= PORTAL_VMALLOC_SIZE && \ + (mask & __GFP_WAIT) == 0)); \ if ((size) > PORTAL_VMALLOC_SIZE) \ (ptr) = vmalloc(size); \ else \ -- 1.8.3.1