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-6.19-rc5' of https://github.com/ceph/ceph-client

Pull ceph fixes from Ilya Dryomov:
"A bunch of libceph fixes split evenly between memory safety and
implementation correctness issues (all marked for stable) and a change
in maintainers for CephFS: Slava and Alex have formally taken over
Xiubo's role"

* tag 'ceph-for-6.19-rc5' of https://github.com/ceph/ceph-client:
libceph: make calc_target() set t->paused, not just clear it
libceph: reset sparse-read state in osd_fault()
libceph: return the handler error from mon_handle_auth_done()
libceph: make free_choose_arg_map() resilient to partial allocation
ceph: update co-maintainers list in MAINTAINERS
libceph: replace overzealous BUG_ON in osdmap_apply_incremental()
libceph: prevent potential out-of-bounds reads in handle_auth_done()

+34 -14
+4 -2
MAINTAINERS
··· 5802 5802 5803 5803 CEPH COMMON CODE (LIBCEPH) 5804 5804 M: Ilya Dryomov <idryomov@gmail.com> 5805 - M: Xiubo Li <xiubli@redhat.com> 5805 + M: Alex Markuze <amarkuze@redhat.com> 5806 + M: Viacheslav Dubeyko <slava@dubeyko.com> 5806 5807 L: ceph-devel@vger.kernel.org 5807 5808 S: Supported 5808 5809 W: http://ceph.com/ ··· 5814 5813 F: net/ceph/ 5815 5814 5816 5815 CEPH DISTRIBUTED FILE SYSTEM CLIENT (CEPH) 5817 - M: Xiubo Li <xiubli@redhat.com> 5818 5816 M: Ilya Dryomov <idryomov@gmail.com> 5817 + M: Alex Markuze <amarkuze@redhat.com> 5818 + M: Viacheslav Dubeyko <slava@dubeyko.com> 5819 5819 L: ceph-devel@vger.kernel.org 5820 5820 S: Supported 5821 5821 W: http://ceph.com/
+2
net/ceph/messenger_v2.c
··· 2376 2376 2377 2377 ceph_decode_64_safe(&p, end, global_id, bad); 2378 2378 ceph_decode_32_safe(&p, end, con->v2.con_mode, bad); 2379 + 2379 2380 ceph_decode_32_safe(&p, end, payload_len, bad); 2381 + ceph_decode_need(&p, end, payload_len, bad); 2380 2382 2381 2383 dout("%s con %p global_id %llu con_mode %d payload_len %d\n", 2382 2384 __func__, con, global_id, con->v2.con_mode, payload_len);
+1 -1
net/ceph/mon_client.c
··· 1417 1417 if (!ret) 1418 1418 finish_hunting(monc); 1419 1419 mutex_unlock(&monc->mutex); 1420 - return 0; 1420 + return ret; 1421 1421 } 1422 1422 1423 1423 static int mon_handle_auth_bad_method(struct ceph_connection *con,
+12 -2
net/ceph/osd_client.c
··· 1586 1586 struct ceph_pg_pool_info *pi; 1587 1587 struct ceph_pg pgid, last_pgid; 1588 1588 struct ceph_osds up, acting; 1589 + bool should_be_paused; 1589 1590 bool is_read = t->flags & CEPH_OSD_FLAG_READ; 1590 1591 bool is_write = t->flags & CEPH_OSD_FLAG_WRITE; 1591 1592 bool force_resend = false; ··· 1655 1654 &last_pgid)) 1656 1655 force_resend = true; 1657 1656 1658 - if (t->paused && !target_should_be_paused(osdc, t, pi)) { 1659 - t->paused = false; 1657 + should_be_paused = target_should_be_paused(osdc, t, pi); 1658 + if (t->paused && !should_be_paused) { 1660 1659 unpaused = true; 1661 1660 } 1661 + if (t->paused != should_be_paused) { 1662 + dout("%s t %p paused %d -> %d\n", __func__, t, t->paused, 1663 + should_be_paused); 1664 + t->paused = should_be_paused; 1665 + } 1666 + 1662 1667 legacy_change = ceph_pg_compare(&t->pgid, &pgid) || 1663 1668 ceph_osds_changed(&t->acting, &acting, 1664 1669 t->used_replica || any_change); ··· 4287 4280 dout("%s osd%d unknown\n", __func__, osd->o_osd); 4288 4281 goto out_unlock; 4289 4282 } 4283 + 4284 + osd->o_sparse_op_idx = -1; 4285 + ceph_init_sparse_read(&osd->o_sparse_read); 4290 4286 4291 4287 if (!reopen_osd(osd)) 4292 4288 kick_osd_requests(osd);
+15 -9
net/ceph/osdmap.c
··· 241 241 242 242 static void free_choose_arg_map(struct crush_choose_arg_map *arg_map) 243 243 { 244 - if (arg_map) { 245 - int i, j; 244 + int i, j; 246 245 247 - WARN_ON(!RB_EMPTY_NODE(&arg_map->node)); 246 + if (!arg_map) 247 + return; 248 248 249 + WARN_ON(!RB_EMPTY_NODE(&arg_map->node)); 250 + 251 + if (arg_map->args) { 249 252 for (i = 0; i < arg_map->size; i++) { 250 253 struct crush_choose_arg *arg = &arg_map->args[i]; 251 - 252 - for (j = 0; j < arg->weight_set_size; j++) 253 - kfree(arg->weight_set[j].weights); 254 - kfree(arg->weight_set); 254 + if (arg->weight_set) { 255 + for (j = 0; j < arg->weight_set_size; j++) 256 + kfree(arg->weight_set[j].weights); 257 + kfree(arg->weight_set); 258 + } 255 259 kfree(arg->ids); 256 260 } 257 261 kfree(arg_map->args); 258 - kfree(arg_map); 259 262 } 263 + kfree(arg_map); 260 264 } 261 265 262 266 DEFINE_RB_FUNCS(choose_arg_map, struct crush_choose_arg_map, choose_args_index, ··· 1983 1979 sizeof(u64) + sizeof(u32), e_inval); 1984 1980 ceph_decode_copy(p, &fsid, sizeof(fsid)); 1985 1981 epoch = ceph_decode_32(p); 1986 - BUG_ON(epoch != map->epoch+1); 1987 1982 ceph_decode_copy(p, &modified, sizeof(modified)); 1988 1983 new_pool_max = ceph_decode_64(p); 1989 1984 new_flags = ceph_decode_32(p); 1985 + 1986 + if (epoch != map->epoch + 1) 1987 + goto e_inval; 1990 1988 1991 1989 /* full map? */ 1992 1990 ceph_decode_32_safe(p, end, len, e_inval);