# # This example shows the bisect tests (git bisect and config bisect) # # The config that includes this file may define a RUN_TEST # variable that will tell this config what test to run. # (what to set the TEST option to). # DEFAULTS IF NOT DEFINED RUN_TEST # Requires that hackbench is in the PATH RUN_TEST := ${SSH} hackbench 50 # Set TEST to 'bisect' to do a normal git bisect. You need # to modify the options below to make it bisect the exact # commits you are interested in. # TEST_START IF ${TEST} == bisect TEST_TYPE = bisect # You must set the commit that was considered good (git bisect good) BISECT_GOOD = v3.3 # You must set the commit that was considered bad (git bisect bad) BISECT_BAD = HEAD # It's best to specify the branch to checkout before starting the bisect. CHECKOUT = origin/master # This can be build, boot, or test. Here we are doing a bisect # that requires to run a test to know if the bisect was good or bad. # The test should exit with 0 on good, non-zero for bad. But see # the BISECT_RET_* options in samples.conf to override this. BISECT_TYPE = test TEST = ${RUN_TEST} # It is usually a good idea to confirm that the GOOD and the BAD # commits are truly good and bad respectively. Having BISECT_CHECK # set to 1 will check both that the good commit works and the bad # commit fails. If you only want to check one or the other, # set BISECT_CHECK to 'good' or to 'bad'. BISECT_CHECK = 1 #BISECT_CHECK = good #BISECT_CHECK = bad # Usually it's a good idea to specify the exact config you # want to use throughout the entire bisect. Here we placed # it in the directory we called ktest.pl from and named it # 'config-bisect'. MIN_CONFIG = ${THIS_DIR}/config-bisect # By default, if we are doing a BISECT_TYPE = test run but the # build or boot fails, ktest.pl will do a 'git bisect skip'. # Uncomment the below option to make ktest stop testing on such # an error. #BISECT_SKIP = 0 # Now if you had BISECT_SKIP = 0 and the test fails, you can # examine what happened and then do 'git bisect log > /tmp/replay' # Set BISECT_REPLAY to /tmp/replay and ktest.pl will run the # 'git bisect replay /tmp/replay' before continuing the bisect test. #BISECT_REPLAY = /tmp/replay # If you used BISECT_REPLAY after the bisect test failed, you may # not want to continue the bisect on that commit that failed. # By setting BISECT_START to a new commit. ktest.pl will checkout # that commit after it has performed the 'git bisect replay' but # before it continues running the bisect test. #BISECT_START = 2545eb6198e7e1ec50daa0cfc64a4cdfecf24ec9 # Now if you don't trust ktest.pl to make the decisions for you, then # set BISECT_MANUAL to 1. This will cause ktest.pl not to decide # if the commit was good or bad. Instead, it will ask you to tell # it if the current commit was good. In the mean time, you could # take the result, load it on any machine you want. Run several tests, # or whatever you feel like. Then, when you are happy, you can tell # ktest if you think it was good or not and ktest.pl will continue # the git bisect. You can even change what commit it is currently at. #BISECT_MANUAL = 1 # One of the unique tests that ktest does is the config bisect. # Currently (which hopefully will be fixed soon), the bad config # must be a superset of the good config. This is because it only # searches for a config that causes the target to fail. If the # good config is not a subset of the bad config, or if the target # fails because of a lack of a config, then it will not find # the config for you. TEST_START IF ${TEST} == config-bisect TEST_TYPE = config_bisect # set to build, boot, test CONFIG_BISECT_TYPE = boot # Set the config that is considered bad. CONFIG_BISECT = ${THIS_DIR}/config-bad # This config is optional. By default it uses the # MIN_CONFIG as the good config. CONFIG_BISECT_GOOD = ${THIS_DIR}/config-good space:mode:
authorOndrej Kozina <okozina@redhat.com>2017-01-31 15:47:11 +0100
committerMike Snitzer <snitzer@redhat.com>2017-02-03 10:26:14 -0500
commitf5b0cba8f23915e92932f11eb063e37d70556a89 (patch)
tree19f7ccac636459333cca52027914d19084b1392b /drivers/usb/gadget/function
parent4087a1fffe38106e10646606a27f10d40451862d (diff)
dm crypt: replace RCU read-side section with rwsem
The lockdep splat below hints at a bug in RCU usage in dm-crypt that was introduced with commit c538f6ec9f56 ("dm crypt: add ability to use keys from the kernel key retention service"). The kernel keyring function user_key_payload() is in fact a wrapper for rcu_dereference_protected() which must not be called with only rcu_read_lock() section mark. Unfortunately the kernel keyring subsystem doesn't currently provide an interface that allows the use of an RCU read-side section. So for now we must drop RCU in favour of rwsem until a proper function is made available in the kernel keyring subsystem. =============================== [ INFO: suspicious RCU usage. ] 4.10.0-rc5 #2 Not tainted ------------------------------- ./include/keys/user-type.h:53 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 2 locks held by cryptsetup/6464: #0: (&md->type_lock){+.+.+.}, at: [<ffffffffa02472a2>] dm_lock_md_type+0x12/0x20 [dm_mod] #1: (rcu_read_lock){......}, at: [<ffffffffa02822f8>] crypt_set_key+0x1d8/0x4b0 [dm_crypt] stack backtrace: CPU: 1 PID: 6464 Comm: cryptsetup Not tainted 4.10.0-rc5 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.1-1.fc24 04/01/2014 Call Trace: dump_stack+0x67/0x92 lockdep_rcu_suspicious+0xc5/0x100 crypt_set_key+0x351/0x4b0 [dm_crypt] ? crypt_set_key+0x1d8/0x4b0 [dm_crypt] crypt_ctr+0x341/0xa53 [dm_crypt] dm_table_add_target+0x147/0x330 [dm_mod] table_load+0x111/0x350 [dm_mod] ? retrieve_status+0x1c0/0x1c0 [dm_mod] ctl_ioctl+0x1f5/0x510 [dm_mod] dm_ctl_ioctl+0xe/0x20 [dm_mod] do_vfs_ioctl+0x8e/0x690 ? ____fput+0x9/0x10 ? task_work_run+0x7e/0xa0 ? trace_hardirqs_on_caller+0x122/0x1b0 SyS_ioctl+0x3c/0x70 entry_SYSCALL_64_fastpath+0x18/0xad RIP: 0033:0x7f392c9a4ec7 RSP: 002b:00007ffef6383378 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffef63830a0 RCX: 00007f392c9a4ec7 RDX: 000000000124fcc0 RSI: 00000000c138fd09 RDI: 0000000000000005 RBP: 00007ffef6383090 R08: 00000000ffffffff R09: 00000000012482b0 R10: 2a28205d34383336 R11: 0000000000000246 R12: 00007f392d803a08 R13: 00007ffef63831e0 R14: 0000000000000000 R15: 00007f392d803a0b Fixes: c538f6ec9f56 ("dm crypt: add ability to use keys from the kernel key retention service") Reported-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Ondrej Kozina <okozina@redhat.com> Reviewed-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/usb/gadget/function')