diff options
| author | Chuck Lever <chuck.lever@oracle.com> | 2025-05-16 16:37:12 +0300 | 
|---|---|---|
| committer | Chuck Lever <chuck.lever@oracle.com> | 2025-05-16 17:58:48 +0300 | 
| commit | 425364dc49f050b6008b43408aa96d42105a9c1d (patch) | |
| tree | 3a7562e6b2916f47f6ed2d00b74799d204bcffca /drivers/mtd/lpddr/lpddr_cmds.c | |
| parent | 1e7dbad6d1fe4b35ccd2aa8fea9496d837af4430 (diff) | |
| download | linux-425364dc49f050b6008b43408aa96d42105a9c1d.tar.xz | |
xdrgen: Fix code generated for counted arrays
When an XDR counted array has a maximum element count, xdrgen adds
a bounds check to the encoder or decoder for that type. But in cases
where the .x provides no maximum element count, such as
struct notify4 {
        /* composed from notify_type4 or notify_deviceid_type4 */
        bitmap4         notify_mask;
        notifylist4     notify_vals;
};
struct CB_NOTIFY4args {
        stateid4    cna_stateid;
        nfs_fh4     cna_fh;
        notify4     cna_changes<>;
};
xdrgen is supposed to omit that bounds check. Some of the Jinja2
templates handle that correctly, but a few are incorrect and leave
the bounds check in place with a maximum of zero, which causes
encoding/decoding of that type to fail unconditionally.
Reported-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'drivers/mtd/lpddr/lpddr_cmds.c')
0 files changed, 0 insertions, 0 deletions
