HID: hiddev: Use vzalloc to allocate hiddev_list
authorHavard Skinnemoen <hskinnemoen@google.com>
Thu, 26 Apr 2012 18:16:00 +0000 (11:16 -0700)
committerJiri Kosina <jkosina@suse.cz>
Fri, 27 Apr 2012 14:03:40 +0000 (16:03 +0200)
Everytime a HID device is opened, a new hiddev_list is allocated with
kzalloc. This requires 64KB of physically contiguous memory, which could
easily push a heavily loaded system over the edge.

Allocating the same amount of memory with vmalloc shouldn't be nearly as
demanding, so let's do that instead. The memory isn't used for DMA and
doesn't look particularly performance sensitive, so this should be safe.

Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

No differences found