summaryrefslogtreecommitdiff
path: root/kernel/sched/rt.c
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2017-12-08 18:10:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-20 10:04:52 +0100
commitf98ee9c0007bfe8f4465fabc762372add67d18fb (patch)
tree72b498b808de24e558b24a6ad4a14fcb5e146df6 /kernel/sched/rt.c
parentffc7565746bb2fc063fc0f484c55ef6d8951a6ee (diff)
xhci: Don't add a virt_dev to the devs array before it's fully allocated
commit 5d9b70f7d52eb14bb37861c663bae44de9521c35 upstream. Avoid null pointer dereference if some function is walking through the devs array accessing members of a new virt_dev that is mid allocation. Add the virt_dev to xhci->devs[i] _after_ the virt_device and all its members are properly allocated. issue found by KASAN: null-ptr-deref in xhci_find_slot_id_by_port "Quick analysis suggests that xhci_alloc_virt_device() is not mutex protected. If so, there is a time frame where xhci->devs[slot_id] is set but not fully initialized. Specifically, xhci->devs[i]->udev can be NULL." Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/sched/rt.c')
0 files changed, 0 insertions, 0 deletions