Re: [PATCH] mei: vsc: Fix packet CRC computed over pointer size

Sakari Ailus <[email protected]>
Newsgroups gmane.linux.kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
Hi Wantao,

Thank you for the patch.

On Tue, Aug 04, 2026 at 04:08:42PM +0800, Wentao Guan wrote:
> vsc_tp_xfer() computes the packet CRC over sizeof(pkt) + olen bytes,
> but pkt is a pointer, so sizeof(pkt) evaluates to the pointer size
> instead of the size of struct vsc_tp_packet_hdr. The value correctly
> match the 8-byte header on 64-bit builds.
> 
> Use sizeof(pkt->hdr), consistent with the header size used everywhere
> else in the driver, e.g. in VSC_TP_PACKET_SIZE().
> 
> Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device")
> Signed-off-by: Wentao Guan <[email protected]>

Reviewed-by: Sakari Ailus <[email protected]>

-- 
Kind regards,

Sakari Ailus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.