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 remote-tracking branch 'torvalds/master' into perf/core

Synch with upstream, to pick up recent developments.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+50 -68
+4
drivers/gpio/gpiolib-cdev.c
··· 421 421 * @work: the worker that implements software debouncing 422 422 * @sw_debounced: flag indicating if the software debouncer is active 423 423 * @level: the current debounced physical level of the line 424 + * @hdesc: the Hardware Timestamp Engine (HTE) descriptor 425 + * @raw_level: the line level at the time of event 426 + * @total_discard_seq: the running counter of the discarded events 427 + * @last_seqno: the last sequence number before debounce period expires 424 428 */ 425 429 struct line { 426 430 struct gpio_desc *desc;
-50
drivers/infiniband/hw/irdma/cm.c
··· 4231 4231 struct irdma_cm_node *cm_node; 4232 4232 struct list_head teardown_list; 4233 4233 struct ib_qp_attr attr; 4234 - struct irdma_sc_vsi *vsi = &iwdev->vsi; 4235 - struct irdma_sc_qp *sc_qp; 4236 - struct irdma_qp *qp; 4237 - int i; 4238 4234 4239 4235 INIT_LIST_HEAD(&teardown_list); 4240 4236 ··· 4246 4250 if (iwdev->rf->reset) 4247 4251 irdma_cm_disconn(cm_node->iwqp); 4248 4252 irdma_rem_ref_cm_node(cm_node); 4249 - } 4250 - if (!iwdev->roce_mode) 4251 - return; 4252 - 4253 - INIT_LIST_HEAD(&teardown_list); 4254 - for (i = 0; i < IRDMA_MAX_USER_PRIORITY; i++) { 4255 - mutex_lock(&vsi->qos[i].qos_mutex); 4256 - list_for_each_safe (list_node, list_core_temp, 4257 - &vsi->qos[i].qplist) { 4258 - u32 qp_ip[4]; 4259 - 4260 - sc_qp = container_of(list_node, struct irdma_sc_qp, 4261 - list); 4262 - if (sc_qp->qp_uk.qp_type != IRDMA_QP_TYPE_ROCE_RC) 4263 - continue; 4264 - 4265 - qp = sc_qp->qp_uk.back_qp; 4266 - if (!disconnect_all) { 4267 - if (nfo->ipv4) 4268 - qp_ip[0] = qp->udp_info.local_ipaddr[3]; 4269 - else 4270 - memcpy(qp_ip, 4271 - &qp->udp_info.local_ipaddr[0], 4272 - sizeof(qp_ip)); 4273 - } 4274 - 4275 - if (disconnect_all || 4276 - (nfo->vlan_id == (qp->udp_info.vlan_tag & VLAN_VID_MASK) && 4277 - !memcmp(qp_ip, ipaddr, nfo->ipv4 ? 4 : 16))) { 4278 - spin_lock(&iwdev->rf->qptable_lock); 4279 - if (iwdev->rf->qp_table[sc_qp->qp_uk.qp_id]) { 4280 - irdma_qp_add_ref(&qp->ibqp); 4281 - list_add(&qp->teardown_entry, 4282 - &teardown_list); 4283 - } 4284 - spin_unlock(&iwdev->rf->qptable_lock); 4285 - } 4286 - } 4287 - mutex_unlock(&vsi->qos[i].qos_mutex); 4288 - } 4289 - 4290 - list_for_each_safe (list_node, list_core_temp, &teardown_list) { 4291 - qp = container_of(list_node, struct irdma_qp, teardown_entry); 4292 - attr.qp_state = IB_QPS_ERR; 4293 - irdma_modify_qp_roce(&qp->ibqp, &attr, IB_QP_STATE, NULL); 4294 - irdma_qp_rem_ref(&qp->ibqp); 4295 4253 } 4296 4254 } 4297 4255
+1
drivers/infiniband/hw/irdma/i40iw_hw.c
··· 201 201 dev->hw_attrs.uk_attrs.max_hw_read_sges = I40IW_MAX_SGE_RD; 202 202 dev->hw_attrs.max_hw_device_pages = I40IW_MAX_PUSH_PAGE_COUNT; 203 203 dev->hw_attrs.uk_attrs.max_hw_inline = I40IW_MAX_INLINE_DATA_SIZE; 204 + dev->hw_attrs.page_size_cap = SZ_4K | SZ_2M; 204 205 dev->hw_attrs.max_hw_ird = I40IW_MAX_IRD_SIZE; 205 206 dev->hw_attrs.max_hw_ord = I40IW_MAX_ORD_SIZE; 206 207 dev->hw_attrs.max_hw_wqes = I40IW_MAX_WQ_ENTRIES;
+1
drivers/infiniband/hw/irdma/icrdma_hw.c
··· 139 139 dev->cqp_db = dev->hw_regs[IRDMA_CQPDB]; 140 140 dev->cq_ack_db = dev->hw_regs[IRDMA_CQACK]; 141 141 dev->irq_ops = &icrdma_irq_ops; 142 + dev->hw_attrs.page_size_cap = SZ_4K | SZ_2M | SZ_1G; 142 143 dev->hw_attrs.max_hw_ird = ICRDMA_MAX_IRD_SIZE; 143 144 dev->hw_attrs.max_hw_ord = ICRDMA_MAX_ORD_SIZE; 144 145 dev->hw_attrs.max_stat_inst = ICRDMA_MAX_STATS_COUNT;
+1
drivers/infiniband/hw/irdma/irdma.h
··· 127 127 u64 max_hw_outbound_msg_size; 128 128 u64 max_hw_inbound_msg_size; 129 129 u64 max_mr_size; 130 + u64 page_size_cap; 130 131 u32 min_hw_qp_id; 131 132 u32 min_hw_aeq_size; 132 133 u32 max_hw_aeq_size;
+2 -2
drivers/infiniband/hw/irdma/verbs.c
··· 32 32 props->vendor_part_id = pcidev->device; 33 33 34 34 props->hw_ver = rf->pcidev->revision; 35 - props->page_size_cap = SZ_4K | SZ_2M | SZ_1G; 35 + props->page_size_cap = hw_attrs->page_size_cap; 36 36 props->max_mr_size = hw_attrs->max_mr_size; 37 37 props->max_qp = rf->max_qp - rf->used_qps; 38 38 props->max_qp_wr = hw_attrs->max_qp_wr; ··· 2781 2781 2782 2782 if (req.reg_type == IRDMA_MEMREG_TYPE_MEM) { 2783 2783 iwmr->page_size = ib_umem_find_best_pgsz(region, 2784 - SZ_4K | SZ_2M | SZ_1G, 2784 + iwdev->rf->sc_dev.hw_attrs.page_size_cap, 2785 2785 virt); 2786 2786 if (unlikely(!iwmr->page_size)) { 2787 2787 kfree(iwmr);
+37 -16
kernel/watch_queue.c
··· 34 34 #define WATCH_QUEUE_NOTE_SIZE 128 35 35 #define WATCH_QUEUE_NOTES_PER_PAGE (PAGE_SIZE / WATCH_QUEUE_NOTE_SIZE) 36 36 37 + /* 38 + * This must be called under the RCU read-lock, which makes 39 + * sure that the wqueue still exists. It can then take the lock, 40 + * and check that the wqueue hasn't been destroyed, which in 41 + * turn makes sure that the notification pipe still exists. 42 + */ 43 + static inline bool lock_wqueue(struct watch_queue *wqueue) 44 + { 45 + spin_lock_bh(&wqueue->lock); 46 + if (unlikely(wqueue->defunct)) { 47 + spin_unlock_bh(&wqueue->lock); 48 + return false; 49 + } 50 + return true; 51 + } 52 + 53 + static inline void unlock_wqueue(struct watch_queue *wqueue) 54 + { 55 + spin_unlock_bh(&wqueue->lock); 56 + } 57 + 37 58 static void watch_queue_pipe_buf_release(struct pipe_inode_info *pipe, 38 59 struct pipe_buffer *buf) 39 60 { ··· 90 69 91 70 /* 92 71 * Post a notification to a watch queue. 72 + * 73 + * Must be called with the RCU lock for reading, and the 74 + * watch_queue lock held, which guarantees that the pipe 75 + * hasn't been released. 93 76 */ 94 77 static bool post_one_notification(struct watch_queue *wqueue, 95 78 struct watch_notification *n) ··· 109 84 return false; 110 85 111 86 spin_lock_irq(&pipe->rd_wait.lock); 112 - 113 - if (wqueue->defunct) 114 - goto out; 115 87 116 88 mask = pipe->ring_size - 1; 117 89 head = pipe->head; ··· 225 203 if (security_post_notification(watch->cred, cred, n) < 0) 226 204 continue; 227 205 228 - post_one_notification(wqueue, n); 206 + if (lock_wqueue(wqueue)) { 207 + post_one_notification(wqueue, n); 208 + unlock_wqueue(wqueue);; 209 + } 229 210 } 230 211 231 212 rcu_read_unlock(); ··· 487 462 return -EAGAIN; 488 463 } 489 464 490 - spin_lock_bh(&wqueue->lock); 491 - kref_get(&wqueue->usage); 492 - kref_get(&watch->usage); 493 - hlist_add_head(&watch->queue_node, &wqueue->watches); 494 - spin_unlock_bh(&wqueue->lock); 465 + if (lock_wqueue(wqueue)) { 466 + kref_get(&wqueue->usage); 467 + kref_get(&watch->usage); 468 + hlist_add_head(&watch->queue_node, &wqueue->watches); 469 + unlock_wqueue(wqueue); 470 + } 495 471 496 472 hlist_add_head(&watch->list_node, &wlist->watchers); 497 473 return 0; ··· 546 520 547 521 wqueue = rcu_dereference(watch->queue); 548 522 549 - /* We don't need the watch list lock for the next bit as RCU is 550 - * protecting *wqueue from deallocation. 551 - */ 552 - if (wqueue) { 523 + if (lock_wqueue(wqueue)) { 553 524 post_one_notification(wqueue, &n.watch); 554 - 555 - spin_lock_bh(&wqueue->lock); 556 525 557 526 if (!hlist_unhashed(&watch->queue_node)) { 558 527 hlist_del_init_rcu(&watch->queue_node); 559 528 put_watch(watch); 560 529 } 561 530 562 - spin_unlock_bh(&wqueue->lock); 531 + unlock_wqueue(wqueue); 563 532 } 564 533 565 534 if (wlist->release_watch) {
+4
security/integrity/ima/ima_policy.c
··· 2247 2247 if (id >= READING_MAX_ID) 2248 2248 return false; 2249 2249 2250 + if (id == READING_KEXEC_IMAGE && !(ima_appraise & IMA_APPRAISE_ENFORCE) 2251 + && security_locked_down(LOCKDOWN_KEXEC)) 2252 + return false; 2253 + 2250 2254 func = read_idmap[id] ?: FILE_CHECK; 2251 2255 2252 2256 rcu_read_lock();