From: Joel Becker <Joel.Becker@oracle.com>
To: Julia Lawall <julia@diku.dk>
Cc: Mark Fasheh <mfasheh@suse.com>,
ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 8/10] fs/ocfs2/dlm: Use kstrdup
Date: Tue, 18 May 2010 19:32:41 +0000 [thread overview]
Message-ID: <20100518193241.GE3239@mail.oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1005142130310.28935@ask.diku.dk>
On Fri, May 14, 2010 at 09:30:48PM +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> Use kstrdup when the goal of an allocation is copy a string into the
> allocated region.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression from,to;
> expression flag,E1,E2;
> statement S;
> @@
>
> - to = kmalloc(strlen(from) + 1,flag);
> + to = kstrdup(from, flag);
> ... when != \(from = E1 \| to = E1 \)
> if (to=NULL || ...) S
> ... when != \(from = E2 \| to = E2 \)
> - strcpy(to, from);
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
This patch is now in the merge-window branch of ocfs2.git.
Joel
--
"If you are ever in doubt as to whether or not to kiss a pretty girl,
give her the benefit of the doubt"
-Thomas Carlyle
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
WARNING: multiple messages have this Message-ID (diff)
From: Joel Becker <Joel.Becker@oracle.com>
To: Julia Lawall <julia@diku.dk>
Cc: Mark Fasheh <mfasheh@suse.com>,
ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [Ocfs2-devel] [PATCH 8/10] fs/ocfs2/dlm: Use kstrdup
Date: Tue, 18 May 2010 12:32:41 -0700 [thread overview]
Message-ID: <20100518193241.GE3239@mail.oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1005142130310.28935@ask.diku.dk>
On Fri, May 14, 2010 at 09:30:48PM +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> Use kstrdup when the goal of an allocation is copy a string into the
> allocated region.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression from,to;
> expression flag,E1,E2;
> statement S;
> @@
>
> - to = kmalloc(strlen(from) + 1,flag);
> + to = kstrdup(from, flag);
> ... when != \(from = E1 \| to = E1 \)
> if (to==NULL || ...) S
> ... when != \(from = E2 \| to = E2 \)
> - strcpy(to, from);
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
This patch is now in the merge-window branch of ocfs2.git.
Joel
--
"If you are ever in doubt as to whether or not to kiss a pretty girl,
give her the benefit of the doubt"
-Thomas Carlyle
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
WARNING: multiple messages have this Message-ID (diff)
From: Joel Becker <Joel.Becker@oracle.com>
To: Julia Lawall <julia@diku.dk>
Cc: Mark Fasheh <mfasheh@suse.com>,
ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 8/10] fs/ocfs2/dlm: Use kstrdup
Date: Tue, 18 May 2010 12:32:41 -0700 [thread overview]
Message-ID: <20100518193241.GE3239@mail.oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1005142130310.28935@ask.diku.dk>
On Fri, May 14, 2010 at 09:30:48PM +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> Use kstrdup when the goal of an allocation is copy a string into the
> allocated region.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression from,to;
> expression flag,E1,E2;
> statement S;
> @@
>
> - to = kmalloc(strlen(from) + 1,flag);
> + to = kstrdup(from, flag);
> ... when != \(from = E1 \| to = E1 \)
> if (to==NULL || ...) S
> ... when != \(from = E2 \| to = E2 \)
> - strcpy(to, from);
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
This patch is now in the merge-window branch of ocfs2.git.
Joel
--
"If you are ever in doubt as to whether or not to kiss a pretty girl,
give her the benefit of the doubt"
-Thomas Carlyle
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2010-05-18 19:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-14 19:30 [PATCH 8/10] fs/ocfs2/dlm: Use kstrdup Julia Lawall
2010-05-14 19:30 ` [Ocfs2-devel] " Julia Lawall
2010-05-14 19:30 ` Julia Lawall
2010-05-14 20:06 ` Joel Becker
2010-05-14 20:06 ` Joel Becker
2010-05-14 20:06 ` [Ocfs2-devel] " Joel Becker
2010-05-18 19:32 ` Joel Becker [this message]
2010-05-18 19:32 ` Joel Becker
2010-05-18 19:32 ` [Ocfs2-devel] " Joel Becker
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=20100518193241.GE3239@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.