]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: fnc->obuf could be accessed without a lock
authorDonald Sharp <sharpd@nvidia.com>
Mon, 4 Mar 2024 23:07:42 +0000 (18:07 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 4 Mar 2024 23:08:06 +0000 (18:08 -0500)
commite7a1fbbcf64659ae2057a2e1e20a6c1f842522ab
tree4636d4ab3fa7ae7378f88639a1a6ed8d578f0aaf
parentc256a9a40a42d617ace08cfd7c7447e7cb705e38
zebra: fnc->obuf could be accessed without a lock

Found by coverity.  Let's just lock the writeable
amount to see if it is possible.  It's ok because
we want to know if we have room *now*.  If another
pthread runs it will only remove data from fnc->obuf
and make more room.  So this is ok.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/dplane_fpm_nl.c