OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-120-gbffaa7f

Gerrit Code Review gerrit@openafs.org
Fri, 7 Feb 2025 10:32:43 -0500


The following commit has been merged in the master branch:
commit bffaa7f7172b07d60b62892518c32ba672253dbc
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date:   Fri Apr 22 13:06:32 2022 +0000

    afs: Don't call rxk_NewSocketHost() with AFS_GLOCK
    
    On macOS, rxk_NewSocketHost() assumes that its callers have AFS_GLOCK.
    However, after the introduction of commit d5e1428a3b (afs: Drop GLOCK
    for various Rx calls), this is not always true anymore, since now we
    drop this lock before calling rx_InitHost(). In this case (rx_InitHost
    > rxi_GetHostUDPSocket > rxk_NewSocketHost), trying to release AFS_GLOCK
    in rxk_NewSocketHost() causes a kernel panic
    (osi_Assert(afs_global_owner == current_thread())).
    
    To avoid this problem, assume that rxk_NewSocketHost() callers do not
    have AFS_GLOCK. Also, to ensure that there are no other code paths
    calling rxk_NewSocketHost() holding AFS_GLOCK, drop AFS_GLOCK before all
    kernel calls to rx_NewService() (which could result in rx_NewServiceHost
    > rxi_GetHostUDPSocket > rxk_NewSocketHost).
    
    Change-Id: Ic67242b8260c8dbf885b330c9f27f5a21c12bc82
    Reviewed-on: https://gerrit.openafs.org/14932
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/afs/afs_init.c      |  2 +-
 src/afs/afs_pag_call.c  |  2 +-
 src/rx/DARWIN/rx_knet.c | 13 ++++++++-----
 3 files changed, 10 insertions(+), 7 deletions(-)

-- 
OpenAFS Master Repository