Testing for regressions in Media Controller API register, ioctl, syscall, and unregister paths. There have a few problems that result in user-after free on media_device, media_devnode, and cdev pointers when the driver is unbound while ioctl is in progress. Test Procedure: Run bin/unbind loop while ioctls are in progress. Run rmmod and modprobe. Disconnect the device. Setup: Build media_device_test cd tools/testing/selftests/media_tests make Regressions test for cdev user-after free error on /dev/mediaX when driver is unbound: Start media_device_test to regression test media devnode dynamic alloc and cdev user-after-free fixes. This opens media dev files and sits in a loop running media ioctl MEDIA_IOC_DEVICE_INFO command once every 10 seconds. The idea is when device file goes away, media devnode and cdev should stick around until this test exits. The test for a random number of iterations or until user kills it with a sleep 10 in between the ioctl calls. sudo ./media_device_test -d /dev/mediaX Regression test for media_devnode unregister race with ioctl_syscall: Start 6 open_loop_test.sh tests with different /dev/mediaX files. When device file goes away after unbind, device file name changes. Start the test with possible device names. If we start with /dev/media0 for example, after unbind, /dev/media1 or /dev/media2 could get created. The idea is keep ioctls going while bind/unbind runs. Copy bind_unbind_sample.txt and make changes to specify the driver name and number to run bind and unbind. Start the bind_unbind.sh Run dmesg looking for any user-after free errors or mutex lock errors. >refslogtreecommitdiff
path: root/tools/testing/selftests/x86/vdso_restorer.c
lass='label'>context:
AgeCommit message (Expand)AuthorFilesLines
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2017-01-29 12:40:52 +0100
committerKalle Valo <kvalo@codeaurora.org>2017-01-31 09:08:52 +0200
commit33e962c8871f015f5c8978384553dddcf5b81b22 (patch)
tree43aff96c2ee21d9e0fa2018457778a4de52053cd /sound/soc/cirrus/simone.c
parent575ddce0507789bf9830d089557d2199d2f91865 (diff)
rt2x00: fix clk_get call
clk_get() takes two arguments and might return ERR_PTR(), so we have to nullify pointer on that case, to do not break further call to clk_get_rate(). Reported-by: Felix Fietkau <nbd@nbd.name> Fixes: 34db70b92fae ("rt2x00: add copy of clk for soc devices") Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'sound/soc/cirrus/simone.c')