linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev, Volker Lendecke <vl@samba.org>,
	linux-cifs@vger.kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	Volker Lendecke <vl@samba.org>
Subject: Re: [PATCH 02/10] cifs: Make "resp_buf_type" initialization consistent
Date: Mon, 20 Mar 2023 08:57:32 +0300	[thread overview]
Message-ID: <0c9a0f8e-dfbb-4778-92f7-e9f3b63680af@kili.mountain> (raw)
In-Reply-To: <715459412f19853c56156b8c0ce39fe74f148860.1678885349.git.vl@samba.org>

Hi Volker,

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Volker-Lendecke/cifs-Simplify-some-callers-of-compound_send_recv/20230315-212751
base:   git://git.samba.org/sfrench/cifs-2.6.git for-next
patch link:    https://lore.kernel.org/r/715459412f19853c56156b8c0ce39fe74f148860.1678885349.git.vl%40samba.org
patch subject: [PATCH 02/10] cifs: Make "resp_buf_type" initialization consistent
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20230316/202303160920.kX2EmZmU-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202303160920.kX2EmZmU-lkp@intel.com/

New smatch warnings:
fs/cifs/smb2pdu.c:3031 SMB2_open() error: uninitialized symbol 'resp_buftype'.
fs/cifs/smb2pdu.c:3258 SMB2_ioctl() error: uninitialized symbol 'resp_buftype'.
fs/cifs/smb2pdu.c:3385 __SMB2_close() error: uninitialized symbol 'resp_buftype'.
fs/cifs/smb2pdu.c:3590 query_info() error: uninitialized symbol 'resp_buftype'.
fs/cifs/smb2pdu.c:3756 SMB2_change_notify() error: uninitialized symbol 'resp_buftype'.
fs/cifs/smb2pdu.c:4021 SMB2_flush() error: uninitialized symbol 'resp_buftype'.
fs/cifs/smb2pdu.c:5077 SMB2_query_directory() error: uninitialized symbol 'resp_buftype'.
fs/cifs/cifssmb.c:2079 CIFSSMBPosixLock() error: uninitialized symbol 'resp_buf_type'.

Old smatch warnings:
fs/cifs/smb2pdu.c:3750 SMB2_change_notify() error: we previously assumed 'plen' could be null (see line 3709)
fs/cifs/cifssmb.c:4082 CIFSFindFirst() warn: missing error code? 'rc'
fs/cifs/cifssmb.c:4209 CIFSFindNext() warn: missing error code? 'rc'

vim +/resp_buftype +3031 fs/cifs/smb2pdu.c

f0df737ee820ec Pavel Shilovsky 2012-09-18  3013  
f0df737ee820ec Pavel Shilovsky 2012-09-18  3014  	if (buf) {
fbcff33d4204cb Kees Cook       2021-06-21  3015  		buf->CreationTime = rsp->CreationTime;
fbcff33d4204cb Kees Cook       2021-06-21  3016  		buf->LastAccessTime = rsp->LastAccessTime;
fbcff33d4204cb Kees Cook       2021-06-21  3017  		buf->LastWriteTime = rsp->LastWriteTime;
fbcff33d4204cb Kees Cook       2021-06-21  3018  		buf->ChangeTime = rsp->ChangeTime;
f0df737ee820ec Pavel Shilovsky 2012-09-18  3019  		buf->AllocationSize = rsp->AllocationSize;
f0df737ee820ec Pavel Shilovsky 2012-09-18  3020  		buf->EndOfFile = rsp->EndofFile;
f0df737ee820ec Pavel Shilovsky 2012-09-18  3021  		buf->Attributes = rsp->FileAttributes;
f0df737ee820ec Pavel Shilovsky 2012-09-18  3022  		buf->NumberOfLinks = cpu_to_le32(1);
f0df737ee820ec Pavel Shilovsky 2012-09-18  3023  		buf->DeletePending = 0;
f0df737ee820ec Pavel Shilovsky 2012-09-18  3024  	}
2e44b288788213 Pavel Shilovsky 2012-09-18  3025  
89a5bfa350faf8 Steve French    2019-07-18  3026  
89a5bfa350faf8 Steve French    2019-07-18  3027  	smb2_parse_contexts(server, rsp, &oparms->fid->epoch,
69dda3059e7a4d Aurelien Aptel  2020-03-02  3028  			    oparms->fid->lease_key, oplock, buf, posix);
2503a0dba98948 Pavel Shilovsky 2011-12-26  3029  creat_exit:
1eb9fb52040fc6 Ronnie Sahlberg 2018-08-08  3030  	SMB2_open_free(&rqst);
2503a0dba98948 Pavel Shilovsky 2011-12-26 @3031  	free_rsp_buf(resp_buftype, rsp);

Hard to tell if this is a false positive without more context, but it
looks properly sus.

2503a0dba98948 Pavel Shilovsky 2011-12-26  3032  	return rc;
2503a0dba98948 Pavel Shilovsky 2011-12-26  3033  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests


  parent reply	other threads:[~2023-03-20  5:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 13:05 [PATCH 00/10] Some cleanups for fs/cifs Volker Lendecke
2023-03-15 13:05 ` [PATCH 01/10] cifs: Simplify some callers of compound_send_recv() Volker Lendecke
2023-03-15 13:05 ` [PATCH 02/10] cifs: Make "resp_buf_type" initialization consistent Volker Lendecke
2023-03-15 19:33   ` kernel test robot
2023-03-20  5:57   ` Dan Carpenter [this message]
2023-03-15 13:05 ` [PATCH 03/10] cifs: Slightly simplify cifs_readdir() Volker Lendecke
2023-03-15 13:05 ` [PATCH 04/10] " Volker Lendecke
2023-03-15 13:05 ` [PATCH 05/10] cifs: Simplify SMB2_OP_RMDIR with CREATE_DELETE_ON_CLOSE Volker Lendecke
2023-03-15 13:05 ` [PATCH 06/10] cifs: Slightly refactor smb2_compound_op() Volker Lendecke
2023-03-15 13:05 ` [PATCH 07/10] cifs: Reduce copy&paste in smb2_compound_op() Volker Lendecke
2023-03-15 13:05 ` [PATCH 08/10] cifs: Avoid two "else" branches Volker Lendecke
2023-03-15 13:05 ` [PATCH 09/10] cifs: Store smb3_create_tag_posix just once Volker Lendecke
2023-03-15 13:05 ` [PATCH 10/10] cifs: Use switch/case to dissect negprot reply ctxts Volker Lendecke
2023-03-15 14:49 ` [PATCH 00/10] Some cleanups for fs/cifs Tom Talpey

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=0c9a0f8e-dfbb-4778-92f7-e9f3b63680af@kili.mountain \
    --to=error27@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=vl@samba.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;
as well as URLs for NNTP newsgroup(s).