public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jerry Wu <w.7erry@foxmail.com>, marcel@holtmann.org
Cc: oe-kbuild-all@lists.linux.dev, johan.hedberg@gmail.com,
	luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org,
	linux-kernel@vger.kernel.org, w.7erry@foxmail.com
Subject: Re: [PATCH] Bluetooth: Perform careful capability checks in hci_sock_bind()
Date: Fri, 9 Jan 2026 19:54:49 +0100	[thread overview]
Message-ID: <202601091954.GF4GJ2fg-lkp@intel.com> (raw)
In-Reply-To: <tencent_2FAB909645504A5E0FDC88F125E139242C05@qq.com>

Hi Jerry,

kernel test robot noticed the following build errors:

[auto build test ERROR on bluetooth/master]
[also build test ERROR on bluetooth-next/master linus/master v6.19-rc4 next-20260109]
[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/Jerry-Wu/Bluetooth-Perform-careful-capability-checks-in-hci_sock_bind/20260109-100553
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
patch link:    https://lore.kernel.org/r/tencent_2FAB909645504A5E0FDC88F125E139242C05%40qq.com
patch subject: [PATCH] Bluetooth: Perform careful capability checks in hci_sock_bind()
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260109/202601091954.GF4GJ2fg-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260109/202601091954.GF4GJ2fg-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/202601091954.GF4GJ2fg-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/capability.h:16,
                    from include/linux/cred.h:11,
                    from include/linux/sched/signal.h:10,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs/super_types.h:13,
                    from include/linux/fs/super.h:5,
                    from include/linux/fs.h:5,
                    from include/linux/compat.h:17,
                    from net/bluetooth/hci_sock.c:26:
   net/bluetooth/hci_sock.c: In function 'hci_sock_bind':
>> include/uapi/linux/capability.h:205:30: error: passing argument 1 of 'sk_capable' makes pointer from integer without a cast [-Wint-conversion]
     205 | #define CAP_NET_ADMIN        12
         |                              ^~
         |                              |
         |                              int
   net/bluetooth/hci_sock.c:1262:32: note: in expansion of macro 'CAP_NET_ADMIN'
    1262 |                 if (sk_capable(CAP_NET_ADMIN))
         |                                ^~~~~~~~~~~~~
   In file included from include/net/bluetooth/bluetooth.h:30,
                    from net/bluetooth/hci_sock.c:32:
   include/net/sock.h:3023:36: note: expected 'const struct sock *' but argument is of type 'int'
    3023 | bool sk_capable(const struct sock *sk, int cap);
         |                 ~~~~~~~~~~~~~~~~~~~^~
>> net/bluetooth/hci_sock.c:1262:21: error: too few arguments to function 'sk_capable'
    1262 |                 if (sk_capable(CAP_NET_ADMIN))
         |                     ^~~~~~~~~~
   include/net/sock.h:3023:6: note: declared here
    3023 | bool sk_capable(const struct sock *sk, int cap);
         |      ^~~~~~~~~~
>> include/uapi/linux/capability.h:205:30: error: passing argument 1 of 'sk_capable' makes pointer from integer without a cast [-Wint-conversion]
     205 | #define CAP_NET_ADMIN        12
         |                              ^~
         |                              |
         |                              int
   net/bluetooth/hci_sock.c:1430:32: note: in expansion of macro 'CAP_NET_ADMIN'
    1430 |                 if (sk_capable(CAP_NET_ADMIN))
         |                                ^~~~~~~~~~~~~
   include/net/sock.h:3023:36: note: expected 'const struct sock *' but argument is of type 'int'
    3023 | bool sk_capable(const struct sock *sk, int cap);
         |                 ~~~~~~~~~~~~~~~~~~~^~
   net/bluetooth/hci_sock.c:1430:21: error: too few arguments to function 'sk_capable'
    1430 |                 if (sk_capable(CAP_NET_ADMIN))
         |                     ^~~~~~~~~~
   include/net/sock.h:3023:6: note: declared here
    3023 | bool sk_capable(const struct sock *sk, int cap);
         |      ^~~~~~~~~~
--
   In file included from include/linux/capability.h:16,
                    from include/linux/cred.h:11,
                    from include/linux/sched/signal.h:10,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs/super_types.h:13,
                    from include/linux/fs/super.h:5,
                    from include/linux/fs.h:5,
                    from include/linux/compat.h:17,
                    from hci_sock.c:26:
   hci_sock.c: In function 'hci_sock_bind':
>> include/uapi/linux/capability.h:205:30: error: passing argument 1 of 'sk_capable' makes pointer from integer without a cast [-Wint-conversion]
     205 | #define CAP_NET_ADMIN        12
         |                              ^~
         |                              |
         |                              int
   hci_sock.c:1262:32: note: in expansion of macro 'CAP_NET_ADMIN'
    1262 |                 if (sk_capable(CAP_NET_ADMIN))
         |                                ^~~~~~~~~~~~~
   In file included from include/net/bluetooth/bluetooth.h:30,
                    from hci_sock.c:32:
   include/net/sock.h:3023:36: note: expected 'const struct sock *' but argument is of type 'int'
    3023 | bool sk_capable(const struct sock *sk, int cap);
         |                 ~~~~~~~~~~~~~~~~~~~^~
   hci_sock.c:1262:21: error: too few arguments to function 'sk_capable'
    1262 |                 if (sk_capable(CAP_NET_ADMIN))
         |                     ^~~~~~~~~~
   include/net/sock.h:3023:6: note: declared here
    3023 | bool sk_capable(const struct sock *sk, int cap);
         |      ^~~~~~~~~~
>> include/uapi/linux/capability.h:205:30: error: passing argument 1 of 'sk_capable' makes pointer from integer without a cast [-Wint-conversion]
     205 | #define CAP_NET_ADMIN        12
         |                              ^~
         |                              |
         |                              int
   hci_sock.c:1430:32: note: in expansion of macro 'CAP_NET_ADMIN'
    1430 |                 if (sk_capable(CAP_NET_ADMIN))
         |                                ^~~~~~~~~~~~~
   include/net/sock.h:3023:36: note: expected 'const struct sock *' but argument is of type 'int'
    3023 | bool sk_capable(const struct sock *sk, int cap);
         |                 ~~~~~~~~~~~~~~~~~~~^~
   hci_sock.c:1430:21: error: too few arguments to function 'sk_capable'
    1430 |                 if (sk_capable(CAP_NET_ADMIN))
         |                     ^~~~~~~~~~
   include/net/sock.h:3023:6: note: declared here
    3023 | bool sk_capable(const struct sock *sk, int cap);
         |      ^~~~~~~~~~


vim +/sk_capable +205 include/uapi/linux/capability.h

607ca46e97a1b6 David Howells 2012-10-13  204  
607ca46e97a1b6 David Howells 2012-10-13 @205  #define CAP_NET_ADMIN        12
607ca46e97a1b6 David Howells 2012-10-13  206  

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

  parent reply	other threads:[~2026-01-09 18:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09  1:57 [PATCH] Bluetooth: Perform careful capability checks in hci_sock_bind() Jerry Wu
2026-01-09  3:30 ` bluez.test.bot
2026-01-09 18:54 ` kernel test robot [this message]
2026-01-12 16:39 ` [PATCH] " Luiz Augusto von Dentz
2026-01-15 12:12 ` kernel test robot
2026-01-15 12:12 ` kernel test robot

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=202601091954.GF4GJ2fg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=w.7erry@foxmail.com \
    /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