added prints and close device
This commit is contained in:
parent
95cc913f45
commit
9cabbefc77
3 changed files with 8 additions and 5 deletions
|
@ -1,8 +1,8 @@
|
|||
obj-m += lkm.o
|
||||
|
||||
all: module
|
||||
all: module leak
|
||||
|
||||
run: module leak.c
|
||||
run: leak
|
||||
./leak
|
||||
|
||||
module:
|
||||
|
|
BIN
code/leak
Executable file
BIN
code/leak
Executable file
Binary file not shown.
|
@ -3,8 +3,11 @@
|
|||
int
|
||||
main(void)
|
||||
{
|
||||
fopen("/dev/lkm", "r+");
|
||||
printf("main: start\n");
|
||||
FILE *device = fopen("/dev/lkm", "r+");
|
||||
|
||||
for (;;)
|
||||
;
|
||||
printf("main: fopen: %p\n", device);
|
||||
|
||||
fclose(device);
|
||||
printf("main: done\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue