Re: [PATCH V6 2/2] firmware: qcom: scm: Add wait-queue handling logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 08 2022 16:11, Bjorn Andersson wrote:
> On Thu, Dec 08, 2022 at 12:10:31PM +0530, Sibi Sankar wrote:

...

> > +
> > +	err = idr_alloc_u32(&scm->waitq.idr, wq, &wq_ctx_idr,
> > +			    U32_MAX, GFP_ATOMIC);
> 
> PS. Thinking about it further, imagine the firmware people deciding to
> be funny and allocating the wq_ctx in a cyclic fashion. The idr will
> consume all your ram after a while...

Even if wq_ctx is allocated cyclically, say, from 1 to N, only N idrs would
ever be allocated as subsequently there would only be lookups. Could you
elaborate on how we would run out of RAM?

Thank you.

Guru Das.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux