diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 11:02:58 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 11:02:58 -0800 |
| commit | 8934827db5403eae57d4537114a9ff88b0a8460f (patch) | |
| tree | 5167aa7e16b786b9135e19d508b234054fa6e8ce /net/mac802154 | |
| parent | c7decec2f2d2ab0366567f9e30c0e1418cece43f (diff) | |
| parent | 7a70c15bd1449f1eb30991772edce37b41e496fb (diff) | |
Merge tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull kmalloc_obj conversion from Kees Cook:
"This does the tree-wide conversion to kmalloc_obj() and friends using
coccinelle, with a subsequent small manual cleanup of whitespace
alignment that coccinelle does not handle.
This uncovered a clang bug in __builtin_counted_by_ref(), so the
conversion is preceded by disabling that for current versions of
clang. The imminent clang 22.1 release has the fix.
I've done allmodconfig build tests for x86_64, arm64, i386, and arm. I
did defconfig builds for alpha, m68k, mips, parisc, powerpc, riscv,
s390, sparc, sh, arc, csky, xtensa, hexagon, and openrisc"
* tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
kmalloc_obj: Clean up after treewide replacements
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
compiler_types: Disable __builtin_counted_by_ref for Clang
Diffstat (limited to 'net/mac802154')
| -rw-r--r-- | net/mac802154/cfg.c | 2 | ||||
| -rw-r--r-- | net/mac802154/llsec.c | 12 | ||||
| -rw-r--r-- | net/mac802154/rx.c | 4 | ||||
| -rw-r--r-- | net/mac802154/scan.c | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c index ef7f23af043f..44ad05726db3 100644 --- a/net/mac802154/cfg.c +++ b/net/mac802154/cfg.c @@ -339,7 +339,7 @@ static int mac802154_associate(struct wpan_phy *wpan_phy, if (coord->mode == IEEE802154_SHORT_ADDRESSING) return -EINVAL; - parent = kzalloc(sizeof(*parent), GFP_KERNEL); + parent = kzalloc_obj(*parent, GFP_KERNEL); if (!parent) return -ENOMEM; diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index f13b07ebfb98..0489f2515eb6 100644 --- a/net/mac802154/llsec.c +++ b/net/mac802154/llsec.c @@ -117,7 +117,7 @@ llsec_key_alloc(const struct ieee802154_llsec_key *template) struct mac802154_llsec_key *key; int i; - key = kzalloc(sizeof(*key), GFP_KERNEL); + key = kzalloc_obj(*key, GFP_KERNEL); if (!key) return NULL; @@ -241,7 +241,7 @@ int mac802154_llsec_key_add(struct mac802154_llsec *sec, break; } - new = kzalloc(sizeof(*new), GFP_KERNEL); + new = kzalloc_obj(*new, GFP_KERNEL); if (!new) return -ENOMEM; @@ -369,7 +369,7 @@ int mac802154_llsec_dev_add(struct mac802154_llsec *sec, llsec_dev_find_long(sec, dev->hwaddr)) return -EEXIST; - entry = kmalloc(sizeof(*entry), GFP_KERNEL); + entry = kmalloc_obj(*entry, GFP_KERNEL); if (!entry) return -ENOMEM; @@ -441,7 +441,7 @@ int mac802154_llsec_devkey_add(struct mac802154_llsec *sec, if (llsec_devkey_find(dev, &key->key_id)) return -EEXIST; - devkey = kmalloc(sizeof(*devkey), GFP_KERNEL); + devkey = kmalloc_obj(*devkey, GFP_KERNEL); if (!devkey) return -ENOMEM; @@ -500,7 +500,7 @@ int mac802154_llsec_seclevel_add(struct mac802154_llsec *sec, if (llsec_find_seclevel(sec, sl)) return -EEXIST; - entry = kmalloc(sizeof(*entry), GFP_KERNEL); + entry = kmalloc_obj(*entry, GFP_KERNEL); if (!entry) return -ENOMEM; @@ -925,7 +925,7 @@ llsec_update_devkey_record(struct mac802154_llsec_device *dev, if (!devkey) { struct mac802154_llsec_device_key *next; - next = kzalloc(sizeof(*devkey), GFP_ATOMIC); + next = kzalloc_obj(*devkey, GFP_ATOMIC); if (!next) return -ENOMEM; diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c index aac359b5c71d..cd8f2a11920d 100644 --- a/net/mac802154/rx.c +++ b/net/mac802154/rx.c @@ -213,7 +213,7 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata, if (!mac802154_is_scanning(sdata->local)) goto fail; - mac_pkt = kzalloc(sizeof(*mac_pkt), GFP_ATOMIC); + mac_pkt = kzalloc_obj(*mac_pkt, GFP_ATOMIC); if (!mac_pkt) goto fail; @@ -227,7 +227,7 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata, case IEEE802154_FC_TYPE_MAC_CMD: dev_dbg(&sdata->dev->dev, "MAC COMMAND received\n"); - mac_pkt = kzalloc(sizeof(*mac_pkt), GFP_ATOMIC); + mac_pkt = kzalloc_obj(*mac_pkt, GFP_ATOMIC); if (!mac_pkt) goto fail; diff --git a/net/mac802154/scan.c b/net/mac802154/scan.c index a6dab3cc3ad8..583178784c9b 100644 --- a/net/mac802154/scan.c +++ b/net/mac802154/scan.c @@ -798,7 +798,7 @@ int mac802154_process_association_req(struct ieee802154_sub_if_data *sdata, goto unlock; } - child = kzalloc(sizeof(*child), GFP_KERNEL); + child = kzalloc_obj(*child, GFP_KERNEL); if (!child) { ret = -ENOMEM; goto unlock; |
