https://github.com/torvalds/linux
Revision 8b14d7b22c61f17ccb869e0047d9df6dd9f50a9f authored by Thadeu Lima de Souza Cascardo on 28 November 2010, 21:46:50 UTC, committed by Matthew Garrett on 06 December 2010, 22:19:13 UTC
While looking for the duplicates in /sys/class/wmi/, I couldn't find
them. The code that looks for duplicates uses strncmp in a binary GUID,
which may contain zero bytes. The right function is memcmp, which is
also used in another section of wmi code.

It was finding 49142400-C6A3-40FA-BADB-8A2652834100 as a duplicate of
39142400-C6A3-40FA-BADB-8A2652834100. Since the first byte is the fourth
printed, they were found as equal by strncmp.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: stable@kernel.org
1 parent 53c96df
History
Tip revision: 8b14d7b22c61f17ccb869e0047d9df6dd9f50a9f authored by Thadeu Lima de Souza Cascardo on 28 November 2010, 21:46:50 UTC
wmi: use memcmp instead of strncmp to compare GUIDs
Tip revision: 8b14d7b
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 936 bytes
.mailmap -rw-r--r-- 3.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.8 KB
Kbuild -rw-r--r-- 2.4 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 178.3 KB
Makefile -rw-r--r-- 50.9 KB
README -rw-r--r-- 17.1 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top