]> Git Repo - linux.git/commit
ethtool: Allow zero-length register dumps again
authorBen Hutchings <[email protected]>
Thu, 21 Jul 2011 22:25:30 +0000 (15:25 -0700)
committerDavid S. Miller <[email protected]>
Thu, 21 Jul 2011 22:25:30 +0000 (15:25 -0700)
commit67ae7cf1eeda777f79259c4c6cb17a0bd28dee71
tree3644c9018a246df166b220b35d6073efa48a385c
parent1511022c9aabf253253e35730a6a3b945a2a53a9
ethtool: Allow zero-length register dumps again

Some drivers (ab)use the ethtool_ops::get_regs operation to expose
only a hardware revision ID.  Commit
a77f5db361ed9953b5b749353ea2c7fed2bf8d93 ('ethtool: Allocate register
dump buffer with vmalloc()') had the side-effect of breaking these, as
vmalloc() returns a null pointer for size=0 whereas kmalloc() did not.

For backward-compatibility, allow zero-length dumps again.

Reported-by: Kalle Valo <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Cc: [email protected] [2.6.37+]
Signed-off-by: David S. Miller <[email protected]>
net/core/ethtool.c
This page took 0.055827 seconds and 4 git commands to generate.