1. 27 7月, 2023 4 次提交
  2. 26 7月, 2023 3 次提交
    • O
      !1441 workqueue: fix sanity check warning when invoke destroy_workqueue() · 6b33e607
      openeuler-ci-bot 提交于
      Merge Pull Request from: @henryze 
       
      https://gitee.com/openeuler/kernel/issues/I7LRJF?from=project-issue
      
      The warning logs are listed below:
      
      WARNING: CPU: 0 PID: 19336 at kernel/workqueue.c:4430 destroy_workqueue+0x11a/0x2f0
      *****
      destroy_workqueue: test_workqueue9 has the following busy pwq
        pwq 4: cpus=2 node=0 flags=0x0 nice=0 active=0/1 refcnt=2
            in-flight: 5658:wq_barrier_func
      Showing busy workqueues and worker pools:
      *****
      
      It shows that even after drain_workqueue() returns, the barrier work item
      is still in flight and the pwq (and a worker) is still busy on it.
      
      The problem is caused by drain_workqueue() not watching flush_work():
      ~~~
      Thread A				Worker
      					/* normal work item with linked */
      					process_scheduled_works()
      destroy_workqueue()			  process_one_work()
        drain_workqueue()			    /* run normal work item */
      				 /--	    pwq_dec_nr_in_flight()
          flush_workqueue()	    <---/
      		/* the last normal work item is done */
        sanity_check				  process_one_work()
      				       /--  raw_spin_unlock_irq(&pool->lock)
          raw_spin_lock_irq(&pool->lock)  <-/     /* maybe preempt */
          *WARNING*				    wq_barrier_func()
      					    /* maybe preempt by cond_resched() */
      ~~~
      So the solution is to make drain_workqueue() watch for flush_work() which
      means making flush_workqueue() watch for flush_work().
      
      Due to historical convenience, we used WORK_NO_COLOR for barrier work items
      queued by flush_work().  The color has two purposes:
      	Not participate in flushing
      	Not participate in nr_active
      
      Only the second purpose is obligatory.  So the plan is to mark barrier
      work items inactive without using WORK_NO_COLOR in patch4 so that we can
      assign a flushing color to them in patch5.
      
      Patch1-3 are preparation, and patch6 is a cleanup.
      
      Test steps:
      insmod wq_issue.ko
      rmmod wq_issue
      
      ~~~
      # insmod wq_issue.ko
      [   14.061088] wq_issue: loading out-of-tree module taints kernel.
      [   14.070509] wq_test_init
      [   14.072112] wq_test_init done
      [   14.074035] insmod (92) used greatest stack depth: 13840 bytes left
      /tmp # rmmod wq_issue.ko
      [   24.489421] wq_test_exit done
      /tmp # uname -a
      Linux (none) 5.10.0+ #10 SMP Wed Jul 26 15:48:31 CST 2023 x86_64 GNU/Linux
      ~~~ 
       
      Link:https://gitee.com/openeuler/kernel/pulls/1441 
      
      Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> 
      Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
      6b33e607
    • O
      !1506 Backport 5.10.157 LTS patches from upstream · 0c40bf67
      openeuler-ci-bot 提交于
      Merge Pull Request from: @sanglipeng 
       
      Backport 5.10.157 LTS patches from upstream.
      
      Conflicts:
      
      context confilict(1):  
      23c03ee0eec4: rxrpc: Use refcount_t rather than atomic_t
      
      Already merged(19):
      3535c632e6d1: rxrpc: Fix race between conn bundle lookup and bundle removal [ZDI-CAN-15975]
      e87a077d09c0: tipc: set con sock in tipc_conn_alloc
      4058e3b74ab3: tipc: add an extra conn_get in tipc_conn_alloc
      23e9d815fad8: binder: avoid potential data leakage when copying txn
      5204296fc766: binder: read pre-translated fds from sender buffer
      c9d3f25a7f4e: binder: defer copies of pre-patched txn data
      2e3c27f24173: binder: fix pointer cast warning
      017de842533f: binder: Address corner cases in deferred copy and fixup
      ae9e0cc973fb: binder: Gracefully handle BINDER_TYPE_FDA objects with num_fds=0
      7c6535fb4d67: wifi: wilc1000: validate pairwise and authentication suite offsets
      905f886eae4b: wifi: wilc1000: validate length of IEEE80211_P2P_ATTR_OPER_CHANNEL attribute
      5a068535c007: wifi: wilc1000: validate length of IEEE80211_P2P_ATTR_CHANNEL_LIST attribute
      3eb6b89a4e9f: wifi: wilc1000: validate number of channels
      86f0082fb947: drm/i915: fix TLB invalidation for Gen12 video and compute engines
      fa5f2c72d39f: block, bfq: fix null pointer dereference in bfq_bio_bfqg()
      86ba9c859577: ext4: fix use-after-free in ext4_ext_shift_extents
      e0d2c59ee995: genirq: Always limit the affinity to online CPUs
      9d90a2b98e6e: irqchip/gic-v3: Always trust the managed affinity provided by the core code
      b56d6e55857b: genirq: Take the proposed affinity at face value if force==true
      
      Rejected(2):
      f8f80d532f78: genirq/msi: Shutdown managed interrupts with unsatifiable affinities
      497653f6d239: xfrm: fix "disable_policy" on ipv4 early demux
      
      Total patches: 158 - 19 -2  = 137
       
       
      Link:https://gitee.com/openeuler/kernel/pulls/1506 
      
      Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> 
      Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
      0c40bf67
    • O
      !1488 RDMA/hns: Remove unnecessary QP type checks · 4e4284a7
      openeuler-ci-bot 提交于
      Merge Pull Request from: @stinft 
       
      https://gitee.com/openeuler/kernel/issues/I7MIUU 
       
      Link:https://gitee.com/openeuler/kernel/pulls/1488 
      
      Reviewed-by: Chengchang Tang <tangchengchang@huawei.com> 
      Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
      4e4284a7
  3. 25 7月, 2023 33 次提交