Skip to content
Commit 748a7295 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by David S. Miller
Browse files

net: netxen: correct sysfs bin attribute return code



If read() syscall requests unexpected number of bytes from "dimm" binary
attribute file, return EINVAL instead of EPERM.

At the same time pin down sysfs file size to the fixed
sizeof(struct netxen_dimm_cfg), which allows to exploit some missing
sanity checks from kernfs (file boundary checks vs offset etc.)

Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 082739aa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment