Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
irqbalance: fix invalid cpu mask parsing
Irq balancer scans the isolcpus and nohz_full kernel masks and adds the corresponding CPUs to the banned_cpus mask. This works fine for valid masks, but not for the default, emtpy masks. In this case when they read from the sysfs they return empty strings, "\n" or "0x0, \n": 0000000: 000a 0000000: 0a Irqbalancer reads them and blindly passes these values to the __bitmap_parselist() function, which expects ASCII string format. For this input the implementation always set the first bit indicating CPU 0. Steps to Reproduce: 1. Make sure /sys/devices/system/cpu/nohz_full and /sys/devices/system/cpu/isolated are empty 2. run $ /usr/sbin/irqbalance -d --oneshot | grep Isolated Actual results: Isolated CPUs: 00000001 Expected results: Isolated CPUs: 00000000 Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Neil Horman <nhorman@tuxdriver.com.
- Loading branch information