From patchwork Thu Aug 18 02:57:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 12946639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EA4CC25B08 for ; Thu, 18 Aug 2022 02:57:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242870AbiHRC5m (ORCPT ); Wed, 17 Aug 2022 22:57:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239067AbiHRC5k (ORCPT ); Wed, 17 Aug 2022 22:57:40 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50997A6C0F; Wed, 17 Aug 2022 19:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=F1vJoryCVMtuws0pPBOXFjXCep49VgErsKZNNDCOJYQ=; b=sKZFc9FLaiCKeXO7bE+jSttT6P PJ3B6EHGQpk7UMP4u0Sz5mmi6KRfIHUYSVI1OFOOv9bEjDXj2FT7yibhL22a+lfFQD8N+Rf5AzONS BrrjtMhDFVWWQI+v6DFy+GvrOAd++iEpFDLNE1ZsGsWoHJphOy4T1TD+YvbUB1qdCzMMJVt58/MRC h058FGLOoybGQoXjLYlR4Y+ydRhiafng4jtMJkbE2Wbm3f9PACo4QCCi+aN5/dvB+Pl8g+58HPFq/ ug10cuwTN9eiPAQwrDbxzcrEhfp2oTVYm7gnuP+UtXLM5A3Zzlzo9Evh0pEdE2PckWHtTMfxwhGAt DuuK94zw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oOViy-005aXn-Nu; Thu, 18 Aug 2022 02:57:36 +0000 Date: Thu, 18 Aug 2022 03:57:36 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/5] dynamic_dname(): drop unused dentry argument Message-ID: MIME-Version: 1.0 Content-Disposition: inline Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro --- drivers/dma-buf/dma-buf.c | 2 +- fs/anon_inodes.c | 2 +- fs/d_path.c | 3 +-- fs/nsfs.c | 2 +- fs/pipe.c | 2 +- include/linux/dcache.h | 4 ++-- net/socket.c | 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index efb4990b29e1..5ec2f314b6e9 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -53,7 +53,7 @@ static char *dmabuffs_dname(struct dentry *dentry, char *buffer, int buflen) ret = strlcpy(name, dmabuf->name, DMA_BUF_NAME_LEN); spin_unlock(&dmabuf->name_lock); - return dynamic_dname(dentry, buffer, buflen, "/%s:%s", + return dynamic_dname(buffer, buflen, "/%s:%s", dentry->d_name.name, ret > 0 ? name : ""); } diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index e0c3e33c4177..24192a7667ed 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -32,7 +32,7 @@ static struct inode *anon_inode_inode; */ static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen) { - return dynamic_dname(dentry, buffer, buflen, "anon_inode:%s", + return dynamic_dname(buffer, buflen, "anon_inode:%s", dentry->d_name.name); } diff --git a/fs/d_path.c b/fs/d_path.c index e4e0ebad1f15..ce8d9d49e1e7 100644 --- a/fs/d_path.c +++ b/fs/d_path.c @@ -297,8 +297,7 @@ EXPORT_SYMBOL(d_path); /* * Helper function for dentry_operations.d_dname() members */ -char *dynamic_dname(struct dentry *dentry, char *buffer, int buflen, - const char *fmt, ...) +char *dynamic_dname(char *buffer, int buflen, const char *fmt, ...) { va_list args; char temp[64]; diff --git a/fs/nsfs.c b/fs/nsfs.c index 800c1d0eb0d0..3506f6074288 100644 --- a/fs/nsfs.c +++ b/fs/nsfs.c @@ -28,7 +28,7 @@ static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) struct inode *inode = d_inode(dentry); const struct proc_ns_operations *ns_ops = dentry->d_fsdata; - return dynamic_dname(dentry, buffer, buflen, "%s:[%lu]", + return dynamic_dname(buffer, buflen, "%s:[%lu]", ns_ops->name, inode->i_ino); } diff --git a/fs/pipe.c b/fs/pipe.c index 74ae9fafd25a..42c7ff41c2db 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -860,7 +860,7 @@ static struct vfsmount *pipe_mnt __read_mostly; */ static char *pipefs_dname(struct dentry *dentry, char *buffer, int buflen) { - return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]", + return dynamic_dname(buffer, buflen, "pipe:[%lu]", d_inode(dentry)->i_ino); } diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 92c78ed02b54..54d46518c481 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -287,8 +287,8 @@ static inline unsigned d_count(const struct dentry *dentry) /* * helper function for dentry_operations.d_dname() members */ -extern __printf(4, 5) -char *dynamic_dname(struct dentry *, char *, int, const char *, ...); +extern __printf(3, 4) +char *dynamic_dname(char *, int, const char *, ...); extern char *__d_path(const struct path *, const struct path *, char *, int); extern char *d_absolute_path(const struct path *, char *, int); diff --git a/net/socket.c b/net/socket.c index 9b27c5e4e5ba..d183e83e0cdf 100644 --- a/net/socket.c +++ b/net/socket.c @@ -355,7 +355,7 @@ static const struct super_operations sockfs_ops = { */ static char *sockfs_dname(struct dentry *dentry, char *buffer, int buflen) { - return dynamic_dname(dentry, buffer, buflen, "socket:[%lu]", + return dynamic_dname(buffer, buflen, "socket:[%lu]", d_inode(dentry)->i_ino); } From patchwork Thu Aug 18 02:58:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 12946640 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F2D0C25B08 for ; Thu, 18 Aug 2022 02:58:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242767AbiHRC6V (ORCPT ); Wed, 17 Aug 2022 22:58:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242690AbiHRC6T (ORCPT ); Wed, 17 Aug 2022 22:58:19 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6205CE16; Wed, 17 Aug 2022 19:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=UmMaki5Hhl1wi+eFZfWuavkqEBkBswlN79+IhR2ejDM=; b=poOwA4KxRlQba1sGycIsPSb/re KEhm5z0NxN2d28v0n/+BY4PiqbMDuovmooeHmzuQnXpWpCevw4KUs+KbHdViXfcubwh+6lZf0Chhe RcFTowVbmqPKjBemjVhzJJRoOcWpZ27Dr5nLPcvDW8JD51yH5xjMweIX9MfWjKBX8+0gyxl9/L04x 1QQDg4XGbSCsAWjhTwDSKapDwLhPCyGsJYJN5kTHRswbD1PEogoRgYcj86tBdF57woETFAKOt18eD HB2LrJ3FJ/jTatZe13rzJrAHARSRERmeUqs2gwgbLeCnKRYw/ujRW37+itsCHBth4RmI1QbFo7CeB kybeQxhw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oOVjd-005aZ6-8Z; Thu, 18 Aug 2022 02:58:17 +0000 Date: Thu, 18 Aug 2022 03:58:17 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/5] ksmbd: don't open-code file_path() Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro Acked-by: Namjae Jeon --- fs/ksmbd/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c index 9751cc92c111..0e1924a6476d 100644 --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -5416,7 +5416,7 @@ static int smb2_rename(struct ksmbd_work *work, if (!pathname) return -ENOMEM; - abs_oldname = d_path(&fp->filp->f_path, pathname, PATH_MAX); + abs_oldname = file_path(fp->filp, pathname, PATH_MAX); if (IS_ERR(abs_oldname)) { rc = -EINVAL; goto out; @@ -5551,7 +5551,7 @@ static int smb2_create_link(struct ksmbd_work *work, } ksmbd_debug(SMB, "link name is %s\n", link_name); - target_name = d_path(&filp->f_path, pathname, PATH_MAX); + target_name = file_path(filp, pathname, PATH_MAX); if (IS_ERR(target_name)) { rc = -EINVAL; goto out; From patchwork Thu Aug 18 02:58:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 12946641 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF4E9C25B08 for ; Thu, 18 Aug 2022 02:58:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242885AbiHRC6z (ORCPT ); Wed, 17 Aug 2022 22:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242690AbiHRC6y (ORCPT ); Wed, 17 Aug 2022 22:58:54 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F29E813E3E; Wed, 17 Aug 2022 19:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=iFejAed+UMnGncLV0egPSQoz7oFNyDnBGzFlyTFey3U=; b=Xn2kKJ2ZMBlBJqmwrNJLxDqh1M fEqrNoccgXBf8GNxF4TAJ8obIrU28DP4Gr+eSDzvYMEEnSFf9xYnl8vWCinG+XuajbDcecmK5AIc3 ptgTdQI7hX0WABZNstR2sFHfUywahajlRf/eps1M6EuJoTGKFlznAZMDyDxruBXLUWZYe/L/85PyH bnDBAZObLNLnyBY8gDYx0uZBwm6vnSa+kO+QDHin1RKYNZYxGGQy5sfreWEuNxNGWx0oV8o5WVZuI AfCMDMU0b4jzEeg3TQa+jJQbxW1tWmK7+Ybu9D7zcUCPpjYBjqHihJZiE0f66XXjLP2Xh6DqQ+QYU 9Hvv0UVw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oOVkB-005aa7-HJ; Thu, 18 Aug 2022 02:58:51 +0000 Date: Thu, 18 Aug 2022 03:58:51 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 3/5] ->getprocattr(): attribute name is const char *, TYVM... Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org cast of ->d_name.name to char * is completely wrong - nothing is allowed to modify its contents. Signed-off-by: Al Viro Reviewed-by: Christian Brauner (Microsoft) --- fs/proc/base.c | 2 +- include/linux/lsm_hook_defs.h | 2 +- include/linux/security.h | 4 ++-- security/apparmor/lsm.c | 2 +- security/security.c | 4 ++-- security/selinux/hooks.c | 2 +- security/smack/smack_lsm.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 93f7e3d971e4..e347b8ce140c 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2728,7 +2728,7 @@ static ssize_t proc_pid_attr_read(struct file * file, char __user * buf, return -ESRCH; length = security_getprocattr(task, PROC_I(inode)->op.lsm, - (char*)file->f_path.dentry->d_name.name, + file->f_path.dentry->d_name.name, &p); put_task_struct(task); if (length > 0) diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h index 806448173033..03360d27bedf 100644 --- a/include/linux/lsm_hook_defs.h +++ b/include/linux/lsm_hook_defs.h @@ -253,7 +253,7 @@ LSM_HOOK(int, 0, sem_semop, struct kern_ipc_perm *perm, struct sembuf *sops, LSM_HOOK(int, 0, netlink_send, struct sock *sk, struct sk_buff *skb) LSM_HOOK(void, LSM_RET_VOID, d_instantiate, struct dentry *dentry, struct inode *inode) -LSM_HOOK(int, -EINVAL, getprocattr, struct task_struct *p, char *name, +LSM_HOOK(int, -EINVAL, getprocattr, struct task_struct *p, const char *name, char **value) LSM_HOOK(int, -EINVAL, setprocattr, const char *name, void *value, size_t size) LSM_HOOK(int, 0, ismaclabel, const char *name) diff --git a/include/linux/security.h b/include/linux/security.h index 1bc362cb413f..93488c01d9bd 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -461,7 +461,7 @@ int security_sem_semctl(struct kern_ipc_perm *sma, int cmd); int security_sem_semop(struct kern_ipc_perm *sma, struct sembuf *sops, unsigned nsops, int alter); void security_d_instantiate(struct dentry *dentry, struct inode *inode); -int security_getprocattr(struct task_struct *p, const char *lsm, char *name, +int security_getprocattr(struct task_struct *p, const char *lsm, const char *name, char **value); int security_setprocattr(const char *lsm, const char *name, void *value, size_t size); @@ -1301,7 +1301,7 @@ static inline void security_d_instantiate(struct dentry *dentry, { } static inline int security_getprocattr(struct task_struct *p, const char *lsm, - char *name, char **value) + const char *name, char **value) { return -EINVAL; } diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index e29cade7b662..f56070270c69 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -614,7 +614,7 @@ static int apparmor_sb_pivotroot(const struct path *old_path, return error; } -static int apparmor_getprocattr(struct task_struct *task, char *name, +static int apparmor_getprocattr(struct task_struct *task, const char *name, char **value) { int error = -ENOENT; diff --git a/security/security.c b/security/security.c index 14d30fec8a00..d8227531e2fd 100644 --- a/security/security.c +++ b/security/security.c @@ -2057,8 +2057,8 @@ void security_d_instantiate(struct dentry *dentry, struct inode *inode) } EXPORT_SYMBOL(security_d_instantiate); -int security_getprocattr(struct task_struct *p, const char *lsm, char *name, - char **value) +int security_getprocattr(struct task_struct *p, const char *lsm, + const char *name, char **value) { struct security_hook_list *hp; diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 79573504783b..c8168d19fb96 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -6327,7 +6327,7 @@ static void selinux_d_instantiate(struct dentry *dentry, struct inode *inode) } static int selinux_getprocattr(struct task_struct *p, - char *name, char **value) + const char *name, char **value) { const struct task_security_struct *__tsec; u32 sid; diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 001831458fa2..434b348d8fcd 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -3479,7 +3479,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode) * * Returns the length of the smack label or an error code */ -static int smack_getprocattr(struct task_struct *p, char *name, char **value) +static int smack_getprocattr(struct task_struct *p, const char *name, char **value) { struct smack_known *skp = smk_of_task_struct_obj(p); char *cp; From patchwork Thu Aug 18 02:59:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 12946642 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E5B2C25B08 for ; Thu, 18 Aug 2022 02:59:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242904AbiHRC7Z (ORCPT ); Wed, 17 Aug 2022 22:59:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242901AbiHRC7Y (ORCPT ); Wed, 17 Aug 2022 22:59:24 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC76445F69; Wed, 17 Aug 2022 19:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ASEUGz7cWLg+rQ8611/fIqPtCeFG8olFVXzJbYSDQzs=; b=Pueurmcq0kfuZIQ+jCxKjdrRP9 Kg241jyA1XznTr/9t2Dfz1ODc36s+/y73GuvXl7uBs2Akp03PgjoitVPNuYM4v5Km/L/U57VYn9Gq UGdcNsCVkNzOQkS+h057cz3jWOXDDQ3DGZdccjj/1rNnH2nxTpBYluxy1QypaA0bC6ddT/6fxC3mD 1U5JinSOFv0kYDwFbD+yKQq4JJUQPAOfU1p6zMKJ1lMxA2wDtU9F5YNQeKX6r9LXE1g1nUu9HR3SN YJPW4od+SXh6w/rIHuh+KAqHyJf790Eq8WXmEL/5GA1AAFR8EAaq7D8tVY/kzJTsGT5BRRDmsTRRr 5E+rWbzg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oOVkg-005abP-Ac; Thu, 18 Aug 2022 02:59:22 +0000 Date: Thu, 18 Aug 2022 03:59:22 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 4/5] ksmbd: don't open-code %pf Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro Signed-off-by: Al Viro Acked-by: Namjae Jeon Signed-off-by: Al Viro Acked-by: Namjae Jeon --- fs/ksmbd/vfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ksmbd/vfs.c b/fs/ksmbd/vfs.c index 78d01033604c..a0fafba8b5d0 100644 --- a/fs/ksmbd/vfs.c +++ b/fs/ksmbd/vfs.c @@ -1743,11 +1743,11 @@ int ksmbd_vfs_copy_file_ranges(struct ksmbd_work *work, *total_size_written = 0; if (!(src_fp->daccess & (FILE_READ_DATA_LE | FILE_EXECUTE_LE))) { - pr_err("no right to read(%pd)\n", src_fp->filp->f_path.dentry); + pr_err("no right to read(%pf)\n", src_fp->filp); return -EACCES; } if (!(dst_fp->daccess & (FILE_WRITE_DATA_LE | FILE_APPEND_DATA_LE))) { - pr_err("no right to write(%pd)\n", dst_fp->filp->f_path.dentry); + pr_err("no right to write(%pf)\n", dst_fp->filp); return -EACCES; } From patchwork Thu Aug 18 02:59:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 12946643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9371C25B08 for ; Thu, 18 Aug 2022 03:00:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242912AbiHRDAI (ORCPT ); Wed, 17 Aug 2022 23:00:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242590AbiHRDAD (ORCPT ); Wed, 17 Aug 2022 23:00:03 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9171B7D1D7; Wed, 17 Aug 2022 20:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VMfn/3UTi+5xfs9vQsw6e6I9yGzn/hW4ZTjpTnY2k1M=; b=nhOpdEHaP/T/M+W1ck+7V24SmY YZAbw3frWl0JxwHqSAhez8AumyaJXk1r1rHtRvATkjvyXHjXPbPz8ehdW11ClRehKIfE8+mf72nv0 VtBpXlL7mRAmHTCA4LesTy6ySSfFxDVEYv0XzP/tf/83eBEoiPLeEy+JiSqfbit5xg+CUcU8heXSX EaNXkzJX9VhTs0iQGBx9hXWMNCdGRKI0sEYFNd/H8sxtE/V1O8UxuqHYg1YNWhUl6ZWkQAYUm5b+o Fptw4VuQKl8dgk69wjUP1jgBPnYS4cde/xci0t/nvIsNybaX/2t51EfFQOH0xoj7NR4t5WhHKVBEq SipqjgCQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oOVlG-005acZ-O2; Thu, 18 Aug 2022 02:59:58 +0000 Date: Thu, 18 Aug 2022 03:59:58 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 5/5] d_path.c: typo fix... Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro --- fs/d_path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/d_path.c b/fs/d_path.c index ce8d9d49e1e7..56a6ee4c6331 100644 --- a/fs/d_path.c +++ b/fs/d_path.c @@ -34,7 +34,7 @@ static bool prepend_char(struct prepend_buffer *p, unsigned char c) } /* - * The source of the prepend data can be an optimistoc load + * The source of the prepend data can be an optimistic load * of a dentry name and length. And because we don't hold any * locks, the length and the pointer to the name may not be * in sync if a concurrent rename happens, and the kernel