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
F106068184: D20739.diff
Tue, Dec 24, 8:47 PM
Unknown Object (File)
Sun, Dec 15, 8:53 PM
Unknown Object (File)
Thu, Dec 12, 11:43 PM
Unknown Object (File)
Nov 11 2024, 2:15 PM
Unknown Object (File)
Nov 8 2024, 2:44 PM
Unknown Object (File)
Oct 30 2024, 10:55 PM
Unknown Object (File)
Oct 10 2024, 4:36 PM
Unknown Object (File)
Oct 5 2024, 5:51 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25002
Build 23717: arc lint + arc unit

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.