Re: [PATCH] i2c: cp2615: Validate read length before copying
From: Markus Elfring
Date: Wed Aug 19 2026 - 04:20:48 EST
…
> Limit read_len to the maximum size of the response buffer and return
> -EPROTO for an invalid response.
* How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n145
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.2#n34
* Please avoid duplicate source code also for improved implementations of
functions like cp2615_i2c_recv().
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.2#n526
https://elixir.bootlin.com/linux/v7.2/source/drivers/i2c/busses/i2c-cp2615.c#L138-L169
* How do you think about to increase the application of scope-based resource management?
Regards,
Markus