Fix more places where the user-mode allocator is used to allocate kernel thread resources -- before the user-mode allocator even exists

This commit is contained in:
Gregory Nutt
2014-09-03 14:58:24 -06:00
parent 2300589c92
commit b2a94b6f2b
11 changed files with 82 additions and 51 deletions
+7 -3
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* fs/fs_fdopen.c
*
* Copyright (C) 2007-2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -226,9 +226,13 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb)
(void)sem_init(&stream->fs_sem, 0, 1);
/* Allocate the IO buffer */
/* Allocate the IO buffer at the appropriate privilege level for
* the group.
*/
stream->fs_bufstart =
group_malloc(tcb->group, CONFIG_STDIO_BUFFER_SIZE);
stream->fs_bufstart = kumm_malloc(CONFIG_STDIO_BUFFER_SIZE);
if (!stream->fs_bufstart)
{
err = ENOMEM;