Re: [PATCH 10/10] nfsd: clients don't need to break their own delegations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



J. Bruce Fields <bfields@xxxxxxxxxx> wrote:

> @@ -139,6 +139,9 @@ struct cred {
>  	struct key	*thread_keyring; /* keyring private to this thread */
>  	struct key	*request_key_auth; /* assumed request_key authority */
>  #endif
> +#ifdef CONFIG_FILE_LOCKING
> +	void		*lease_breaker; /* identify NFS client breaking a delegation */
> +#endif
>  #ifdef CONFIG_SECURITY
>  	void		*security;	/* subjective LSM security */
>  #endif

Sorry, but ewww.

Two reasons for that comment:

 (1) The cred struct may get retained long past where you expect if it gets
     attached to another process or a file descriptor.

 (2) The ->lease_breaker pointer needs lifetime management in cred.c.  It will
     potentially get copied around and may need cleaning up.

Can you stick your breaker identity in a key struct as Jeff suggested?

David



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux