From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: [CIFS] Charge at least one credit, if server says that it supports multicredit
Date: Mon, 24 Jun 2013 15:24:49 +0300 [thread overview]
Message-ID: <20130624122449.GA14149@elgon.mountain> (raw)
Hello Steve French,
This is a semi-automatic email about new static checker warnings.
The patch 7f420cee8bd6: "[CIFS] Charge at least one credit, if server
says that it supports multicredit" from Jun 23, 2013, leads to the
following Smatch complaint:
fs/cifs/smb2pdu.c:120 smb2_hdr_assemble()
warn: variable dereferenced before check 'tcon->ses' (see line 115)
fs/cifs/smb2pdu.c
114 if (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU)
^^^^^^^^^^^
New dereference.
115 hdr->CreditCharge = cpu_to_le16(1);
116 /* else CreditCharge MBZ */
117
118 hdr->TreeId = tcon->tid;
119 /* Uid is not converted */
120 if (tcon->ses)
^^^^^^^^^
Old check.
121 hdr->SessionId = tcon->ses->Suid;
122 /* BB check following DFS flags BB */
regards,
dan carpenter
next reply other threads:[~2013-06-24 12:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 12:24 Dan Carpenter [this message]
[not found] ` <20130624122449.GA14149-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2013-06-26 22:55 ` [CIFS] Charge at least one credit, if server says that it supports multicredit Steve French
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=20130624122449.GA14149@elgon.mountain \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@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