public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* alloc_page_buffers() - kernel panic?
@ 2005-09-28  9:50 lk
  2005-09-28 10:32 ` Fawad Lateef
  0 siblings, 1 reply; 2+ messages in thread
From: lk @ 2005-09-28  9:50 UTC (permalink / raw)
  To: linux-kernel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-28 10:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-28  9:50 alloc_page_buffers() - kernel panic? lk
2005-09-28 10:32 ` Fawad Lateef

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox