[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100712215101.GG5658@bicker>
Date: Mon, 12 Jul 2010 23:51:01 +0200
From: Dan Carpenter <error27@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Eric Van Hensbergen <ericvh@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Abhishek Kulkarni <adkulkar@...il.iu.edu>,
Venkateswararao Jujjuri <jvrao@...ibm.com>,
linux-kernel@...r.kernel.org,
Tilman Sauerbeck <tilman@...e-monkey.de>,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] 9p: strlen() doesn't count the terminator
On Mon, Jul 12, 2010 at 01:04:58PM -0700, Andrew Morton wrote:
> > diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
> > index 98ce9bc..c85109d 100644
> > --- a/net/9p/trans_fd.c
> > +++ b/net/9p/trans_fd.c
> > @@ -948,7 +948,7 @@ p9_fd_create_unix(struct p9_client *client, const char *addr, char *args)
> >
> > csocket = NULL;
> >
> > - if (strlen(addr) > UNIX_PATH_MAX) {
> > + if (strlen(addr) >= UNIX_PATH_MAX) {
> > P9_EPRINTK(KERN_ERR, "p9_trans_unix: address too long: %s\n",
> > addr);
> > return -ENAMETOOLONG;
>
> This bug doesn't strike me as serious enough to warrant backporting the fix
> into -stable. What was your thinking there?
I don't feel strongly about it. It's safe enough and it applies
cleanly. On the other hand, root should always control the name of the
device to mount so it's not a big deal.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists