From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
To: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
kjella79-eZNTXLQAfP4@public.gmane.org,
linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] cifs: make cifs_ioctl handle NULL filp->private_data correctly
Date: Mon, 08 Nov 2010 18:14:55 +0530 [thread overview]
Message-ID: <4CD7F0C7.1060005@suse.de> (raw)
In-Reply-To: <1289219312-21396-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On 11/08/2010 05:58 PM, Jeff Layton wrote:
> Commit 13cfb7334e made cifs_ioctl use the tlink attached to the
> cifsFileInfo for a filp. This ignores the case of an open directory
> however, which in CIFS can have a NULL private_data until a readdir
> is done on it.
>
> This patch re-adds the NULL pointer checks that were removed in commit
> 50ae28f01 and moves the setting of tcon and "caps" variables lower.
>
> Long term, a better fix would be to establish a f_op->open routine for
> directories that populates that field at open time, but that requires
> some other changes to how readdir calls are handled.
>
> Reported-by: Kjell Rune Skaaraas <kjella79-eZNTXLQAfP4@public.gmane.org>
> Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> fs/cifs/ioctl.c | 12 ++++++++++--
> 1 files changed, 10 insertions(+), 2 deletions(-)
>
Looks correct to me and fixes the bug caused by my reproducer.
(BTW, the file should be open with O_RDONLY in the reproducer to trigger
the Oops)
Reviewed-and-Tested-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
next prev parent reply other threads:[~2010-11-08 12:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 12:28 [PATCH] cifs: make cifs_ioctl handle NULL filp->private_data correctly Jeff Layton
[not found] ` <1289219312-21396-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-11-08 12:44 ` Suresh Jayaraman [this message]
2010-11-08 15:02 ` Steve French
-- strict thread matches above, loose matches on Subject: below --
2010-11-08 11:45 Jeff Layton
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=4CD7F0C7.1060005@suse.de \
--to=sjayaraman-l3a5bk7wagm@public.gmane.org \
--cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=kjella79-eZNTXLQAfP4@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox