diff options
author | Dan McDonald <danmcd@mnx.io> | 2022-12-01 15:14:42 -0500 |
---|---|---|
committer | Dan McDonald <danmcd@mnx.io> | 2022-12-01 15:14:42 -0500 |
commit | 7dbc264fa6b353e7568738c7a4adedad87e41bc2 (patch) | |
tree | f1e608bb52769944cb4dfbac4a8792e9a7968a7c | |
parent | ae23309dad5523d5d31bb3c92f37489420fbeb4e (diff) | |
parent | a5a9a6bb70826a54a1c35d3b862a927fd22f7b0e (diff) | |
download | illumos-joyent-7dbc264fa6b353e7568738c7a4adedad87e41bc2.tar.gz |
[illumos-gate merge]
commit a5a9a6bb70826a54a1c35d3b862a927fd22f7b0e
15182 Fix some SMB dtrace issues
-rw-r--r-- | exception_lists/cstyle | 1 | ||||
-rw-r--r-- | usr/src/lib/libdtrace/common/smb.d | 3 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb2_lease.c | 6 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_cmn_oplock.c | 6 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_common_open.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_node.c | 6 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_notify.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_ofile.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_signing.c | 3 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c | 4 |
10 files changed, 21 insertions, 16 deletions
diff --git a/exception_lists/cstyle b/exception_lists/cstyle index 3639118629..f0f641904b 100644 --- a/exception_lists/cstyle +++ b/exception_lists/cstyle @@ -706,6 +706,7 @@ usr/src/tools/btxld/elfh.c usr/src/tools/btxld/elfh.h usr/src/tools/btxld/imgact_aout.h usr/src/tools/smatch/src/* +usr/src/uts/common/fs/smbsrv/smb_cmn_oplock.c usr/src/uts/common/fs/zfs/lua/* usr/src/uts/common/gssapi/gssapi.h usr/src/uts/common/gssapi/mechs/krb5/crypto/block_size.c diff --git a/usr/src/lib/libdtrace/common/smb.d b/usr/src/lib/libdtrace/common/smb.d index 9b2f8bdc1f..c14e588876 100644 --- a/usr/src/lib/libdtrace/common/smb.d +++ b/usr/src/lib/libdtrace/common/smb.d @@ -24,6 +24,7 @@ * Use is subject to license terms. * * Copyright 2018 Nexenta Systems, Inc. All rights reserved. + * Copyright 2022 RackTop Systems, Inc. */ #pragma D depends_on library ip.d @@ -137,6 +138,7 @@ typedef struct smb2opinfo { uint64_t soi_asyncid; /* Message ID (when async) */ uint64_t soi_uid; /* user ID (SMB2 Session ID) */ uint32_t soi_tid; /* tree ID */ + uint32_t soi_fid; /* file ID */ uint32_t soi_status; uint32_t soi_flags; zoneid_t soi_zoneid; /* zone identifier */ @@ -150,6 +152,7 @@ translator smb2opinfo_t < struct smb_request *P > { soi_asyncid = P->smb2_async_id; soi_uid = P->smb2_ssnid; soi_tid = P->smb_tid; + soi_fid = P->smb_fid; soi_status = P->smb2_status; soi_flags = P->smb2_hdr_flags; soi_zoneid = P->sr_server->sv_zid; diff --git a/usr/src/uts/common/fs/smbsrv/smb2_lease.c b/usr/src/uts/common/fs/smbsrv/smb2_lease.c index b8bed20f91..45f886e90a 100644 --- a/usr/src/uts/common/fs/smbsrv/smb2_lease.c +++ b/usr/src/uts/common/fs/smbsrv/smb2_lease.c @@ -11,7 +11,7 @@ /* * Copyright 2021 Tintri by DDN, Inc. All rights reserved. - * Copyright 2021 RackTop Systems, Inc. + * Copyright 2022 RackTop Systems, Inc. */ /* @@ -185,8 +185,8 @@ smb2_lease_create(smb_request_t *sr, uint8_t *clnt) (void *) lease->ls_node, lease->ls_node->od_name); #endif - DTRACE_PROBE2(dup_lease, smb_request_t, sr, - smb_lease_t, lease); + DTRACE_PROBE2(dup_lease, smb_request_t *, sr, + smb_lease_t *, lease); lease = NULL; /* error */ } } else { diff --git a/usr/src/uts/common/fs/smbsrv/smb_cmn_oplock.c b/usr/src/uts/common/fs/smbsrv/smb_cmn_oplock.c index 0afd313281..bee55e2e60 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_cmn_oplock.c +++ b/usr/src/uts/common/fs/smbsrv/smb_cmn_oplock.c @@ -11,7 +11,7 @@ /* * Copyright 2020 Nexenta by DDN, Inc. All rights reserved. - * Copyright 2021 RackTop Systems, Inc. + * Copyright 2022 RackTop Systems, Inc. */ /* @@ -650,7 +650,7 @@ smb_oplock_req_excl( ASSERT(node->n_oplock.cnt_II >= 0); if (o == ofile) continue; - DTRACE_PROBE1(unexpected, smb_ofile_t, o); + DTRACE_PROBE1(unexpected, smb_ofile_t *, o); smb_oplock_ind_break(o, LEVEL_NONE, B_FALSE, NT_STATUS_SUCCESS); @@ -3594,7 +3594,7 @@ smb_oplock_move(smb_node_t *node, cmn_err(CE_NOTE, "smb_oplock_move: not empty?"); #endif DTRACE_PROBE2(dst__not__empty, - smb_node_t, node, smb_ofile_t, to_ofile); + smb_node_t *, node, smb_ofile_t *, to_ofile); } og_tmp = to_ofile->f_oplock; diff --git a/usr/src/uts/common/fs/smbsrv/smb_common_open.c b/usr/src/uts/common/fs/smbsrv/smb_common_open.c index cf8ed57a8d..688bac53d8 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_common_open.c +++ b/usr/src/uts/common/fs/smbsrv/smb_common_open.c @@ -835,7 +835,7 @@ smb_common_open(smb_request_t *sr) * This code path is exercised by smbtorture * smb2.durable-open.delete_on_close1 */ - DTRACE_PROBE1(node_deleted, smb_node_t, fnode); + DTRACE_PROBE1(node_deleted, smb_node_t *, fnode); tree_fid = of->f_fid; of->f_fid = 0; smb_ofile_free(of); diff --git a/usr/src/uts/common/fs/smbsrv/smb_node.c b/usr/src/uts/common/fs/smbsrv/smb_node.c index 542a646bbf..67c348433d 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_node.c +++ b/usr/src/uts/common/fs/smbsrv/smb_node.c @@ -782,7 +782,7 @@ smb_node_open_check(smb_node_t *node, uint32_t desired_access, default: ASSERT(status == NT_STATUS_SHARING_VIOLATION); DTRACE_PROBE3(conflict3, - smb_ofile_t, of, + smb_ofile_t *, of, uint32_t, desired_access, uint32_t, share_access); smb_llist_exit(&node->n_ofile_list); @@ -817,7 +817,7 @@ smb_node_rename_check(smb_node_t *node) break; default: ASSERT(status == NT_STATUS_SHARING_VIOLATION); - DTRACE_PROBE1(conflict1, smb_ofile_t, of); + DTRACE_PROBE1(conflict1, smb_ofile_t *, of); smb_llist_exit(&node->n_ofile_list); return (status); } @@ -855,7 +855,7 @@ smb_node_delete_check(smb_node_t *node) break; default: ASSERT(status == NT_STATUS_SHARING_VIOLATION); - DTRACE_PROBE1(conflict1, smb_ofile_t, of); + DTRACE_PROBE1(conflict1, smb_ofile_t *, of); smb_llist_exit(&node->n_ofile_list); return (status); } diff --git a/usr/src/uts/common/fs/smbsrv/smb_notify.c b/usr/src/uts/common/fs/smbsrv/smb_notify.c index 4a79026b8b..fc5a5a8980 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_notify.c +++ b/usr/src/uts/common/fs/smbsrv/smb_notify.c @@ -409,7 +409,7 @@ smb_notify_get_events(smb_request_t *sr) nc = &of->f_notify; DTRACE_PROBE2(notify__get__events, - smb_request_t, sr, + smb_request_t *, sr, uint32_t, nc->nc_events); /* diff --git a/usr/src/uts/common/fs/smbsrv/smb_ofile.c b/usr/src/uts/common/fs/smbsrv/smb_ofile.c index 9c275f9527..9279b71981 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_ofile.c +++ b/usr/src/uts/common/fs/smbsrv/smb_ofile.c @@ -1415,7 +1415,7 @@ smb_ofile_save_dh(void *arg) * flushes the delete queue before we do). Synchronize. */ mutex_enter(&of->f_mutex); - DTRACE_PROBE1(ofile__exit, smb_ofile_t, of); + DTRACE_PROBE1(ofile__exit, smb_ofile_t *, of); mutex_exit(&of->f_mutex); /* @@ -1509,7 +1509,7 @@ smb_ofile_delete(void *arg) */ mutex_enter(&of->f_mutex); of->f_state = SMB_OFILE_STATE_ALLOC; - DTRACE_PROBE1(ofile__exit, smb_ofile_t, of); + DTRACE_PROBE1(ofile__exit, smb_ofile_t *, of); mutex_exit(&of->f_mutex); switch (of->f_ftype) { diff --git a/usr/src/uts/common/fs/smbsrv/smb_signing.c b/usr/src/uts/common/fs/smbsrv/smb_signing.c index 3d9d9ddb23..dae53d6f97 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_signing.c +++ b/usr/src/uts/common/fs/smbsrv/smb_signing.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2017 Nexenta Systems, Inc. All rights reserved. + * Copyright 2022 RackTop Systems, Inc. */ /* * These routines provide the SMB MAC signing for the SMB server. @@ -352,7 +353,7 @@ smb_sign_check_request(smb_request_t *sr) return (0); } - DTRACE_PROBE2(smb__signature__mismatch, smb_request_t, sr, + DTRACE_PROBE2(smb__signature__mismatch, smb_request_t *, sr, unsigned char *, mac_sig); cmn_err(CE_NOTE, "smb_sign_check_request: bad signature"); diff --git a/usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c b/usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c index e7bf15ff56..5e5ea0ade0 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c +++ b/usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c @@ -11,7 +11,7 @@ /* * Copyright 2021 Tintri by DDN, Inc. All rights reserved. - * Copyright 2021 RackTop Systems, Inc. + * Copyright 2022 RackTop Systems, Inc. */ /* @@ -542,7 +542,7 @@ smb_oplock_send_brk(smb_request_t *sr) cmn_err(CE_NOTE, "clnt %s oplock break timeout", sr->session->ip_addr_str); - DTRACE_PROBE1(break_timeout, smb_ofile_t, ofile); + DTRACE_PROBE1(break_timeout, smb_ofile_t *, ofile); /* * Will do local ack below. Note, after timeout, |