mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fix the last two CFI callback prototype mismatches
There was the series from me a year ago which fixed most of the callback vs implementation prototype mismatches. It was based on running the CFI-enabled kernel (in permissive mode -- warning instead of panic) and performing a full ZTS cycle, and then fixing all of the problems caught by CFI. Now, Clang 16-dev has new warning flag, -Wcast-function-type-strict, which detect such mismatches at compile-time. It allows to find the remaining issues missed by the first series. There are only two of them left: one for the secpolicy_vnode_setattr() callback and one for taskq_dispatch(). The fix is easy, since they are not used anywhere else. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Lobakin <alobakin@pm.me> Closes #14207
This commit is contained in:
@@ -2788,7 +2788,7 @@ zfs_zaccess_rwx(znode_t *zp, mode_t mode, int flags, cred_t *cr,
|
||||
* Access function for secpolicy_vnode_setattr
|
||||
*/
|
||||
int
|
||||
zfs_zaccess_unix(znode_t *zp, mode_t mode, cred_t *cr)
|
||||
zfs_zaccess_unix(void *zp, int mode, cred_t *cr)
|
||||
{
|
||||
int v4_mode = zfs_unix_to_v4(mode >> 6);
|
||||
|
||||
|
||||
@@ -2186,7 +2186,7 @@ top:
|
||||
vap->va_mask &= ~trim_mask;
|
||||
}
|
||||
err = secpolicy_vnode_setattr(cr, ip, vap, &oldva, flags,
|
||||
(int (*)(void *, int, cred_t *))zfs_zaccess_unix, zp);
|
||||
zfs_zaccess_unix, zp);
|
||||
if (err)
|
||||
goto out3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user