Skip to content

Commit

Permalink
use correct allocation flag under different half contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
tammela-cujo authored and tammela committed Jul 19, 2018
1 parent 59098f0 commit 978405b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/luaconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,12 @@ static inline int time(void *p)
#endif

#define free kfree
#define realloc(a, b) krealloc(a, b, GFP_KERNEL)
#include <linux/hardirq.h>
static inline void *realloc(const void *p, size_t new_size)
{
gfp_t flag = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL;
return krealloc(p, new_size, flag);
}

/* signal.h */
#define l_signalT lu_byte
Expand Down

0 comments on commit 978405b

Please sign in to comment.