tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   7ce53e3a447bced7b85ed181c4d027e93c062e07
commit: 245500d853e9f20036cec7df4f6984ece4c6bf26 [6051/6654] rxrpc: Rewrite the 
client connection manager
config: i386-randconfig-m021-20200911 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>

smatch warnings:
net/rxrpc/conn_client.c:722 rxrpc_connect_call() error: 'bundle' dereferencing 
possible ERR_PTR()

# 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=245500d853e9f20036cec7df4f6984ece4c6bf26
git remote add linux-next 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 245500d853e9f20036cec7df4f6984ece4c6bf26
vim +494 net/rxrpc/conn_client.c


   697  int rxrpc_connect_call(struct rxrpc_sock *rx,
   698                         struct rxrpc_call *call,
   699                         struct rxrpc_conn_parameters *cp,
   700                         struct sockaddr_rxrpc *srx,
   701                         gfp_t gfp)
   702  {
   703          struct rxrpc_bundle *bundle;
   704          struct rxrpc_net *rxnet = cp->local->rxnet;
   705          int ret = 0;
   706  
   707          _enter("{%d,%lx},", call->debug_id, call->user_call_ID);
   708  
   709          rxrpc_discard_expired_client_conns(&rxnet->client_conn_reaper);
   710  
   711          bundle = rxrpc_prep_call(rx, call, cp, srx, gfp);
   712          if (IS_ERR(bundle)) {
   713                  ret = PTR_ERR(bundle);
   714                  goto out;
                        ^^^^^^^^

   715          }
   716  
   717          if (call->state == RXRPC_CALL_CLIENT_AWAIT_CONN) {
   718                  ret = rxrpc_wait_for_channel(bundle, call, gfp);
   719                  if (ret < 0)
   720                          goto wait_failed;
   721          }
   722  
   723  granted_channel:
   724          /* Paired with the write barrier in 
rxrpc_activate_one_channel(). */
   725          smp_rmb();
   726  
   727  out:
   728          rxrpc_put_bundle(bundle);
                                 ^^^^^^
Dereferenced inside function.

   729          _leave(" = %d", ret);
   730          return ret;
   731  
   732  wait_failed:
   733          spin_lock(&bundle->channel_lock);
   734          list_del_init(&call->chan_wait_link);
   735          spin_unlock(&bundle->channel_lock);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to