From: "Aurélien Aptel" <aaptel@suse.com>
To: Pavel Shilovsky <piastryyy@gmail.com>,
Steve French <smfrench@gmail.com>,
linux-cifs@vger.kernel.org
Cc: Long Li <longli@microsoft.com>
Subject: Re: [PATCH] CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks
Date: Mon, 02 Dec 2019 13:25:17 +0100 [thread overview]
Message-ID: <878snuud76.fsf@suse.com> (raw)
In-Reply-To: <20191128001839.5926-1-pshilov@microsoft.com>
Pavel Shilovsky <piastryyy@gmail.com> writes:
> Currently when the client creates a cifsFileInfo structure for
> a newly opened file, it allocates a list of byte-range locks
> with a pointer to the new cfile and attaches this list to the
> inode's lock list. The latter happens before initializing all
> other fields, e.g. cfile->tlink. Thus a partially initialized
> cifsFileInfo structure becomes available to other threads that
> walk through the inode's lock list. One example of such a thread
> may be an oplock break worker thread that tries to push all
> cached byte-range locks. This causes NULL-pointer dereference
> in smb2_push_mandatory_locks() when accessing cfile->tlink:
reviewing late but this makes sense.
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
prev parent reply other threads:[~2019-12-02 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 0:18 [PATCH] CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks Pavel Shilovsky
2019-12-01 5:27 ` Steve French
2019-12-02 12:25 ` Aurélien Aptel [this message]
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=878snuud76.fsf@suse.com \
--to=aaptel@suse.com \
--cc=linux-cifs@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=piastryyy@gmail.com \
--cc=smfrench@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox