lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250811140738.1141817-1-wangzhaolong@huaweicloud.com>
Date: Mon, 11 Aug 2025 22:07:36 +0800
From: Wang Zhaolong <wangzhaolong@...weicloud.com>
To: sfrench@...ba.org,
	pshilov@...rosoft.com
Cc: linux-cifs@...r.kernel.org,
	samba-technical@...ts.samba.org,
	linux-kernel@...r.kernel.org,
	chengzhihao1@...wei.com,
	yi.zhang@...wei.com,
	yangerkun@...wei.com
Subject: [PATCH V3 0/2] Fix mid_q_entry memory leaks in SMB client and further cleanup

This series contains the remaining patch from my previous mid processing
fix series, plus an additional cleanup patch. The first three patches of
my earlier series have already been merged into mainline. 

Patch 1/2: The final patch from that series, which improves the helper
function for mid cancellation conditions. The previous helper function
had awkward semantics requiring callers to negate the return value,
and was inefficient due to the extra negation in wait loops.

Patch 2/2: A cleanup patch that removes unnecessary mid_queue_lock usage
and standardizes mid_state access with READ_ONCE/WRITE_ONCE. This builds
on the fixes to make the locking model cleaner and more consistent.

These patches are independent and can be applied separately if needed.

V3:
 - Use mid_lock to protect the update of mid->callback rather than
   its execution. 

V2:
 - Inline the mid_execute_callback() in the smb2ops.c to eliminate
   the sparse warning.

Wang Zhaolong (2):
  smb: client: fix mid_q_entry memleak leak with per-mid locking
  smb: client: Clean up mid_queue_lock usage and standardize mid_state
    access

 fs/smb/client/cifsglob.h      | 21 +++++++++++
 fs/smb/client/cifssmb.c       |  8 ++--
 fs/smb/client/cifstransport.c | 69 +++++++++++++++++++++++------------
 fs/smb/client/connect.c       | 25 ++++++-------
 fs/smb/client/smb1ops.c       |  5 ++-
 fs/smb/client/smb2ops.c       | 26 ++++++-------
 fs/smb/client/smb2pdu.c       | 10 +++--
 fs/smb/client/smb2transport.c |  3 +-
 fs/smb/client/transport.c     | 50 ++++++++++++++-----------
 9 files changed, 135 insertions(+), 82 deletions(-)

-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ