| /linux/fs/smb/server/ |
| H A D | ksmbd_work.c | 21 struct ksmbd_work *work = kmem_cache_zalloc(work_cache, KSMBD_DEFAULT_GFP); in ksmbd_alloc_work_struct() local 23 if (work) { in ksmbd_alloc_work_struct() 24 work->compound_fid = KSMBD_NO_FID; in ksmbd_alloc_work_struct() 25 work->compound_pfid = KSMBD_NO_FID; in ksmbd_alloc_work_struct() 26 INIT_LIST_HEAD(&work->request_entry); in ksmbd_alloc_work_struct() 27 INIT_LIST_HEAD(&work->async_request_entry); in ksmbd_alloc_work_struct() 28 INIT_LIST_HEAD(&work->fp_entry); in ksmbd_alloc_work_struct() 29 INIT_LIST_HEAD(&work->aux_read_list); in ksmbd_alloc_work_struct() 30 work->iov_alloc_cnt = 4; in ksmbd_alloc_work_struct() 31 work->iov = kzalloc_objs(struct kvec, work->iov_alloc_cnt, in ksmbd_alloc_work_struct() [all …]
|
| H A D | server.c | 93 static inline int check_conn_state(struct ksmbd_work *work) in check_conn_state() argument 97 if (ksmbd_conn_exiting(work->conn) || in check_conn_state() 98 ksmbd_conn_need_reconnect(work->conn)) { in check_conn_state() 99 rsp_hdr = smb_get_msg(work->response_buf); in check_conn_state() 109 static int __process_request(struct ksmbd_work *work, struct ksmbd_conn *conn, in __process_request() argument 116 if (check_conn_state(work)) in __process_request() 119 if (ksmbd_verify_smb_message(work)) { in __process_request() 120 conn->ops->set_rsp_status(work, STATUS_INVALID_PARAMETER); in __process_request() 124 command = conn->ops->get_cmd_val(work); in __process_request() 129 conn->ops->set_rsp_status(work, STATUS_INVALID_PARAMETER); in __process_request() [all …]
|
| H A D | smb2pdu.h | 330 bool is_smb2_neg_cmd(struct ksmbd_work *work); 331 bool is_smb2_rsp(struct ksmbd_work *work); 333 u16 get_smb2_cmd_val(struct ksmbd_work *work); 334 void set_smb2_rsp_status(struct ksmbd_work *work, __le32 err); 335 int init_smb2_rsp_hdr(struct ksmbd_work *work); 336 int smb2_allocate_rsp_buf(struct ksmbd_work *work); 337 bool is_chained_smb2_message(struct ksmbd_work *work); 338 int init_smb2_neg_rsp(struct ksmbd_work *work); 339 void smb2_set_err_rsp(struct ksmbd_work *work); 340 int smb2_check_user_session(struct ksmbd_work *work); [all …]
|
| H A D | smb2pdu.c | 46 static void __wbuf(struct ksmbd_work *work, void **req, void **rsp) in __wbuf() argument 48 if (work->next_smb2_rcv_hdr_off) { in __wbuf() 49 *req = ksmbd_req_buf_next(work); in __wbuf() 50 *rsp = ksmbd_resp_buf_next(work); in __wbuf() 52 *req = smb_get_msg(work->request_buf); in __wbuf() 53 *rsp = smb_get_msg(work->response_buf); in __wbuf() 100 int smb2_get_ksmbd_tcon(struct ksmbd_work *work) in smb2_get_ksmbd_tcon() argument 102 struct smb2_hdr *req_hdr = ksmbd_req_buf_next(work); in smb2_get_ksmbd_tcon() 113 if (xa_empty(&work->sess->tree_conns)) { in smb2_get_ksmbd_tcon() 124 if (work->next_smb2_rcv_hdr_off) { in smb2_get_ksmbd_tcon() [all …]
|
| H A D | ksmbd_work.h | 86 struct work_struct work; member 98 static inline void *ksmbd_resp_buf_next(struct ksmbd_work *work) in ksmbd_resp_buf_next() argument 100 return work->response_buf + work->next_smb2_rsp_hdr_off + 4; in ksmbd_resp_buf_next() 107 static inline void *ksmbd_resp_buf_curr(struct ksmbd_work *work) in ksmbd_resp_buf_curr() argument 109 return work->response_buf + work->curr_smb2_rsp_hdr_off + 4; in ksmbd_resp_buf_curr() 116 static inline void *ksmbd_req_buf_next(struct ksmbd_work *work) in ksmbd_req_buf_next() argument 118 return work->request_buf + work->next_smb2_rcv_hdr_off + 4; in ksmbd_req_buf_next() 122 void ksmbd_free_work_struct(struct ksmbd_work *work); 129 bool ksmbd_queue_work(struct ksmbd_work *work); 130 int ksmbd_iov_pin_rsp_read(struct ksmbd_work *work, void *ib, int len, [all …]
|
| H A D | smb_common.c | 159 int ksmbd_verify_smb_message(struct ksmbd_work *work) in ksmbd_verify_smb_message() argument 161 struct smb2_hdr *smb2_hdr = ksmbd_req_buf_next(work); in ksmbd_verify_smb_message() 165 return ksmbd_smb2_check_message(work); in ksmbd_verify_smb_message() 167 hdr = smb_get_msg(work->request_buf); in ksmbd_verify_smb_message() 170 work->conn->outstanding_credits++; in ksmbd_verify_smb_message() 333 static u16 get_smb1_cmd_val(struct ksmbd_work *work) in get_smb1_cmd_val() argument 344 static int init_smb1_rsp_hdr(struct ksmbd_work *work) in init_smb1_rsp_hdr() argument 346 struct smb_hdr *rsp_hdr = (struct smb_hdr *)smb_get_msg(work->response_buf); in init_smb1_rsp_hdr() 347 struct smb_hdr *rcv_hdr = (struct smb_hdr *)smb_get_msg(work->request_buf); in init_smb1_rsp_hdr() 365 static int smb1_check_user_session(struct ksmbd_work *work) in smb1_check_user_session() argument [all …]
|
| /linux/virt/kvm/ |
| H A D | async_pf.c | 45 static void async_pf_execute(struct work_struct *work) in async_pf_execute() argument 48 container_of(work, struct kvm_async_pf, work); in async_pf_execute() 99 static void kvm_flush_and_free_async_pf_work(struct kvm_async_pf *work) in kvm_flush_and_free_async_pf_work() argument 113 if (work->wakeup_all) in kvm_flush_and_free_async_pf_work() 114 WARN_ON_ONCE(work->work.func); in kvm_flush_and_free_async_pf_work() 116 flush_work(&work->work); in kvm_flush_and_free_async_pf_work() 117 kmem_cache_free(async_pf_cache, work); in kvm_flush_and_free_async_pf_work() 124 struct kvm_async_pf *work = in kvm_clear_async_pf_completion_queue() local 126 typeof(*work), queue); in kvm_clear_async_pf_completion_queue() 127 list_del(&work->queue); in kvm_clear_async_pf_completion_queue() [all …]
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_flip_work.c | 47 static void drm_flip_work_queue_task(struct drm_flip_work *work, struct drm_flip_task *task) in drm_flip_work_queue_task() argument 51 spin_lock_irqsave(&work->lock, flags); in drm_flip_work_queue_task() 52 list_add_tail(&task->node, &work->queued); in drm_flip_work_queue_task() 53 spin_unlock_irqrestore(&work->lock, flags); in drm_flip_work_queue_task() 64 void drm_flip_work_queue(struct drm_flip_work *work, void *val) in drm_flip_work_queue() argument 71 drm_flip_work_queue_task(work, task); in drm_flip_work_queue() 73 DRM_ERROR("%s could not allocate task!\n", work->name); in drm_flip_work_queue() 74 work->func(work, val); in drm_flip_work_queue() 89 void drm_flip_work_commit(struct drm_flip_work *work, in drm_flip_work_commit() argument 94 spin_lock_irqsave(&work->lock, flags); in drm_flip_work_commit() [all …]
|
| H A D | drm_vblank_work.c | 50 struct drm_vblank_work *work, *next; in drm_handle_vblank_works() local 56 list_for_each_entry_safe(work, next, &vblank->pending_work, node) { in drm_handle_vblank_works() 57 if (!drm_vblank_passed(count, work->count)) in drm_handle_vblank_works() 60 list_del_init(&work->node); in drm_handle_vblank_works() 62 kthread_queue_work(vblank->worker, &work->base); in drm_handle_vblank_works() 74 struct drm_vblank_work *work, *next; in drm_vblank_cancel_pending_works() local 81 list_for_each_entry_safe(work, next, &vblank->pending_work, node) { in drm_vblank_cancel_pending_works() 82 list_del_init(&work->node); in drm_vblank_cancel_pending_works() 111 int drm_vblank_work_schedule(struct drm_vblank_work *work, in drm_vblank_work_schedule() argument 114 struct drm_vblank_crtc *vblank = work->vblank; in drm_vblank_work_schedule() [all …]
|
| /linux/include/trace/events/ |
| H A D | workqueue.h | 26 struct work_struct *work), 28 TP_ARGS(req_cpu, pwq, work), 31 __field( void *, work ) 39 __entry->work = work; 40 __entry->function = work->func; 47 __entry->work, __entry->function, __get_str(workqueue), 61 TP_PROTO(struct work_struct *work), 63 TP_ARGS(work), 66 __field( void *, work ) 71 __entry->work = work; [all …]
|
| /linux/kernel/ |
| H A D | irq_work.c | 57 static bool irq_work_claim(struct irq_work *work) in irq_work_claim() argument 61 oflags = atomic_fetch_or(IRQ_WORK_CLAIMED | CSD_TYPE_IRQ_WORK, &work->node.a_flags); in irq_work_claim() 79 static __always_inline void irq_work_raise(struct irq_work *work) in irq_work_raise() argument 82 trace_ipi_send_cpu(smp_processor_id(), _RET_IP_, work->func); in irq_work_raise() 88 static void __irq_work_queue_local(struct irq_work *work) in __irq_work_queue_local() argument 95 work_flags = atomic_read(&work->node.a_flags); in __irq_work_queue_local() 107 if (!llist_add(&work->node.llist, list)) in __irq_work_queue_local() 112 irq_work_raise(work); in __irq_work_queue_local() 116 bool irq_work_queue(struct irq_work *work) in irq_work_queue() argument 119 if (!irq_work_claim(work)) in irq_work_queue() [all …]
|
| H A D | task_work.c | 59 int task_work_add(struct task_struct *task, struct callback_head *work, in task_work_add() argument 70 kasan_record_aux_stack(work); in task_work_add() 77 work->next = head; in task_work_add() 78 } while (!try_cmpxchg(&task->task_works, &head, work)); in task_work_add() 121 struct callback_head *work; in task_work_cancel_match() local 133 work = READ_ONCE(*pprev); in task_work_cancel_match() 134 while (work) { in task_work_cancel_match() 135 if (!match(work, data)) { in task_work_cancel_match() 136 pprev = &work->next; in task_work_cancel_match() 137 work = READ_ONCE(*pprev); in task_work_cancel_match() [all …]
|
| H A D | kthread.c | 988 struct kthread_work *work; in kthread_worker_fn() local 1011 work = NULL; in kthread_worker_fn() 1014 work = list_first_entry(&worker->work_list, in kthread_worker_fn() 1016 list_del_init(&work->node); in kthread_worker_fn() 1018 worker->current_work = work; in kthread_worker_fn() 1021 if (work) { in kthread_worker_fn() 1022 kthread_work_func_t func = work->func; in kthread_worker_fn() 1024 trace_sched_kthread_work_execute_start(work); in kthread_worker_fn() 1025 work->func(work); in kthread_worker_fn() 1030 trace_sched_kthread_work_execute_end(work, func); in kthread_worker_fn() [all …]
|
| /linux/tools/perf/ |
| H A D | builtin-kwork.c | 315 struct kwork_work *work; in work_search() local 319 work = container_of(node, struct kwork_work, node); in work_search() 320 cmp = work_cmp(sort_list, key, work); in work_search() 326 if (work->name == NULL) in work_search() 327 work->name = key->name; in work_search() 328 return work; in work_search() 362 struct kwork_work *work = zalloc(sizeof(*work)); in work_new() local 364 if (work == NULL) { in work_new() 370 INIT_LIST_HEAD(&work->atom_list[i]); in work_new() 372 work->id = key->id; in work_new() [all …]
|
| /linux/include/linux/ |
| H A D | completion.h | 35 #define COMPLETION_INITIALIZER(work) \ argument 36 { 0, __SWAIT_QUEUE_HEAD_INITIALIZER((work).wait) } 38 #define COMPLETION_INITIALIZER_ONSTACK_MAP(work, map) \ argument 39 (*({ init_completion_map(&(work), &(map)); &(work); })) 41 #define COMPLETION_INITIALIZER_ONSTACK(work) \ argument 42 (*({ init_completion(&work); &work; })) 52 #define DECLARE_COMPLETION(work) \ argument 53 struct completion work = COMPLETION_INITIALIZER(work) 68 # define DECLARE_COMPLETION_ONSTACK(work) \ argument 69 struct completion work = COMPLETION_INITIALIZER_ONSTACK(work) [all …]
|
| H A D | workqueue.h | 24 #define work_data_bits(work) ((unsigned long *)(&(work)->data)) argument 115 struct work_struct work; member 124 struct work_struct work; member 212 static inline struct delayed_work *to_delayed_work(struct work_struct *work) in to_delayed_work() argument 214 return container_of(work, struct delayed_work, work); in to_delayed_work() 217 static inline struct rcu_work *to_rcu_work(struct work_struct *work) in to_rcu_work() argument 219 return container_of(work, struct rcu_work, work); in to_rcu_work() 223 struct work_struct work; member 246 .work = __WORK_INITIALIZER((n).work, (f)), \ 261 extern void __init_work(struct work_struct *work, int onstack); [all …]
|
| /linux/drivers/staging/octeon/ |
| H A D | ethernet-rx.c | 63 static inline int cvm_oct_check_rcv_error(struct cvmx_wqe *work) in cvm_oct_check_rcv_error() argument 68 port = work->word0.pip.cn68xx.pknd; in cvm_oct_check_rcv_error() 70 port = work->word1.cn38xx.ipprt; in cvm_oct_check_rcv_error() 72 if ((work->word2.snoip.err_code == 10) && (work->word1.len <= 64)) in cvm_oct_check_rcv_error() 81 if (work->word2.snoip.err_code == 5 || in cvm_oct_check_rcv_error() 82 work->word2.snoip.err_code == 7) { in cvm_oct_check_rcv_error() 99 cvmx_phys_to_ptr(work->packet_ptr.s.addr); in cvm_oct_check_rcv_error() 102 while (i < work->word1.len - 1) { in cvm_oct_check_rcv_error() 111 work->packet_ptr.s.addr += i + 1; in cvm_oct_check_rcv_error() 112 work->word1.len -= i + 5; in cvm_oct_check_rcv_error() [all …]
|
| /linux/fs/btrfs/ |
| H A D | async-thread.c | 55 struct btrfs_fs_info * __pure btrfs_work_owner(const struct btrfs_work *work) in btrfs_work_owner() argument 57 return work->wq->fs_info; in btrfs_work_owner() 213 struct btrfs_work *work; in run_ordered_work() local 222 work = list_first_entry(list, struct btrfs_work, ordered_list); in run_ordered_work() 223 if (!test_bit(WORK_DONE_BIT, &work->flags)) in run_ordered_work() 239 if (test_and_set_bit(WORK_ORDER_DONE_BIT, &work->flags)) in run_ordered_work() 241 trace_btrfs_ordered_sched(work); in run_ordered_work() 243 work->ordered_func(work, false); in run_ordered_work() 247 list_del(&work->ordered_list); in run_ordered_work() 250 if (work == self) { in run_ordered_work() [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | task_work.c | 45 struct elem *work = value; in process_work() local 47 bpf_copy_from_user_str(work->data, sizeof(work->data), (const void *)user_ptr, 0); in process_work() 57 struct elem *work; in oncpu_hash_map() local 65 work = bpf_map_lookup_elem(&hmap, &key); in oncpu_hash_map() 66 if (!work) in oncpu_hash_map() 68 bpf_task_work_schedule_resume(task, &work->tw, &hmap, process_work); in oncpu_hash_map() 75 struct elem *work; in oncpu_array_map() 79 work = bpf_map_lookup_elem(&arrmap, &key); in oncpu_array_map() 80 if (!work) in oncpu_array_map() 76 struct elem *work; oncpu_array_map() local 91 struct elem *work; oncpu_lru_map() local [all...] |
| /linux/net/wireless/ |
| H A D | debugfs.c | 148 struct wiphy_work work; member 164 struct wiphy_work *work) in wiphy_locked_debugfs_read_work() argument 166 struct debugfs_read_work *w = container_of(work, typeof(*w), work); in wiphy_locked_debugfs_read_work() 177 wiphy_work_cancel(w->wiphy, &w->work); in wiphy_locked_debugfs_read_cancel() 192 struct debugfs_read_work work = { in wiphy_locked_debugfs_read() local 200 .completion = COMPLETION_INITIALIZER_ONSTACK(work.completion), in wiphy_locked_debugfs_read() 204 .cancel_data = &work, in wiphy_locked_debugfs_read() 210 wiphy_work_init(&work.work, wiphy_locked_debugfs_read_work); in wiphy_locked_debugfs_read() 211 wiphy_work_queue(wiphy, &work.work); in wiphy_locked_debugfs_read() 214 wait_for_completion(&work.completion); in wiphy_locked_debugfs_read() [all …]
|
| /linux/kernel/entry/ |
| H A D | syscall-common.c | 21 syscall_trace_enter(struct pt_regs * regs,long syscall,unsigned long work) syscall_trace_enter() argument 71 report_single_step(unsigned long work) report_single_step() argument 79 syscall_exit_work(struct pt_regs * regs,unsigned long work) syscall_exit_work() argument
|
| /linux/kernel/unwind/ |
| H A D | deferred.c | 152 struct unwind_work *work; in process_unwind_deferred() local 177 list_for_each_entry_srcu(work, &callbacks, list, in process_unwind_deferred() 179 if (test_bit(work->bit, &bits)) { in process_unwind_deferred() 180 work->func(work, &trace, cookie); in process_unwind_deferred() 182 info->cache->unwind_completed |= BIT(work->bit); in process_unwind_deferred() 201 task_work_cancel(task, &info->work); in unwind_deferred_task_exit() 229 int unwind_deferred_request(struct unwind_work *work, u64 *cookie) in unwind_deferred_request() argument 255 bit = READ_ONCE(work->bit); in unwind_deferred_request() 290 ret = task_work_add(current, &info->work, twa_mode); in unwind_deferred_request() 298 void unwind_deferred_cancel(struct unwind_work *work) in unwind_deferred_cancel() argument [all …]
|
| /linux/drivers/accessibility/speakup/ |
| H A D | selection.c | 20 struct work_struct work; member 25 static void __speakup_set_selection(struct work_struct *work) in __speakup_set_selection() argument 28 container_of(work, struct speakup_selection_work, work); in __speakup_set_selection() 58 .work = __WORK_INITIALIZER(speakup_sel_work.work, 87 schedule_work_on(WORK_CPU_UNBOUND, &speakup_sel_work.work); in speakup_set_selection() 96 cancel_work_sync(&speakup_sel_work.work); in speakup_cancel_selection() 106 static void __speakup_paste_selection(struct work_struct *work) in __speakup_paste_selection() argument 109 container_of(work, struct speakup_selection_work, work); in __speakup_paste_selection() 117 .work = __WORK_INITIALIZER(speakup_paste_work.work, 129 schedule_work_on(WORK_CPU_UNBOUND, &speakup_paste_work.work); in speakup_paste_selection() [all …]
|
| /linux/drivers/infiniband/core/ |
| H A D | cm.c | 95 struct cm_work *work); 187 struct delayed_work work; member 198 struct cm_work work; member 269 static void cm_work_handler(struct work_struct *work); 710 __be32 remote_id = timewait_info->work.remote_id; in cm_insert_remote_id() 716 if (be32_lt(remote_id, cur_timewait_info->work.remote_id)) in cm_insert_remote_id() 718 else if (be32_gt(remote_id, cur_timewait_info->work.remote_id)) in cm_insert_remote_id() 744 if (be32_lt(remote_id, timewait_info->work.remote_id)) in cm_find_remote_id() 746 else if (be32_gt(remote_id, timewait_info->work.remote_id)) in cm_find_remote_id() 753 res = cm_acquire_id(timewait_info->work.local_id, in cm_find_remote_id() [all …]
|
| /linux/fs/ |
| H A D | fs-writeback.c | 165 static void finish_writeback_work(struct wb_writeback_work *work) in finish_writeback_work() argument 167 struct wb_completion *done = work->done; in finish_writeback_work() 169 if (work->auto_free) in finish_writeback_work() 170 kfree(work); in finish_writeback_work() 181 struct wb_writeback_work *work) in wb_queue_work() argument 183 trace_writeback_queue(wb, work); in wb_queue_work() 185 if (work->done) in wb_queue_work() 186 atomic_inc(&work->done->cnt); in wb_queue_work() 191 list_add_tail(&work->list, &wb->work_list); in wb_queue_work() 194 finish_writeback_work(work); in wb_queue_work() [all …]
|