All of lore.kernel.org
 help / color / mirror / Atom feed
* [dhowells-fs:rxrpc-fixes 4/15] net/rxrpc/sendmsg.c:816:2-12: second lock on line 816
@ 2026-10-06 22:50 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-06 22:50 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: David Howells <dhowells@redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-fixes
head:   451b2bc96cf33e3f1ecb90e2d6a282c088421c67
commit: e9d7d8a7356af5d7fbdf71e98533e791cc796604 [4/15] rxrpc: Fix lack of short-send handling in rxrpc_kernel_send_data()
:::::: branch date: 9 hours ago
:::::: commit date: 13 hours ago
config: i386-randconfig-r2104-20261006 (https://download.01.org/0day-ci/archive/20261007/202610070052.rAcnihPV-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0

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>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202610070052.rAcnihPV-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> net/rxrpc/sendmsg.c:816:2-12: second lock on line 816

vim +816 net/rxrpc/sendmsg.c

df423a4af125f5b David Howells 2016-09-02  790  
df423a4af125f5b David Howells 2016-09-02  791  /**
df423a4af125f5b David Howells 2016-09-02  792   * rxrpc_kernel_send_data - Allow a kernel service to send data on a call
df423a4af125f5b David Howells 2016-09-02  793   * @sock: The socket the call is on
df423a4af125f5b David Howells 2016-09-02  794   * @call: The call to send data through
df423a4af125f5b David Howells 2016-09-02  795   * @msg: The data to send
e833251ad813168 David Howells 2017-08-29  796   * @notify_end_tx: Notification that the last packet is queued.
df423a4af125f5b David Howells 2016-09-02  797   *
df423a4af125f5b David Howells 2016-09-02  798   * Allow a kernel service to send data on a call.  The call must be in an state
df423a4af125f5b David Howells 2016-09-02  799   * appropriate to sending data.  No control data should be supplied in @msg,
df423a4af125f5b David Howells 2016-09-02  800   * nor should an address be supplied.  MSG_MORE should be flagged if there's
df423a4af125f5b David Howells 2016-09-02  801   * more data to come, otherwise this data will end the transmission phase.
28a79fc9b03e4ed David Howells 2025-04-11  802   *
28a79fc9b03e4ed David Howells 2025-04-11  803   * Return: %0 if successful and a negative error code otherwise.
df423a4af125f5b David Howells 2016-09-02  804   */
df423a4af125f5b David Howells 2016-09-02  805  int rxrpc_kernel_send_data(struct socket *sock, struct rxrpc_call *call,
e9d7d8a7356af5d David Howells 2026-09-10  806  			   struct msghdr *msg, rxrpc_notify_end_tx_t notify_end_tx)
df423a4af125f5b David Howells 2016-09-02  807  {
df423a4af125f5b David Howells 2016-09-02  808  	int ret;
df423a4af125f5b David Howells 2016-09-02  809  
2d689424b618453 David Howells 2022-11-11  810  	_enter("{%d},", call->debug_id);
df423a4af125f5b David Howells 2016-09-02  811  
df423a4af125f5b David Howells 2016-09-02  812  	ASSERTCMP(msg->msg_name, ==, NULL);
df423a4af125f5b David Howells 2016-09-02  813  	ASSERTCMP(msg->msg_control, ==, NULL);
df423a4af125f5b David Howells 2016-09-02  814  
e9d7d8a7356af5d David Howells 2026-09-10  815  	for (;;) {
540b1c48c37ac0a David Howells 2017-02-27 @816  		mutex_lock(&call->user_mutex);
df423a4af125f5b David Howells 2016-09-02  817  
e9d7d8a7356af5d David Howells 2026-09-10  818  		ret = rxrpc_send_data(rxrpc_sk(sock->sk), call, msg,
e9d7d8a7356af5d David Howells 2026-09-10  819  				      msg_data_left(msg), notify_end_tx);
2d689424b618453 David Howells 2022-11-11  820  		if (ret == -ESHUTDOWN)
bd2db2d231b4a9d David Howells 2017-08-29  821  			ret = call->error;
e9d7d8a7356af5d David Howells 2026-09-10  822  		if (ret < 0)
e9d7d8a7356af5d David Howells 2026-09-10  823  			break;
e9d7d8a7356af5d David Howells 2026-09-10  824  		if (msg_data_left(msg) == 0) {
e9d7d8a7356af5d David Howells 2026-09-10  825  			ret = 0;
e9d7d8a7356af5d David Howells 2026-09-10  826  			break;
e9d7d8a7356af5d David Howells 2026-09-10  827  		}
e9d7d8a7356af5d David Howells 2026-09-10  828  		if (ret == 0) {
e9d7d8a7356af5d David Howells 2026-09-10  829  			ret = -EIO;
e9d7d8a7356af5d David Howells 2026-09-10  830  			break;
e9d7d8a7356af5d David Howells 2026-09-10  831  		}
e9d7d8a7356af5d David Howells 2026-09-10  832  	}
e9d7d8a7356af5d David Howells 2026-09-10  833  
df423a4af125f5b David Howells 2016-09-02  834  	_leave(" = %d", ret);
df423a4af125f5b David Howells 2016-09-02  835  	return ret;
df423a4af125f5b David Howells 2016-09-02  836  }
df423a4af125f5b David Howells 2016-09-02  837  EXPORT_SYMBOL(rxrpc_kernel_send_data);
df423a4af125f5b David Howells 2016-09-02  838  

:::::: The code at line 816 was first introduced by commit
:::::: 540b1c48c37ac0ad66212004db21e1ff7e2d78be rxrpc: Fix deadlock between call creation and sendmsg/recvmsg

:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: David S. Miller <davem@davemloft.net>

--
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:[~2026-10-06 22:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 22:50 [dhowells-fs:rxrpc-fixes 4/15] net/rxrpc/sendmsg.c:816:2-12: second lock on line 816 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.