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 'ceph-for-5.4-rc4' of git://github.com/ceph/ceph-client

Pull ceph fixes from Ilya Dryomov:
"A future-proofing decoding fix from Jeff intended for stable and a
patch for a mostly benign race from Dongsheng"

* tag 'ceph-for-5.4-rc4' of git://github.com/ceph/ceph-client:
rbd: cancel lock_dwork if the wait is interrupted
ceph: just skip unrecognized info in ceph_reply_info_extra

+17 -13
+6 -3
drivers/block/rbd.c
··· 6639 6639 queue_delayed_work(rbd_dev->task_wq, &rbd_dev->lock_dwork, 0); 6640 6640 ret = wait_for_completion_killable_timeout(&rbd_dev->acquire_wait, 6641 6641 ceph_timeout_jiffies(rbd_dev->opts->lock_timeout)); 6642 - if (ret > 0) 6642 + if (ret > 0) { 6643 6643 ret = rbd_dev->acquire_err; 6644 - else if (!ret) 6645 - ret = -ETIMEDOUT; 6644 + } else { 6645 + cancel_delayed_work_sync(&rbd_dev->lock_dwork); 6646 + if (!ret) 6647 + ret = -ETIMEDOUT; 6648 + } 6646 6649 6647 6650 if (ret) { 6648 6651 rbd_warn(rbd_dev, "failed to acquire exclusive lock: %ld", ret);
+11 -10
fs/ceph/mds_client.c
··· 384 384 } 385 385 386 386 done: 387 - if (*p != end) 388 - goto bad; 387 + /* Skip over any unrecognized fields */ 388 + *p = end; 389 389 return 0; 390 390 391 391 bad: ··· 406 406 goto bad; 407 407 408 408 info->filelock_reply = *p; 409 - *p += sizeof(*info->filelock_reply); 410 409 411 - if (unlikely(*p != end)) 412 - goto bad; 410 + /* Skip over any unrecognized fields */ 411 + *p = end; 413 412 return 0; 414 - 415 413 bad: 416 414 return -EIO; 417 415 } ··· 423 425 { 424 426 if (features == (u64)-1 || 425 427 (features & CEPH_FEATURE_REPLY_CREATE_INODE)) { 428 + /* Malformed reply? */ 426 429 if (*p == end) { 427 430 info->has_create_ino = false; 428 431 } else { 429 432 info->has_create_ino = true; 430 - info->ino = ceph_decode_64(p); 433 + ceph_decode_64_safe(p, end, info->ino, bad); 431 434 } 435 + } else { 436 + if (*p != end) 437 + goto bad; 432 438 } 433 439 434 - if (unlikely(*p != end)) 435 - goto bad; 440 + /* Skip over any unrecognized fields */ 441 + *p = end; 436 442 return 0; 437 - 438 443 bad: 439 444 return -EIO; 440 445 }