aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorDanilo Krummrich <[email protected]>2024-02-02 01:05:50 +0100
committerDanilo Krummrich <[email protected]>2024-02-12 11:40:46 +0100
commit9a0c32d698c1d0c4a6f5642ac017da31febad1eb (patch)
tree163a433fd1a84a562eadce69ce4a0a9125626c4f /lib/test_fortify/write_overflow-strncpy-src.c
parent28083ff18d3f65ecd64857f4495623135dd1f132 (diff)
drm/nouveau: don't fini scheduler if not initialized
nouveau_abi16_ioctl_channel_alloc() and nouveau_cli_init() simply call their corresponding *_fini() counterpart. This can lead to nouveau_sched_fini() being called without struct nouveau_sched ever being initialized in the first place. Instead of embedding struct nouveau_sched into struct nouveau_cli and struct nouveau_chan_abi16, allocate struct nouveau_sched separately, such that we can check for the corresponding pointer to be NULL in the particular *_fini() functions. It makes sense to allocate struct nouveau_sched separately anyway, since in a subsequent commit we can also avoid to allocate a struct nouveau_sched in nouveau_abi16_ioctl_channel_alloc() at all, if the VM_BIND uAPI has been disabled due to the legacy uAPI being used. Fixes: 5f03a507b29e ("drm/nouveau: implement 1:1 scheduler - entity relationship") Reported-by: Timur Tabi <[email protected]> Tested-by: Timur Tabi <[email protected]> Closes: https://lore.kernel.org/nouveau/[email protected]/ Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions