Skip to content
Advertisement

Tag: kernel

Why open() has no ‘fd’ return in linux 1.0?

Since there is no return of ‘fd’, how does it read/write later for? ex: Answer open returns a value in there. The cast-to-void is used to signal the compiler that the return value is being deliberately ignored. The init function is the one where the current thread is prepared to execute the init program in user-space. init will expect the

bpf/bcc reports error when trying to access `struct rq`

This is my bpf program to profile a kernel function pick_next_task_fiar. It reports error as follow: My question why the bpf can not recognise the struct rq since I have already included the # include <linux/sched.h>. However, it does recognise the struct task_struct. These two structs are in the same head file. Kernel version: 4.4.0-141-generic on ubuntu 16.04 Answer struct

Cannot get memory allocated from `flex_array_alloc` when requesting a relatively big size in linux kernel

I’m doing some linux kernel development. And I’m going to allocate some memory space with something like: ptr = flex_array_alloc(size=136B, num=1<<16, GFP_KERNEL) And ptr turns out to be NULL every time I try. What’s more, when I change the size to 20B or num to 256,there’s nothing wrong and the memory can be obtained. So I want to know if

My newly compiled kernel loses Networking in qemu

I compiled a kernel from source : make defconfig make kvmconfig make -j 4 After this , i use the resulting bzImage for my qemu command: qemu-system-x86_64 -hda debian.img -kernel bzImage -append “root=/dev/sda console=ttyS0” -nographic -m 4096 -smp 2 –enable-kvm -net user,hostfwd=tcp::10021-:22 -net nic It mounts, and I get a shell and everything, but it loses connectivity. In qemu, it

Java 8 gradle script causing kernel panic

I have an issue where Java 8 and Gradle are causing Linux VMs to crash. Here’s the interesting part: Java 7 does not result in this behavior. We’ve also tried enabling stacktrace and debugging, but the machine panics before any debugging/stack output. Kernel Panic – not syncing: Fatal exception in interrupt. Gradle: 4.3.1 Java: 8u101 OS: CentOS 6.9 / 2.6

Prevent removal of busy kernel module

I have a simple kernel module that creates a character devices and does nothing with it. I wrote this user-space program that tests the character device. The program exits after 10 seconds. But if in the meantime I remove the module with rmmod or modprobe, then after 10 seconds the program segfaults or hangs, and there is a kernel oops.

what is the . (dot) and + (plus) after the lock name in the kernel crash (task hung)?

I’ve found that there are dot and plus signs in the kernel crash when the kernel detected task hung. Showing all locks held in the system: 2 locks held by khungtaskd/737: #0: (rcu_read_lock){….}, at: [<00000000eaa2e968>] check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline] #0: (rcu_read_lock){….}, at: [<00000000eaa2e968>] watchdog+0x1c5/0xd60 kernel/hung_task.c:249 #1: (tasklist_lock){.+.+}, at: [<000000005ed461f9>] debug_show_all_locks+0xd3/0x400 kernel/locking/lockdep.c:4464 What is the dot and plus signs between the brackets

Advertisement