Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: add missing end-of-options record for trans_fd
9p: return NULL when trans not found
9p: use copy of the options value instead of original
9p: fix memory leak in v9fs_get_sb

+11 -5
+4 -2
fs/9p/v9fs.c
··· 82 82 83 83 static void v9fs_parse_options(struct v9fs_session_info *v9ses) 84 84 { 85 - char *options = v9ses->options; 85 + char *options; 86 86 substring_t args[MAX_OPT_ARGS]; 87 87 char *p; 88 88 int option; ··· 96 96 v9ses->cache = 0; 97 97 v9ses->trans = v9fs_default_trans(); 98 98 99 - if (!options) 99 + if (!v9ses->options) 100 100 return; 101 101 102 + options = kstrdup(v9ses->options, GFP_KERNEL); 102 103 while ((p = strsep(&options, ",")) != NULL) { 103 104 int token; 104 105 if (!*p) ··· 170 169 continue; 171 170 } 172 171 } 172 + kfree(options); 173 173 } 174 174 175 175 /**
+3
fs/9p/vfs_super.c
··· 119 119 120 120 P9_DPRINTK(P9_DEBUG_VFS, " \n"); 121 121 122 + st = NULL; 122 123 v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); 123 124 if (!v9ses) 124 125 return -ENOMEM; ··· 165 164 root->d_inode->i_ino = v9fs_qid2ino(&st->qid); 166 165 v9fs_stat2inode(st, root->d_inode, sb); 167 166 v9fs_fid_add(root, fid); 167 + kfree(st); 168 168 169 169 return simple_set_mnt(mnt, sb); 170 170 171 171 error: 172 + kfree(st); 172 173 if (fid) 173 174 p9_client_clunk(fid); 174 175
+2 -2
net/9p/mod.c
··· 76 76 list_for_each(p, &v9fs_trans_list) { 77 77 t = list_entry(p, struct p9_trans_module, list); 78 78 if (strncmp(t->name, name->from, name->to-name->from) == 0) 79 - break; 79 + return t; 80 80 } 81 - return t; 81 + return NULL; 82 82 } 83 83 EXPORT_SYMBOL(v9fs_match_trans); 84 84
+2 -1
net/9p/trans_fd.c
··· 62 62 63 63 enum { 64 64 /* Options that take integer arguments */ 65 - Opt_port, Opt_rfdno, Opt_wfdno, 65 + Opt_port, Opt_rfdno, Opt_wfdno, Opt_err, 66 66 }; 67 67 68 68 static match_table_t tokens = { 69 69 {Opt_port, "port=%u"}, 70 70 {Opt_rfdno, "rfdno=%u"}, 71 71 {Opt_wfdno, "wfdno=%u"}, 72 + {Opt_err, NULL}, 72 73 }; 73 74 74 75 /**