From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Oren Laadan <orenl@cs.columbia.edu>,
Matt Helsley <matthltc@us.ibm.com>,
matthew@wil.cx, linux-fsdevel@vger.kernel.org,
Containers <containers@lists.linux-foundation.org>
Subject: Re: [RFC][PATCH 1/3][cr][v2]: Define do_setlease()
Date: Wed, 26 May 2010 08:52:56 -0500 [thread overview]
Message-ID: <20100526135256.GA25799@us.ibm.com> (raw)
In-Reply-To: <1274836063-13271-2-git-send-email-sukadev@linux.vnet.ibm.com>
Quoting Sukadev Bhattiprolu (sukadev@linux.vnet.ibm.com):
> Move the core functionality of fcntl_setlease() into a new function,
> do_setlease(). do_setlease() is same as fcntl_setlease() except that
> it takes an extra 'rem_lease' parameter. do_setlease() will be used
> in a follow-on patch to checkpoint/restart file-leases.
>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> ---
> fs/locks.c | 27 ++++++++++++++++-----------
> include/linux/fs.h | 1 +
> 2 files changed, 17 insertions(+), 11 deletions(-)
>
> diff --git a/fs/locks.c b/fs/locks.c
> index c62ab7f..4107295 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -1471,17 +1471,7 @@ int vfs_setlease(struct file *filp, long arg, struct file_lock **lease)
> }
> EXPORT_SYMBOL_GPL(vfs_setlease);
>
> -/**
> - * fcntl_setlease - sets a lease on an open file
> - * @fd: open file descriptor
> - * @filp: file pointer
> - * @arg: type of lease to obtain
> - *
> - * Call this fcntl to establish a lease on the file.
> - * Note that you also need to call %F_SETSIG to
> - * receive a signal when the lease is broken.
> - */
> -int fcntl_setlease(unsigned int fd, struct file *filp, long arg)
> +int do_setlease(unsigned int fd, struct file *filp, long arg, int rem_lease)
> {
Note that rem_lease arg here is int, but the value you're checkpointing
and passing in is unsigned long. So userspace on 64-bit could easily
overflow that, though not sure to what end. Also putting 'unsigned long'
in the checkpoint_hdr.h is not in keeping with the rest of that file.
thanks,
-serge
next prev parent reply other threads:[~2010-05-26 13:59 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 1:07 [RFC][PATCH 0/3][cr][v2]: Checkpoint/restart file leases Sukadev Bhattiprolu
2010-05-26 1:07 ` [RFC][PATCH 1/3][cr][v2]: Define do_setlease() Sukadev Bhattiprolu
2010-05-26 13:52 ` Serge E. Hallyn [this message]
[not found] ` <20100526135256.GA25799-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-05-26 17:14 ` Sukadev Bhattiprolu
2010-05-26 17:14 ` Sukadev Bhattiprolu
[not found] ` <1274836063-13271-2-git-send-email-sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2010-05-26 13:52 ` Serge E. Hallyn
[not found] ` <1274836063-13271-1-git-send-email-sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2010-05-26 1:07 ` Sukadev Bhattiprolu
2010-05-26 1:07 ` [RFC][PATCH 2/3][cr][v2]: Checkpoint/restart file leases Sukadev Bhattiprolu
2010-05-26 1:07 ` [RFC][PATCH 3/3][cr][v2]: fileleases: C/R of an in-progress lease Sukadev Bhattiprolu
2010-05-26 1:07 ` [RFC][PATCH 2/3][cr][v2]: Checkpoint/restart file leases Sukadev Bhattiprolu
[not found] ` <1274836063-13271-3-git-send-email-sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2010-06-15 4:40 ` Oren Laadan
2010-06-15 4:40 ` Oren Laadan
2010-07-30 19:16 ` Sukadev Bhattiprolu
[not found] ` <20100730191607.GA16238-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-07-30 19:45 ` Oren Laadan
2010-07-30 19:45 ` Oren Laadan
2010-07-30 21:37 ` john stultz
2010-07-30 22:32 ` Oren Laadan
[not found] ` <4C5352EF.9080601-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-07-31 0:35 ` Sukadev Bhattiprolu
2010-07-31 0:35 ` Sukadev Bhattiprolu
[not found] ` <20100731003504.GA3544-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-07-31 1:36 ` Matt Helsley
2010-07-31 4:52 ` Oren Laadan
2010-07-31 1:36 ` Matt Helsley
2010-07-31 4:52 ` Oren Laadan
[not found] ` <1280525871.2451.23.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-07-30 22:32 ` Oren Laadan
[not found] ` <4C532BC9.6050109-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-07-30 21:37 ` john stultz
[not found] ` <4C170430.2030708-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-07-30 19:16 ` Sukadev Bhattiprolu
2010-05-26 1:07 ` [RFC][PATCH 3/3][cr][v2]: fileleases: C/R of an in-progress lease Sukadev Bhattiprolu
2010-06-15 4:43 ` Oren Laadan
[not found] ` <1274836063-13271-4-git-send-email-sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2010-06-15 4:43 ` Oren Laadan
2010-06-16 11:18 ` Jamie Lokier
2010-06-16 14:52 ` Oren Laadan
2010-06-16 11:18 ` Jamie Lokier
2010-06-16 15:08 ` Oren Laadan
[not found] ` <20100616111843.GA15054-yetKDKU6eevNLxjTenLetw@public.gmane.org>
2010-06-16 15:08 ` Oren Laadan
2010-06-16 17:46 ` Matt Helsley
2010-06-16 17:46 ` Matt Helsley
2010-06-16 14:52 ` Oren Laadan
2010-06-16 19:57 ` Sukadev Bhattiprolu
[not found] ` <4C18E534.80700-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-06-16 19:57 ` Sukadev Bhattiprolu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100526135256.GA25799@us.ibm.com \
--to=serue@us.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=matthltc@us.ibm.com \
--cc=orenl@cs.columbia.edu \
--cc=sukadev@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.