LWN.net Logo

krealloc()

krealloc()

Posted Feb 28, 2009 7:00 UTC (Sat) by Russ.Dill@gmail.com (subscriber, #52805)
In reply to: krealloc() by corbet
Parent article: Getting the measure of ksize()

A quick check of mm/util.c confirms this. Initially I had no idea what the network developers are thinking. If the new size will fit in the original allocation, then no locks will be taken, no sleeping, etc.

But then it occured to me that the code that needs to do the expansion may be holding locks and may be in interrupt context. Preparing to call krealloc may require releasing locks, etc, since it could take locks.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds