On Wednesday, February 26, 2014 3:26 PM, Viresh Kumar wrote: > On 26 February 2014 10:49, Joe Perches <[email protected]> wrote: > > Look at warn_alloc_failed() in mm/page_alloc.c > > Okay, there is a print there. But I am not able to reach to this routine > from devm_kzalloc(). > > devm_kzalloc() <linux/device.h> > devm_kmalloc() <drivers/base/devres.c> > alloc_dr() <drivers/base/devres.c> > kmalloc_track_caller() <linux/slab.h> > __kmalloc_track_caller() <mm/slab,slub/slob.c> Taking slab as example: > __do_kmalloc() <mm/slab.c>
(+CC Laurent Pinchart, Dan Carpenter) Right, I also cannot find that warn_alloc_failed() is called, during devm_kzalloc(). However, in the case of vmalloc(), warn_alloc_failed() is called as below. ./mm/vmalloc.c vmalloc() __vmalloc_node_flags() __vmalloc_node() __vmalloc_node_range() ./mm/page_alloc.c warn_alloc_failed() > ... > > I can see cases where NULL is returned after above paths and the function > you mentioned wasn't there. So, I am not sure that we will get a print for > sure > for any error that might occur from devm_kzalloc(). I guess that slab_out_of_memory() <./mm/slub.c> may print it for any errors. But, I am not sure. :-( Joe Perches, Would you confirm this? Best regards, Jingoo Han -- To unsubscribe from this list: send the line "unsubscribe linux-pwm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
