* [brauner-vfs:work.f_owner 1/1] drivers/net/tun.c:3509:12: error: invalid operands to binary expression ('struct tun_file *' and 'struct sock')
@ 2024-08-12 14:04 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-08-12 14:04 UTC (permalink / raw)
To: Christian Brauner; +Cc: llvm, oe-kbuild-all, Christian Brauner
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git work.f_owner
head: 06c2bce128dd5099bfb11734c6c043e38b8f40df
commit: 06c2bce128dd5099bfb11734c6c043e38b8f40df [1/1] file: reclaim 24 bytes from f_owner
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240812/202408122247.pYJJ8C5g-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240812/202408122247.pYJJ8C5g-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/202408122247.pYJJ8C5g-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/tun.c:3509:12: error: invalid operands to binary expression ('struct tun_file *' and 'struct sock')
3509 | if (tfile && tfile->sk)
| ~~~~~ ^ ~~~~~~~~~
1 error generated.
vim +3509 drivers/net/tun.c
3466
3467 static int tun_chr_open(struct inode *inode, struct file * file)
3468 {
3469 struct net *net = current->nsproxy->net_ns;
3470 struct tun_file *tfile;
3471 int ret;
3472
3473 ret = file_f_owner_allocate(file);
3474 if (ret)
3475 return ret;
3476
3477 tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL,
3478 &tun_proto, 0);
3479 if (!tfile)
3480 goto out_cleanup;
3481 if (ptr_ring_init(&tfile->tx_ring, 0, GFP_KERNEL))
3482 goto out_cleanup;
3483
3484 mutex_init(&tfile->napi_mutex);
3485 RCU_INIT_POINTER(tfile->tun, NULL);
3486 tfile->flags = 0;
3487 tfile->ifindex = 0;
3488
3489 init_waitqueue_head(&tfile->socket.wq.wait);
3490
3491 tfile->socket.file = file;
3492 tfile->socket.ops = &tun_socket_ops;
3493
3494 sock_init_data_uid(&tfile->socket, &tfile->sk, current_fsuid());
3495
3496 tfile->sk.sk_write_space = tun_sock_write_space;
3497 tfile->sk.sk_sndbuf = INT_MAX;
3498
3499 file->private_data = tfile;
3500 INIT_LIST_HEAD(&tfile->next);
3501
3502 sock_set_flag(&tfile->sk, SOCK_ZEROCOPY);
3503
3504 /* tun groks IOCB_NOWAIT just fine, mark it as such */
3505 file->f_mode |= FMODE_NOWAIT;
3506 return 0;
3507
3508 out_cleanup:
> 3509 if (tfile && tfile->sk)
3510 sk_free(&tfile->sk);
3511 kfree(file->f_owner);
3512 return -ENOMEM;
3513 }
3514
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-12 14:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 14:04 [brauner-vfs:work.f_owner 1/1] drivers/net/tun.c:3509:12: error: invalid operands to binary expression ('struct tun_file *' and 'struct sock') kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox