Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\dma\debug.c Create Date:2022-07-28 10:34:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:filter_write

Proto:static ssize_t filter_write(struct file *file, const char __user *userbuf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *userbuf
size_tcount
loff_t *ppos
761  len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(count, (size_t)(per-driver filter related state - 1))
762  If copy_from_user(buf, userbuf, len) Then Return -EFAULT
765  buf[len] = 0
767  write_lock_irqsave( & driver_name_lock, flags)
777  If Not isalnum(buf[0]) Then
783  If current_driver_name[0] Then pr_info("switching off dma-debug driver filter\n")
785  current_driver_name[0] = 0
786  current_driver = NULL
787  Go to out_unlock
794  When i < per-driver filter related state - 1 cycle
795  current_driver_name[i] = buf[i]
796  If Note: isspace() must return false for %NUL-terminator (buf[i]) || buf[i] == ' ' || buf[i] == 0 Then Break
799  current_driver_name[i] = 0
800  current_driver = NULL
802  pr_info("enable driver filter for driver [%s]\n", current_driver_name)
805  out_unlock :
806  write_unlock_irqrestore( & driver_name_lock, flags)
808  Return count