Hi,

While tracing the source of sb_bread I came across this comment in the
function __getblk().

1351  * __getblk() cannot fail - it just keeps trying.  If you pass it an
1352  * illegal block number, __getblk() will happily return a buffer_head
1353  * which represents the non-existent block.  Very weird.


Anyone aware of any solutions of this or has any work been to do some
validation for blocknumber in __getblk. As far as I think most of the
filesystems keep max number of blocks in the partition in their super
block structure which can be used to check if the block number is
within the range, but that makes filesystem specific....... Any other
suggestions ?? What all conditions make a block invalid to read,
apart from the block number being more than than the available blocks.

Thanks in advance
-- 
Thanks & Regards,
********************************************
Manish Katiyar  ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to