lkmpg/examples
linD026 95a7ca513f Fix the buffer length may cause a read error
Since The length of the message buffer is BUF_LEN. When writing the
BUF_LEN length of the string it will overwrite the last character
(usually it is '\0' from the initialization). And, because the read
operation uses the character in the message buffer ('\0') to stop the
read loop. It will cause the read operation will read out of the
message buffer when the length parameter of read() is not lower than
or equal to BUF_LEN. So add one more byte space to avoid this problem.
2022-09-08 06:08:04 +08:00
..
other Fix incoherent ioctl examples (#139) 2022-02-21 00:53:29 +08:00
.clang-format Introduce Virtual Input Device Driver 2022-04-06 17:13:29 +08:00
bottomhalf.c Fix typo, grammar and remove duplicated words 2022-03-07 16:56:13 +08:00
chardev.c Fix the buffer length may cause a read error 2022-09-08 06:08:04 +08:00
chardev.h Fix incoherent ioctl examples (#139) 2022-02-21 00:53:29 +08:00
chardev2.c Fix the buffer length may cause a read error 2022-09-08 06:08:04 +08:00
completions.c Fix the warnings raised by Sparse (#92) 2021-09-04 17:53:29 +08:00
cryptosha256.c Fix the warnings raised by Sparse (#92) 2021-09-04 17:53:29 +08:00
cryptosk.c Fix the warnings raised by Sparse (#92) 2021-09-04 17:53:29 +08:00
devicemodel.c Enforce Linux kernel coding style (#88) 2021-09-02 15:15:07 +08:00
example_atomic.c CI: Run static analysis with Cppcheck (#105) 2021-09-14 00:52:04 +08:00
example_mutex.c Fix the warnings raised by Sparse (#92) 2021-09-04 17:53:29 +08:00
example_rwlock.c Fix the warnings raised by Sparse (#92) 2021-09-04 17:53:29 +08:00
example_spinlock.c Fix the warnings raised by Sparse (#92) 2021-09-04 17:53:29 +08:00
example_tasklet.c Fix typo, grammar and remove duplicated words 2022-03-07 16:56:13 +08:00
hello-1.c Mention pr_info() rather than KERN_INFO 2021-08-16 21:53:22 +02:00
hello-2.c Enforce Linux kernel coding style (#88) 2021-09-02 15:15:07 +08:00
hello-3.c Enforce Linux kernel coding style (#88) 2021-09-02 15:15:07 +08:00
hello-4.c Enforce Linux kernel coding style (#88) 2021-09-02 15:15:07 +08:00
hello-5.c Fix grammar 2022-03-09 14:14:08 +08:00
hello-sysfs.c Enforce Linux kernel coding style (#88) 2021-09-02 15:15:07 +08:00
intrpt.c Enforce Linux kernel coding style (#88) 2021-09-02 15:15:07 +08:00
ioctl.c Fix a logic error in examples/ioctl.c (#137) 2022-02-21 00:58:47 +08:00
kbleds.c CI: Introduce Smatch for static analysis (#125) 2021-11-01 08:20:41 +08:00
Makefile Fix wrong regular expression of clang-format 2022-04-10 22:51:59 +08:00
print_string.c Fix typo, grammar and remove duplicated words 2022-03-07 16:56:13 +08:00
procfs1.c Fix the warnings raised by Sparse (#92) 2021-09-04 17:53:29 +08:00
procfs2.c CI: Introduce Smatch for static analysis (#125) 2021-11-01 08:20:41 +08:00
procfs3.c Fix the warnings raised by Sparse (#92) 2021-09-04 17:53:29 +08:00
procfs4.c suppress warning: no newline at end of file 2021-09-08 22:23:02 +08:00
sched.c Enforce Linux kernel coding style (#88) 2021-09-02 15:15:07 +08:00
sleep.c Avoid unexpected concurrent access (#94) 2021-09-07 23:42:06 +08:00
start.c Apply editorial changes 2021-08-08 01:24:59 +08:00
stop.c Fix the warnings raised by Sparse (#92) 2021-09-04 17:53:29 +08:00
syscall.c Improve the description of finding syscall table 2022-03-17 07:51:59 +08:00
vinput.c Add description of sysfs attribute 2022-04-19 01:54:24 +08:00
vinput.h Add description of sysfs attribute 2022-04-19 01:54:24 +08:00
vkbd.c Add description of sysfs attribute 2022-04-19 01:54:24 +08:00