From: "lk" <linux_kernel@patni.com>
To: <linux-kernel@vger.kernel.org>
Subject: alloc_page_buffers() - kernel panic?
Date: Wed, 28 Sep 2005 15:20:45 +0530 [thread overview]
Message-ID: <002f01c5c412$194561c0$5e91a8c0@patni.com> (raw)
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
next reply other threads:[~2005-09-28 9:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-28 9:50 lk [this message]
2005-09-28 10:32 ` Fawad Lateef
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002f01c5c412$194561c0$5e91a8c0@patni.com' \
--to=linux_kernel@patni.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®