linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: Tim Gardner <tim.gardner@canonical.com>,
	linux-kernel@vger.kernel.org,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH linux-next v2] lockd: nlmclnt_reclaim(): avoid stack overflow
Date: Fri, 15 Feb 2013 11:30:51 -0500	[thread overview]
Message-ID: <20130215163050.GL8343@fieldses.org> (raw)
In-Reply-To: <20130214102038.52b1d292@tlielax.poochiereds.net>

On Thu, Feb 14, 2013 at 10:20:38AM -0500, Jeff Layton wrote:
> On Wed, 13 Feb 2013 08:40:16 -0700
> Tim Gardner <tim.gardner@canonical.com> wrote:
> 
> > Even though nlmclnt_reclaim() is only one call into the stack frame,
> > 928 bytes on the stack seems like a lot. Recode to dynamically
> > allocate the request structure once from within the reclaimer task,
> > then pass this pointer into nlmclnt_reclaim() for reuse on
> > subsequent calls.
> > 
> > smatch analysis:
> > 
> > fs/lockd/clntproc.c:620 nlmclnt_reclaim() warn: 'reqst' puts
> >  928 bytes on stack
> > 
> > Also remove redundant assignment of 0 after memset.
> > 
> > Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
> > Cc: "J. Bruce Fields" <bfields@fieldses.org>
> > Cc: linux-nfs@vger.kernel.org
> > Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> > ---
> > 
> > Changes from v1 -- don't return -ENOMEM from a task thread because it is
> > not propagated to the task creator. Instead print an error message and return.
...
> Oops, just noticed there was a later version of this patch. Please
> disregard my earlier mail...
> 
> Reviewed-by: Jeff Layton <jlayton@redhat.com>

Thanks, applying.--b.

  reply	other threads:[~2013-02-15 16:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 19:33 [PATCH linux-next] lockd: nlmclnt_reclaim(): avoid stack overflow Tim Gardner
2013-02-12 21:18 ` J. Bruce Fields
2013-02-13 15:40   ` [PATCH linux-next v2] " Tim Gardner
2013-02-14 15:20     ` Jeff Layton
2013-02-15 16:30       ` J. Bruce Fields [this message]
2013-02-14 15:19 ` [PATCH linux-next] " Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130215163050.GL8343@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tim.gardner@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).