Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events.c Create Date:2022-07-28 12:19:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:event_filter_write

Proto:static ssize_t event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *filp
const char __user *ubuf
size_tcnt
loff_t *ppos
1391  err = -ENODEV
1393  If cnt >= PAGE_SIZE Then Return -EINVAL
1396  buf = memdup_user_nul(ubuf, cnt)
1397  If IS_ERR(buf) Then Return PTR_ERR(buf)
1400  mutex_lock( & event_mutex)
1401  file = event_file_data(filp)
1402  If file Then err = apply_event_filter(file, buf)
1404  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1406  kfree(buf)
1407  If err < 0 Then Return err
1410  ppos += cnt
1412  Return cnt