LKML Archive on
help / color / mirror / Atom feed
From: David Teigland <>
Cc: Al Viro <>
Subject: [PATCH 12/16] dlm: fix dlm_dir_lookup() handling of too long names
Date: Thu,  7 Feb 2008 00:09:15 -0600	[thread overview]
Message-ID: <> (raw)

From: Al Viro <>

... those can happen and BUG() from DLM_ASSERT() in allocate_direntry() is
not a good way to handle them.

Signed-off-by: Al Viro <>
Signed-off-by: David Teigland <>
 fs/dlm/dir.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c
index 831050e..85defeb 100644
--- a/fs/dlm/dir.c
+++ b/fs/dlm/dir.c
@@ -319,6 +319,9 @@ static int get_entry(struct dlm_ls *ls, int nodeid, char *name,
+	if (namelen > DLM_RESNAME_MAXLEN)
+		return -EINVAL;
 	de = kzalloc(sizeof(struct dlm_direntry) + namelen, GFP_KERNEL);
 	if (!de)
 		return -ENOMEM;

                 reply	other threads:[~2008-02-07  6:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \ \ \ \ \
    --subject='Re: [PATCH 12/16] dlm: fix dlm_dir_lookup() handling of too long names' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).