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 'upstream-4.19-rc4' of git://git.infradead.org/linux-ubifs

Richard writes:
"This pull request contains fixes for UBIFS:
- A wrong UBIFS assertion in mount code
- Fix for a NULL pointer deref in mount code
- Revert of a bad fix for xattrs"

* tag 'upstream-4.19-rc4' of git://git.infradead.org/linux-ubifs:
Revert "ubifs: xattr: Don't operate on deleted inodes"
ubifs: drop false positive assertion
ubifs: Check for name being NULL while mounting

+6 -25
+6 -1
fs/ubifs/super.c
··· 1912 1912 mutex_unlock(&c->bu_mutex); 1913 1913 } 1914 1914 1915 - ubifs_assert(c, c->lst.taken_empty_lebs > 0); 1915 + if (!c->need_recovery) 1916 + ubifs_assert(c, c->lst.taken_empty_lebs > 0); 1917 + 1916 1918 return 0; 1917 1919 } 1918 1920 ··· 1955 1953 struct ubi_volume_desc *ubi; 1956 1954 int dev, vol; 1957 1955 char *endptr; 1956 + 1957 + if (!name || !*name) 1958 + return ERR_PTR(-EINVAL); 1958 1959 1959 1960 /* First, try to open using the device node path method */ 1960 1961 ubi = ubi_open_volume_path(name, mode);
-24
fs/ubifs/xattr.c
··· 152 152 ui->data_len = size; 153 153 154 154 mutex_lock(&host_ui->ui_mutex); 155 - 156 - if (!host->i_nlink) { 157 - err = -ENOENT; 158 - goto out_noent; 159 - } 160 - 161 155 host->i_ctime = current_time(host); 162 156 host_ui->xattr_cnt += 1; 163 157 host_ui->xattr_size += CALC_DENT_SIZE(fname_len(nm)); ··· 184 190 host_ui->xattr_size -= CALC_XATTR_BYTES(size); 185 191 host_ui->xattr_names -= fname_len(nm); 186 192 host_ui->flags &= ~UBIFS_CRYPT_FL; 187 - out_noent: 188 193 mutex_unlock(&host_ui->ui_mutex); 189 194 out_free: 190 195 make_bad_inode(inode); ··· 235 242 mutex_unlock(&ui->ui_mutex); 236 243 237 244 mutex_lock(&host_ui->ui_mutex); 238 - 239 - if (!host->i_nlink) { 240 - err = -ENOENT; 241 - goto out_noent; 242 - } 243 - 244 245 host->i_ctime = current_time(host); 245 246 host_ui->xattr_size -= CALC_XATTR_BYTES(old_size); 246 247 host_ui->xattr_size += CALC_XATTR_BYTES(size); ··· 256 269 out_cancel: 257 270 host_ui->xattr_size -= CALC_XATTR_BYTES(size); 258 271 host_ui->xattr_size += CALC_XATTR_BYTES(old_size); 259 - out_noent: 260 272 mutex_unlock(&host_ui->ui_mutex); 261 273 make_bad_inode(inode); 262 274 out_free: ··· 482 496 return err; 483 497 484 498 mutex_lock(&host_ui->ui_mutex); 485 - 486 - if (!host->i_nlink) { 487 - err = -ENOENT; 488 - goto out_noent; 489 - } 490 - 491 499 host->i_ctime = current_time(host); 492 500 host_ui->xattr_cnt -= 1; 493 501 host_ui->xattr_size -= CALC_DENT_SIZE(fname_len(nm)); ··· 501 521 host_ui->xattr_size += CALC_DENT_SIZE(fname_len(nm)); 502 522 host_ui->xattr_size += CALC_XATTR_BYTES(ui->data_len); 503 523 host_ui->xattr_names += fname_len(nm); 504 - out_noent: 505 524 mutex_unlock(&host_ui->ui_mutex); 506 525 ubifs_release_budget(c, &req); 507 526 make_bad_inode(inode); ··· 539 560 int err; 540 561 541 562 ubifs_assert(c, inode_is_locked(host)); 542 - 543 - if (!host->i_nlink) 544 - return -ENOENT; 545 563 546 564 if (fname_len(&nm) > UBIFS_MAX_NLEN) 547 565 return -ENAMETOOLONG;