Article 5K21E Reading /sys/class/hwmon/hwmon0/temp1_input multiple times freezes and crashes the system with no logs

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..latest?d=yIl2AUoC8zA latest?i=MOWXq0xeBWw:hEBuxZ7IWpg:F7zBnMy latest?i=MOWXq0xeBWw:hEBuxZ7IWpg:V_sGLiP latest?d=qj6IDK7rITs latest?i=MOWXq0xeBWw:hEBuxZ7IWpg:gIN9vFwMOWXq0xeBWw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments