Page MenuHomeFreeBSD

in6_joingroup_locked: need if_addr_lock around in6m_disconnect_locked
ClosedPublic

Authored by rlibby on Jun 24 2019, 4:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 7:36 AM
Unknown Object (File)
Jan 16 2024, 2:52 AM
Unknown Object (File)
Dec 22 2023, 5:32 AM
Unknown Object (File)
Dec 20 2023, 5:59 AM
Unknown Object (File)
Nov 20 2023, 5:15 PM
Unknown Object (File)
Sep 7 2023, 12:45 PM
Unknown Object (File)
Aug 4 2023, 2:00 AM
Unknown Object (File)
Aug 4 2023, 1:57 AM

Details

Summary

It looks like the call that requires the lock was introduced in r337866.

Sponsored by: Dell EMC Isilon

Test Plan

sysctl debug.fail_point.mnowait="1%return"
kyua test -k /usr/tests/sys/Kyuafile

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Patch looks good to me. Did you run this patch, I.E. force the error case somehow?

Patch looks good to me. Did you run this patch, I.E. force the error case somehow?

General background is that this patch and others are fallout from applying the error injection in D20714 (in this case, injecting errors for M_NOWAIT allocs of mbufs). They have mostly been tested with "it used to panic and now it doesn't," but I will see if I can confirm having tickled the specific error paths with dtrace.

Patch looks good to me. Did you run this patch, I.E. force the error case somehow?

General background is that this patch and others are fallout from applying the error injection in D20714 (in this case, injecting errors for M_NOWAIT allocs of mbufs). They have mostly been tested with "it used to panic and now it doesn't," but I will see if I can confirm having tickled the specific error paths with dtrace.

Here's this one. It really just demonstrates that the code path is executed and then we don't panic. I'm still working on demonstrating D20740.

# dtrace \
-n 'fbt::in6_joingroup_locked:entry {self->arm6=1}' \
-n 'fbt::mld_change_state:return /self->arm6 == 1 && args[1] != 0/ {self->arm6=2;}' \
-n 'fbt::in6m_disconnect_locked:entry /self->arm6 == 2/ {stack();}' \
-n 'fbt::in6_joingroup_locked:return {self->arm6=0}'
[...]
CPU     ID                    FUNCTION:NAME
  5  54752     in6m_disconnect_locked:entry 
              kernel`in6_joingroup_locked+0x552
              kernel`in6_joingroup+0x44
              kernel`in6_update_ifa+0x1882
              kernel`in6_ifattach+0x558
              kernel`in6_if_up+0x80
              kernel`if_up+0x6a
              kernel`ifhwioctl+0xc77
              kernel`ifioctl+0x529
              kernel`kern_ioctl+0x28a
              kernel`sys_ioctl+0x15d
              kernel`amd64_syscall+0x276
              kernel`0xffffffff8104542d
# kyua test -k /usr/tests/sys/netpfil/Kyuafile
This revision was not accepted when it landed; it landed in state Needs Review.Nov 25 2019, 10:25 PM
This revision was automatically updated to reflect the committed changes.