diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-09 14:19:06 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-09 14:19:06 -0500 |
| commit | 3af9cf11b6efb82aa7a1a24e2382b75d43631c4e (patch) | |
| tree | 506a491c1f46f20a07da2ff16603259427bec79d /net/9p/trans_fd.c | |
| parent | deb0c98c7f6035d47a247e548384517a955314a5 (diff) | |
| parent | 8781ff9495578dbb74065fae55305110d9f81cb9 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
9p: fix p9_client_destroy unconditional calling v9fs_put_trans
9p: fix memory leak in v9fs_parse_options()
9p: Fix the kernel crash on a failed mount
9p: fix option parsing
9p: Include fsync support for 9p client
net/9p: fix statsize inside twstat
net/9p: fail when user specifies a transport which we can't find
net/9p: fix virtio transport to correctly update status on connect
Diffstat (limited to 'net/9p/trans_fd.c')
| -rw-r--r-- | net/9p/trans_fd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index be1cb909d8c0..31d0b05582a9 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c | |||
| @@ -714,7 +714,7 @@ static int parse_opts(char *params, struct p9_fd_opts *opts) | |||
| 714 | char *p; | 714 | char *p; |
| 715 | substring_t args[MAX_OPT_ARGS]; | 715 | substring_t args[MAX_OPT_ARGS]; |
| 716 | int option; | 716 | int option; |
| 717 | char *options; | 717 | char *options, *tmp_options; |
| 718 | int ret; | 718 | int ret; |
| 719 | 719 | ||
| 720 | opts->port = P9_PORT; | 720 | opts->port = P9_PORT; |
| @@ -724,12 +724,13 @@ static int parse_opts(char *params, struct p9_fd_opts *opts) | |||
| 724 | if (!params) | 724 | if (!params) |
| 725 | return 0; | 725 | return 0; |
| 726 | 726 | ||
| 727 | options = kstrdup(params, GFP_KERNEL); | 727 | tmp_options = kstrdup(params, GFP_KERNEL); |
| 728 | if (!options) { | 728 | if (!tmp_options) { |
| 729 | P9_DPRINTK(P9_DEBUG_ERROR, | 729 | P9_DPRINTK(P9_DEBUG_ERROR, |
| 730 | "failed to allocate copy of option string\n"); | 730 | "failed to allocate copy of option string\n"); |
| 731 | return -ENOMEM; | 731 | return -ENOMEM; |
| 732 | } | 732 | } |
| 733 | options = tmp_options; | ||
| 733 | 734 | ||
| 734 | while ((p = strsep(&options, ",")) != NULL) { | 735 | while ((p = strsep(&options, ",")) != NULL) { |
| 735 | int token; | 736 | int token; |
| @@ -760,7 +761,8 @@ static int parse_opts(char *params, struct p9_fd_opts *opts) | |||
| 760 | continue; | 761 | continue; |
| 761 | } | 762 | } |
| 762 | } | 763 | } |
| 763 | kfree(options); | 764 | |
| 765 | kfree(tmp_options); | ||
| 764 | return 0; | 766 | return 0; |
| 765 | } | 767 | } |
| 766 | 768 | ||
