On 10/15/2015 10:21 AM, [email protected] wrote: > From: Jérôme Glisse <[email protected]> > > It can be rather tedious to find why userspace is failing when only > thing kernel report is -ENOMEM. This add an error message so that > user can figure out why they are getting -ENOMEM. > > Signed-off-by: Jérôme Glisse <[email protected]> > cc: <[email protected]> > Cc: Haggai Eran <[email protected]> > Cc: Sagi Grimberg <[email protected]> > Cc: Shachar Raindel <[email protected]> > Cc: Doug Ledford <[email protected]> > --- > drivers/infiniband/core/umem.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c > index 38acb3c..a66929e 100644 > --- a/drivers/infiniband/core/umem.c > +++ b/drivers/infiniband/core/umem.c > @@ -169,6 +169,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, > unsigned long addr, > lock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT; > > if ((locked > lock_limit) && !capable(CAP_IPC_LOCK)) { > + pr_err("locked memory quota exhausted (see ulimit -l)\n"); > ret = -ENOMEM; > goto out; > } >
This looks like it could easily cause a flood of messages (possibly even enough to DoS the machine). Please convert this to some sort of rate limited output (preferably, you would issue this warning only once per task, and the error would include the command name). -- Doug Ledford <[email protected]> GPG KeyID: 0E572FDD
signature.asc
Description: OpenPGP digital signature
