0

currently I seek for a way to unload a certain module from another kernel module.

One way i think about is usage of call_usermodehelper. So basically an userspace program is prepared doing i.e. echo 1-1 > /sys//unload I think this way is possible, yet it seems not to be the best way.

I would love it, when i would not need to go over userland. So is there such a way?

Writing to sysfs attributes in general seems to be done via [1]

ssize_t (*show)(struct device *dev, struct device_attribute *attr,
            char *buf);

but seems to be done exclusivly via userland as well. Or is their a way of assembling the struct device dev parameter?

[1] https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.