On Sun, Oct 30, 2022 at 09:02:36AM +0100, Christoph Hellwig wrote: > On Thu, Oct 27, 2022 at 10:26:57AM -0600, Keith Busch wrote: > > On Thu, Oct 27, 2022 at 05:57:22PM +0200, Joel Granados wrote: > > > In nvme_init_non_mdts_limits function we were returning 0 when kzalloc > > > failed. This patch corrects this behavior and return -ENOMEM > > > Fixes: 5befc7c26e5a ("nvme: implement non-mdts command limits") > > > > I'm pretty sure I had this returning 0 on purpose. We can proceed > > without this optional structure. > > Well, we could. But I don't think it really is a good idea. Why I think > failing major resource allocation (e.g. HMB) and just continuing limited, > doing that for these tiny kmallocs that the kernel basically never fails > tends to create a lot of confusion and hard to test code pathes. This seems like a more sound solution to me. Might just take this out to a separate thread as a new nvme_identify_cs_ctrl function might not be needed. Best