lkml.org 
[lkml]   [2005]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectalloc_page_buffers() - kernel panic?
Date
I was looking at the fs(buffer.c) code, An observation:

alloc_page_buffers() is called from the function create_empty_buffers() . If
the memory allocation for the buffer head (through kmem_cache_alloc) fails
the allocation is retried till successful for async I/O. However for
synchronous I/O no such handling is done and create_buffer will return
NULL which is not checked in the calling function. The pointer returned by
NULL
is used without checking for the NULL condition. This would result in a
kernel panic when alloc_page_buffers() is not able to allocate buffer heads
from the cache for sync I/O.


Is anyone aware of the thought process behind this difference in
implementation for sync and async I/O.

regards
lk


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-28 11:52    [W:0.700 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site