summaryrefslogtreecommitdiff
path: root/drivers/phy/axiado/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-07-10 11:33:21 +0200
committerChristian Brauner <brauner@kernel.org>2026-08-03 10:08:38 +0200
commitf98d6db17e0a4ca5aebdc36ec9c321733f4aa3d8 (patch)
tree5612d4bee7cd5d9f28a9a3c732ef62de78c75dee /drivers/phy/axiado/git@git.tavy.me:linux.git
parentd9f7f1ebf56d2a571513f0654d6d69544a9504f8 (diff)
binfmt_misc: split the field parsing out of create_entry()
create_entry() is a two hundred line parser with the M and E field handling inlined as the two arms of its largest branch. Move them into parse_magic_fields() and parse_extension_fields() which return the new parse position or NULL so create_entry() itself reads like the register string grammar again. The offset parsing loses a provably dead check on the way: after *s = '\0' and p = s the subsequent if (*p++) always reads the just written NUL byte and can never fail, it only obscured that the code simply advances past the delimiter. With the field parsing gone every remaining failure unwinds the same way, so hand the entry to __free(kfree), return errors directly and pass ownership out via no_free_ptr() on success instead of routing every exit through goto tails. Link: https://patch.msgid.link/20260710-work-binfmt_misc-locking-v3-20-a162f7cb58d6@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'drivers/phy/axiado/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions