Search Linux Wireless

Re: [WARNING] memcpy: detected field-spanning write (size 1005) of single field "&out_cmd->cmd.payload" at drivers/net/wireless/intel/iwlegacy/common.c:3173 (size 320)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2024-05-20 at 17:08 +0200, Stanislaw Gruszka wrote:
> > 
> > I don't think this is right, now the raw comes after
> > DEF_CMD_PAYLOAD_SIZE? You want it to be a union with payload, I'd think.
> 
> Not sure if I understand. I think we have union with payload with 
> the patch. The structure looks like this:
> 
> struct il_device_cmd {
> 	struct il_cmd_header hdr;	/* uCode API */
> 	union {
> 		u32 flags;
> 		u8 val8;
> 		u16 val16;
> 		u32 val32;
> 		struct il_tx_cmd tx;
> 		u8 payload[DEF_CMD_PAYLOAD_SIZE];
> 		DECLARE_FLEX_ARRAY(u8, raw);
> 	} __packed cmd;
> } __packed;
> 

Oh, sorry, my bad. I confused the tx_cmd and the cmd_header.

johannes





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux