Ahoj,
there is a project "dev_scream" that is based on your project but changed the character device name and output such that cat /dev/scream produces a flow of aHAAhhaHHAAHaAaAAAAhhHhhAAaAA[...].
When both modules get loaded, the kernel prints a call trace (and hangs on unload): Regardless of the order, when the second module is loaded an error message
sysfs: cannot create duplicate filename '/class/chardrv'
is printed to the kernel log, followed by a call trace.
Upon unload, the system hard-freezes (also SysRq does no longer work).
Attached kernel log: dmesg.log.
Maybe the code needs to have some work to more "dynamically" create some names, or maybe it is totally "dev_scream"'s fault?
("/class/chardrv" is a pretty generic name; if that is what you create and can only be created once then I think it is generally prone to errors. What is if another driver also comes along and wants to use that generic name? I think you should add some more code here to handle the case when it already exists.)
Kernel: Linux 6.10.7.
Regards!
Ahoj,
there is a project "dev_scream" that is based on your project but changed the character device name and output such that
cat /dev/screamproduces a flow ofaHAAhhaHHAAHaAaAAAAhhHhhAAaAA[...].When both modules get loaded, the kernel prints a call trace (and hangs on unload): Regardless of the order, when the second module is loaded an error message
is printed to the kernel log, followed by a call trace.
Upon unload, the system hard-freezes (also SysRq does no longer work).
Attached kernel log:
dmesg.log.Maybe the code needs to have some work to more "dynamically" create some names, or maybe it is totally "dev_scream"'s fault?
("/class/chardrv" is a pretty generic name; if that is what you create and can only be created once then I think it is generally prone to errors. What is if another driver also comes along and wants to use that generic name? I think you should add some more code here to handle the case when it already exists.)
Kernel: Linux 6.10.7.
Regards!