From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756254AbbJHTKI (ORCPT ); Thu, 8 Oct 2015 15:10:08 -0400 Received: from mga03.intel.com ([134.134.136.65]:50962 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753080AbbJHTJ5 (ORCPT ); Thu, 8 Oct 2015 15:09:57 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,655,1437462000"; d="scan'208";a="660571095" Date: Fri, 9 Oct 2015 03:08:36 +0800 From: kbuild test robot To: Mateusz Guzik Cc: kbuild-all@01.org, Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Dumazet Subject: Re: [PATCH] fs/file.c: tidy up close_files Message-ID: <201510090309.gqPUUxHc%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444327687-2923-1-git-send-email-mguzik@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mateusz, [auto build test WARNING on v4.3-rc4 -- if it's inappropriate base, please ignore] reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) fs/file.c:321:17: sparse: incorrect type in assignment (different address spaces) fs/file.c:321:17: expected struct file **old_fds fs/file.c:321:17: got struct file [noderef] **fd fs/file.c:322:17: sparse: incorrect type in assignment (different address spaces) fs/file.c:322:17: expected struct file **new_fds fs/file.c:322:17: got struct file [noderef] **fd >> fs/file.c:387:43: sparse: incorrect type in argument 1 (different address spaces) fs/file.c:387:43: expected struct file * fs/file.c:387:43: got struct file [noderef] * fs/file.c:446:28: sparse: incorrect type in initializer (different address spaces) fs/file.c:446:28: expected struct fdtable [noderef] *fdt fs/file.c:446:28: got struct fdtable [toplevel] * fs/file.c:606:14: sparse: incorrect type in assignment (different address spaces) fs/file.c:606:14: expected struct file *file fs/file.c:606:14: got struct file [noderef] * fs/file.c:641:30: sparse: incorrect type in assignment (different address spaces) fs/file.c:641:30: expected struct file *file fs/file.c:641:30: got struct file [noderef] * fs/file.c:802:16: sparse: incorrect type in assignment (different address spaces) fs/file.c:802:16: expected struct file *tofree fs/file.c:802:16: got struct file [noderef] * vim +387 fs/file.c 371 * It is safe to dereference the fd table without RCU or 372 * ->file_lock because this is the last reference to the 373 * files structure. 374 */ 375 struct fdtable *fdt = rcu_dereference_raw(files->fdt); 376 unsigned i; 377 378 for (i = 0; ; i++) { 379 unsigned long set; 380 unsigned fd = i * BITS_PER_LONG; 381 if (fd >= fdt->max_fds) 382 break; 383 set = fdt->open_fds[i]; 384 for ( ; set ; fd++, set >>= 1) { 385 if (!(set & 1)) 386 continue; > 387 filp_close(fdt->fd[fd], files); 388 cond_resched_rcu_qs(); 389 } 390 } 391 392 return fdt; 393 } 394 395 struct files_struct *get_files_struct(struct task_struct *task) --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation