public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: NeilBrown <neilb@suse.de>, Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, David Disseldorp <ddiss@suse.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] NFS: move _maxsz and _sz #defines to the function which they describe.
Date: Wed, 4 Dec 2024 22:03:35 +0800	[thread overview]
Message-ID: <202412042135.z6hANLmp-lkp@intel.com> (raw)
In-Reply-To: <20241204025703.2662394-3-neilb@suse.de>

Hi NeilBrown,

kernel test robot noticed the following build warnings:

[auto build test WARNING on trondmy-nfs/linux-next]
[also build test WARNING on linus/master v6.13-rc1 next-20241203]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/NeilBrown/NFS-fix-open_owner_id_maxsz-and-related-fields/20241204-124433
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
patch link:    https://lore.kernel.org/r/20241204025703.2662394-3-neilb%40suse.de
patch subject: [PATCH 2/2] NFS: move _maxsz and _sz #defines to the function which they describe.
config: x86_64-randconfig-161 (https://download.01.org/0day-ci/archive/20241204/202412042135.z6hANLmp-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412042135.z6hANLmp-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412042135.z6hANLmp-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/nfs/nfs4xdr.c:3040: warning: "decode_sequence_maxsz" redefined
    3040 | #define decode_sequence_maxsz   (op_decode_hdr_maxsz + \
         | 
   fs/nfs/nfs4xdr.c:135: note: this is the location of the previous definition
     135 | #define decode_sequence_maxsz   0
         | 
>> fs/nfs/nfs4xdr.c:6068: warning: "encode_sequence_maxsz" redefined
    6068 | #define encode_sequence_maxsz   (op_encode_hdr_maxsz + \
         | 
   fs/nfs/nfs4xdr.c:134: note: this is the location of the previous definition
     134 | #define encode_sequence_maxsz   0
         | 


vim +/decode_sequence_maxsz +3040 fs/nfs/nfs4xdr.c

  3039	
> 3040	#define decode_sequence_maxsz	(op_decode_hdr_maxsz + \
  3041					XDR_QUADLEN(NFS4_MAX_SESSIONID_LEN) + 5)
  3042	static int decode_sequence(struct xdr_stream *xdr,
  3043				   struct nfs4_sequence_res *res,
  3044				   struct rpc_rqst *rqstp)
  3045	{
  3046	#if defined(CONFIG_NFS_V4_1)
  3047		struct nfs4_session *session;
  3048		struct nfs4_sessionid id;
  3049		u32 dummy;
  3050		int status;
  3051		__be32 *p;
  3052	
  3053		if (res->sr_slot == NULL)
  3054			return 0;
  3055		if (!res->sr_slot->table->session)
  3056			return 0;
  3057	
  3058		status = decode_op_hdr(xdr, OP_SEQUENCE);
  3059		if (!status)
  3060			status = decode_sessionid(xdr, &id);
  3061		if (unlikely(status))
  3062			goto out_err;
  3063	
  3064		/*
  3065		 * If the server returns different values for sessionID, slotID or
  3066		 * sequence number, the server is looney tunes.
  3067		 */
  3068		status = -EREMOTEIO;
  3069		session = res->sr_slot->table->session;
  3070	
  3071		if (memcmp(id.data, session->sess_id.data,
  3072			   NFS4_MAX_SESSIONID_LEN)) {
  3073			dprintk("%s Invalid session id\n", __func__);
  3074			goto out_err;
  3075		}
  3076	
  3077		p = xdr_inline_decode(xdr, 20);
  3078		if (unlikely(!p))
  3079			goto out_overflow;
  3080	
  3081		/* seqid */
  3082		dummy = be32_to_cpup(p++);
  3083		if (dummy != res->sr_slot->seq_nr) {
  3084			dprintk("%s Invalid sequence number\n", __func__);
  3085			goto out_err;
  3086		}
  3087		/* slot id */
  3088		dummy = be32_to_cpup(p++);
  3089		if (dummy != res->sr_slot->slot_nr) {
  3090			dprintk("%s Invalid slot id\n", __func__);
  3091			goto out_err;
  3092		}
  3093		/* highest slot id */
  3094		res->sr_highest_slotid = be32_to_cpup(p++);
  3095		/* target highest slot id */
  3096		res->sr_target_highest_slotid = be32_to_cpup(p++);
  3097		/* result flags */
  3098		res->sr_status_flags = be32_to_cpup(p);
  3099		status = 0;
  3100	out_err:
  3101		res->sr_status = status;
  3102		return status;
  3103	out_overflow:
  3104		status = -EIO;
  3105		goto out_err;
  3106	#else  /* CONFIG_NFS_V4_1 */
  3107		return 0;
  3108	#endif /* CONFIG_NFS_V4_1 */
  3109	}
  3110	

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

      parent reply	other threads:[~2024-12-04 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04  2:53 [PATCH 0/2] NFS - fix some _maxsz and _sz #defines NeilBrown
2024-12-04  2:53 ` [PATCH 1/2] NFS: fix open_owner_id_maxsz and related fields NeilBrown
2024-12-04  2:53 ` [PATCH 2/2] NFS: move _maxsz and _sz #defines to the function which they describe NeilBrown
2024-12-04 12:26   ` kernel test robot
2024-12-04 14:03   ` kernel test robot [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=202412042135.z6hANLmp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anna@kernel.org \
    --cc=ddiss@suse.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=trondmy@kernel.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