axboe / liburing

Library providing helpers for the Linux kernel io_uring support
MIT License
2.72k stars 393 forks source link

NIT. UB at examples/send-zerocopy.c, set_iowq_affinity(). #1070

Closed vsolontsov-ll closed 5 months ago

vsolontsov-ll commented 5 months ago

I know it's trivial and unlikely anyone will really be confused but might be worth to fix. set_iowq_affinity passes pointer to uninitialized mask.

static void set_iowq_affinity(struct io_uring *ring)
{
    cpu_set_t mask;
    int ret;

    if (cfg_cpu == -1)
        return;

    ret = io_uring_register_iowq_aff(ring, 1, &mask);
...
axboe commented 5 months ago

Thanks!