Reading /sys/class/hwmon/hwmon0/temp1_input multiple times freezes and crashes the system with no logs
by madironman from LinuxQuestions.org on (#5K21E)
Hi all, I have a application code that reads from the lm75 temperature sensor which is connected via i2c.
the application opens the sys file "/sys/class/hwmon/hwmon0/temp1_input" and using fscanf reads the data and process it. My problem is if i have multiple calls to reading the file the system crashes with no logs even after enabling debugs and setting console log levels appropriately. I added spinlocks in lm75 driver where the register is read and that didn't change anything :( . Please help me out fellow penguins..
the application opens the sys file "/sys/class/hwmon/hwmon0/temp1_input" and using fscanf reads the data and process it. My problem is if i have multiple calls to reading the file the system crashes with no logs even after enabling debugs and setting console log levels appropriately. I added spinlocks in lm75 driver where the register is read and that didn't change anything :( . Please help me out fellow penguins..