Thread (177 messages) 177 messages, 17 authors, 2026-03-04

Re: [PATCH v2 004/110] net: change sock.sk_ino and sock_i_ino() to u64

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2026-03-03 10:03:52
Also in: amd-gfx, autofs, bpf, ceph-devel, dri-devel, linux-can, linux-cifs, linux-ext4, linux-fscrypt, linux-fsdevel, linux-hams, linux-integrity, linux-media, linux-mm, linux-nfs, linux-perf-users, linux-sctp, linux-security-module, linux-trace-kernel, linux-unionfs, linux-xfs, lkml, netdev, netfs, ntfs3, nvdimm, ocfs2-devel, selinux, v9fs

On 02.03.2026 15:23:48, Jeff Layton wrote:
inode->i_ino is being converted to a u64. sock.sk_ino (which caches the
inode number) must also be widened to avoid truncation on 32-bit
architectures where unsigned long is only 32 bits.

Change sk_ino from unsigned long to u64, and update the return type
of sock_i_ino() to match. Fix all format strings that print the
result of sock_i_ino() (%lu -> %llu), and widen the intermediate
variables and function parameters in the diag modules that were
using int to hold the inode number.

Note that the UAPI socket diag structures (inet_diag_msg.idiag_inode,
unix_diag_msg.udiag_ino, etc.) are all __u32 and cannot be changed
without breaking the ABI. The assignments to those fields will
silently truncate, which is the existing behavior.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 net/can/bcm.c                | 2 +-
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for net/can

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help