linux/net
Linus Torvalds f6046d0b8f 9p: fix slab cache name creation for real
commit a360f311f5 upstream.

This was attempted by using the dev_name in the slab cache name, but as
Omar Sandoval pointed out, that can be an arbitrary string, eg something
like "/dev/root".  Which in turn trips verify_dirent_name(), which fails
if a filename contains a slash.

So just make it use a sequence counter, and make it an atomic_t to avoid
any possible races or locking issues.

Reported-and-tested-by: Omar Sandoval <osandov@fb.com>
Link: https://lore.kernel.org/all/ZxafcO8KWMlXaeWE@telecaster.dhcp.thefacebook.com/
Fixes: 79efebae4a ("9p: Avoid creating multiple slab caches with the same name")
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Dominique Martinet <asmadeus@codewreck.org>
Cc: Thorsten Leemhuis <regressions@leemhuis.info>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-17 15:09:55 +01:00
..
6lowpan
9p 9p: fix slab cache name creation for real 2024-11-17 15:09:55 +01:00
802
8021q net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
appletalk Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-09 10:01:01 -07:00
atm atm: clean up a put_user() calls 2024-06-14 19:08:50 -07:00
ax25 ax25: Replace kfree() in ax25_dev_free() with ax25_dev_put() 2024-06-01 15:49:42 -07:00
batman-adv Revert "batman-adv: prefer kfree_rcu() over call_rcu() with free-only callbacks" 2024-06-12 20:18:00 +02:00
bluetooth Bluetooth: hci: fix null-ptr-deref in hci_read_supported_codecs 2024-11-08 16:30:48 +01:00
bpf bpf, test_run: Fix LIVE_FRAME frame update after a page has been recycled 2024-11-08 16:30:49 +01:00
bridge bridge: Handle error of rtnl_register_module(). 2024-10-17 15:26:51 +02:00
caif net: caif: remove unused structs 2024-06-05 10:18:06 +01:00
can can: bcm: Clear bo->bcm_proc_read after remove_proc_entry(). 2024-10-04 16:37:29 +02:00
ceph libceph: fix crush_choose_firstn() kernel-doc warnings 2024-07-11 16:33:07 +02:00
core bpf: Fix mismatched RCU unlock flavour in bpf_out_neigh_v6 2024-11-17 15:09:53 +01:00
dcb
dccp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-06-27 12:14:11 -07:00
devlink devlink: Constify the 'table_ops' parameter of devl_dpipe_table_register() 2024-06-05 10:24:57 +01:00
dns_resolver
dsa net: dsa: refuse cross-chip mirroring operations 2024-10-17 15:26:51 +02:00
ethernet netkit: Fix pkt_type override upon netkit pass verdict 2024-05-25 10:48:57 -07:00
ethtool ethtool: check device is present when getting link settings 2024-08-26 14:03:02 -07:00
handshake net/handshake: remove redundant assignment to variable ret 2024-04-16 17:14:55 -07:00
hsr net: hsr: prevent NULL pointer dereference in hsr_proxy_announce() 2024-09-11 15:49:41 -07:00
ieee802154 bpf-next-for-netdev 2024-05-28 07:27:29 -07:00
ife
ipv4 ipv4: ip_tunnel: Fix suspicious RCU usage warning in ip_tunnel_find() 2024-11-08 16:30:47 +01:00
ipv6 netfilter: nf_reject_ipv6: fix potential crash in nf_send_reset6() 2024-11-08 16:30:48 +01:00
iucv s390/iucv: Fix vargs handling in iucv_alloc_device() 2024-08-22 13:09:20 -07:00
kcm kcm: Serialise kcm_sendmsg() for the same socket. 2024-08-19 18:36:12 -07:00
key
l2tp genetlink: hold RCU in genlmsg_mcast() 2024-11-01 02:02:30 +01:00
l3mdev
lapb
llc llc: Constify struct llc_sap_state_trans 2024-07-15 08:51:19 -07:00
mac80211 wifi: mac80211: do not pass a stopped vif to the driver in .get_txpower 2024-11-08 16:30:54 +01:00
mac802154 mac802154: Fix potential RCU dereference issue in mac802154_scan_worker 2024-10-10 12:04:09 +02:00
mctp mctp: Handle error of rtnl_register_module(). 2024-10-17 15:26:52 +02:00
mpls mpls: Handle error of rtnl_register_module(). 2024-10-17 15:26:52 +02:00
mptcp mptcp: use sock_kfree_s instead of kfree 2024-11-14 13:21:09 +01:00
ncsi net/ncsi: Disable the ncsi work before freeing the associated structure 2024-10-10 12:03:01 +02:00
netfilter netfilter: nf_tables: wait for rcu grace period on net_device removal 2024-11-14 13:21:00 +01:00
netlabel netlabel: fix RCU annotation for IPv4 options on socket creation 2024-05-13 14:58:12 -07:00
netlink genetlink: hold RCU in genlmsg_mcast() 2024-11-01 02:02:30 +01:00
netrom netrom: Fix a memory leak in nr_heartbeat_expiry() 2024-06-17 13:06:23 +01:00
nfc Quite smaller than usual. Notably it includes the fix for the unix 2024-05-23 12:49:37 -07:00
nsh nsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment(). 2024-04-26 12:20:01 +02:00
openvswitch net: ovs: fix ovs_drop_reasons error 2024-08-22 13:09:15 -07:00
packet Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-07-15 13:19:17 -07:00
phonet phonet: Handle error of rtnl_register_module(). 2024-10-17 15:26:52 +02:00
psample net: psample: fix flag being set in wrong skb 2024-07-11 18:11:31 -07:00
qrtr net: qrtr: Update packets cloning when broadcasting 2024-10-04 16:38:25 +02:00
rds sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
rfkill net: rfkill: Correct return value in invalid parameter case 2024-06-26 10:49:01 +02:00
rose net: change proto and proto_ops accept type 2024-05-13 18:19:09 -06:00
rxrpc rxrpc: Fix missing locking causing hanging calls 2024-11-14 13:21:01 +01:00
sched net/sched: sch_api: fix xa_insert() error path in tcf_block_get_ext() 2024-11-08 16:30:47 +01:00
sctp sctp: properly validate chunk size in sctp_sf_ootb() 2024-11-14 13:20:59 +01:00
smc net/smc: do not leave a dangling sk pointer in __smc_create() 2024-11-14 13:21:01 +01:00
strparser
sunrpc sunrpc: handle -ENOTCONN in xs_tcp_setup_socket() 2024-11-14 13:20:57 +01:00
switchdev net: bridge: switchdev: Improve error message for port_obj_add/del functions 2024-05-08 12:19:12 +01:00
tipc tipc: guard against string buffer overrun 2024-10-10 12:03:11 +02:00
tls net: tls: Pass union tls_crypto_context pointer to memzero_explicit 2024-07-09 11:14:47 -07:00
unix af_unix: Don't return OOB skb in manage_oob(). 2024-10-04 16:37:28 +02:00
vmw_vsock vsock/virtio: Initialization of the dangling pointer occurring in vsk->trans 2024-11-14 13:21:16 +01:00
wireless wifi: cfg80211: clear wdev->cqm_config pointer on free 2024-11-08 16:30:54 +01:00
x25 net: change proto and proto_ops accept type 2024-05-13 18:19:09 -06:00
xdp xsk: fix batch alloc API on non-coherent systems 2024-10-04 16:37:30 +02:00
xfrm xfrm: fix one more kernel-infoleak in algo dumping 2024-11-01 02:02:42 +01:00
compat.c
devres.c
Kconfig ethtool: provide customized dim profile management 2024-06-25 17:15:06 -07:00
Kconfig.debug
Makefile
socket.c net: explicitly clear the sk pointer, when pf->create fails 2024-10-17 15:26:59 +02:00
sysctl_net.c sysctl: Remove check for sentinel element in ctl_table arrays 2024-06-13 10:50:52 +02:00