)]}' { "commit": "e00d996a4317aff5351c4338dd97d390225412c2", "tree": "11489ed4f80a83bcc579fcaae90e0542af494597", "parents": [ "69efea712f5b0489e67d07565aad5c94e09a3e52" ], "author": { "name": "Qian Cai", "email": "cai@lca.pw", "time": "Tue Feb 25 11:27:04 2020 -0500" }, "committer": { "name": "Theodore Ts\u0027o", "email": "tytso@mit.edu", "time": "Thu Feb 27 23:21:53 2020 -0500" }, "message": "random: fix data races at timer_rand_state\n\nFields in \"struct timer_rand_state\" could be accessed concurrently.\nLockless plain reads and writes result in data races. Fix them by adding\npairs of READ|WRITE_ONCE(). The data races were reported by KCSAN,\n\n BUG: KCSAN: data-race in add_timer_randomness / add_timer_randomness\n\n write to 0xffff9f320a0a01d0 of 8 bytes by interrupt on cpu 22:\n add_timer_randomness+0x100/0x190\n add_timer_randomness at drivers/char/random.c:1152\n add_disk_randomness+0x85/0x280\n scsi_end_request+0x43a/0x4a0\n scsi_io_completion+0xb7/0x7e0\n scsi_finish_command+0x1ed/0x2a0\n scsi_softirq_done+0x1c9/0x1d0\n blk_done_softirq+0x181/0x1d0\n __do_softirq+0xd9/0x57c\n irq_exit+0xa2/0xc0\n do_IRQ+0x8b/0x190\n ret_from_intr+0x0/0x42\n cpuidle_enter_state+0x15e/0x980\n cpuidle_enter+0x69/0xc0\n call_cpuidle+0x23/0x40\n do_idle+0x248/0x280\n cpu_startup_entry+0x1d/0x1f\n start_secondary+0x1b2/0x230\n secondary_startup_64+0xb6/0xc0\n\n no locks held by swapper/22/0.\n irq event stamp: 32871382\n _raw_spin_unlock_irqrestore+0x53/0x60\n _raw_spin_lock_irqsave+0x21/0x60\n _local_bh_enable+0x21/0x30\n irq_exit+0xa2/0xc0\n\n read to 0xffff9f320a0a01d0 of 8 bytes by interrupt on cpu 2:\n add_timer_randomness+0xe8/0x190\n add_disk_randomness+0x85/0x280\n scsi_end_request+0x43a/0x4a0\n scsi_io_completion+0xb7/0x7e0\n scsi_finish_command+0x1ed/0x2a0\n scsi_softirq_done+0x1c9/0x1d0\n blk_done_softirq+0x181/0x1d0\n __do_softirq+0xd9/0x57c\n irq_exit+0xa2/0xc0\n do_IRQ+0x8b/0x190\n ret_from_intr+0x0/0x42\n cpuidle_enter_state+0x15e/0x980\n cpuidle_enter+0x69/0xc0\n call_cpuidle+0x23/0x40\n do_idle+0x248/0x280\n cpu_startup_entry+0x1d/0x1f\n start_secondary+0x1b2/0x230\n secondary_startup_64+0xb6/0xc0\n\n no locks held by swapper/2/0.\n irq event stamp: 37846304\n _raw_spin_unlock_irqrestore+0x53/0x60\n _raw_spin_lock_irqsave+0x21/0x60\n _local_bh_enable+0x21/0x30\n irq_exit+0xa2/0xc0\n\n Reported by Kernel Concurrency Sanitizer on:\n Hardware name: HP ProLiant BL660c Gen9, BIOS I38 10/17/2018\n\nLink: https://lore.kernel.org/r/1582648024-13111-1-git-send-email-cai@lca.pw\nSigned-off-by: Qian Cai \u003ccai@lca.pw\u003e\nSigned-off-by: Theodore Ts\u0027o \u003ctytso@mit.edu\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "c33e7a3cdb13ab1ed2e4f01876f49890bef93d8d", "old_mode": 33188, "old_path": "drivers/char/random.c", "new_id": "f43f65c2195d3037027c73f0fd8fc0621977556c", "new_mode": 33188, "new_path": "drivers/char/random.c" } ] }