aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strlcpy-src.c
diff options
context:
space:
mode:
authorCong Wang <[email protected]>2022-08-27 11:13:14 -0700
committerJakub Kicinski <[email protected]>2022-08-31 12:16:44 -0700
commit8fc29ff3910f3af08a7c40a75d436b5720efe2bf (patch)
tree409d5928e30e5d2a1f9a108fab74588c1e07afe8 /lib/test_fortify/write_overflow-strlcpy-src.c
parent3a1a274e933fca73fdc960cb1f60636cd285a265 (diff)
kcm: fix strp_init() order and cleanup
strp_init() is called just a few lines above this csk->sk_user_data check, it also initializes strp->work etc., therefore, it is unnecessary to call strp_done() to cancel the freshly initialized work. And if sk_user_data is already used by KCM, psock->strp should not be touched, particularly strp->work state, so we need to move strp_init() after the csk->sk_user_data check. This also makes a lockdep warning reported by syzbot go away. Reported-and-tested-by: [email protected] Reported-by: [email protected] Fixes: e5571240236c ("kcm: Check if sk_user_data already set in kcm_attach") Fixes: dff8baa26117 ("kcm: Call strp_stop before strp_done in kcm_attach") Cc: Tom Herbert <[email protected]> Signed-off-by: Cong Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions