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 tag 'pull-tomoyo' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull misc tomoyo changes from Al Viro:
"A couple of assorted tomoyo patches"

* tag 'pull-tomoyo' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
tomoyo: struct path it might get from LSM callers won't have NULL dentry or mnt
tomoyo: use vsnprintf() properly

+5 -10
+1 -1
security/tomoyo/audit.c
··· 423 423 int len; 424 424 425 425 va_start(args, fmt); 426 - len = vsnprintf((char *) &len, 1, fmt, args) + 1; 426 + len = vsnprintf(NULL, 0, fmt, args) + 1; 427 427 va_end(args); 428 428 va_start(args, fmt); 429 429 tomoyo_write_log2(r, len, fmt, args);
+1 -1
security/tomoyo/common.c
··· 2057 2057 bool quota_exceeded = false; 2058 2058 2059 2059 va_start(args, fmt); 2060 - len = vsnprintf((char *) &len, 1, fmt, args) + 1; 2060 + len = vsnprintf(NULL, 0, fmt, args) + 1; 2061 2061 va_end(args); 2062 2062 /* Write /sys/kernel/security/tomoyo/audit. */ 2063 2063 va_start(args, fmt);
+1 -1
security/tomoyo/file.c
··· 717 717 int idx; 718 718 719 719 if (tomoyo_init_request_info(&r, NULL, tomoyo_pn2mac[type]) 720 - == TOMOYO_CONFIG_DISABLED || !path->dentry) 720 + == TOMOYO_CONFIG_DISABLED) 721 721 return 0; 722 722 idx = tomoyo_read_lock(); 723 723 if (!tomoyo_get_realpath(&buf, path))
+2 -7
security/tomoyo/realpath.c
··· 240 240 char *name = NULL; 241 241 unsigned int buf_len = PAGE_SIZE / 2; 242 242 struct dentry *dentry = path->dentry; 243 - struct super_block *sb; 243 + struct super_block *sb = dentry->d_sb; 244 244 245 - if (!dentry) 246 - return NULL; 247 - sb = dentry->d_sb; 248 245 while (1) { 249 246 char *pos; 250 247 struct inode *inode; ··· 261 264 inode = d_backing_inode(sb->s_root); 262 265 /* 263 266 * Get local name for filesystems without rename() operation 264 - * or dentry without vfsmount. 265 267 */ 266 - if (!path->mnt || 267 - (!inode->i_op->rename && 268 + if ((!inode->i_op->rename && 268 269 !(sb->s_type->fs_flags & FS_REQUIRES_DEV))) 269 270 pos = tomoyo_get_local_path(path->dentry, buf, 270 271 buf_len - 1);