Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD

John Hughes
2009-11-04T16:55:07Z

John Hughes wrote:
> Attempts to change the "status" fail:
>
> # echo "unconfigured" > status
> [ 626.389093] general protection fault: 0000 [#1] SMP [ 626.389243]
> last sysfs file: /sys/class/enclosure/0:0:32:0/0/status
This bug still exists in 2.6.32-rc6.

It's pretty crazy - if we use a legal value then the routine correctly
returns -EINVAL as there is no setter.

If we write an illegal value to status we get an oops!

Aha! It's because the enclosure_status array is not NULL terminated, so
if we try to write an illegal value we run off the end of the array!