Re: [PATCH] nfc: st-nci: Fix an incorrect skb_buff size in 'st_nci_i2c_read()'

2019-08-19 Thread Christophe JAILLET
Le 12/08/2019 à 05:57, David Miller a écrit : From: Christophe JAILLET Date: Tue, 6 Aug 2019 16:16:40 +0200 In 'st_nci_i2c_read()', we allocate a sk_buff with a size of ST_NCI_I2C_MIN_SIZE + len. However, later on, we first 'skb_reserve()' ST_NCI_I2C_MIN_SIZE bytes, then we 'skb_put()'

Re: [PATCH] nfc: st-nci: Fix an incorrect skb_buff size in 'st_nci_i2c_read()'

2019-08-11 Thread David Miller
From: Christophe JAILLET Date: Tue, 6 Aug 2019 16:16:40 +0200 > In 'st_nci_i2c_read()', we allocate a sk_buff with a size of > ST_NCI_I2C_MIN_SIZE + len. > > However, later on, we first 'skb_reserve()' ST_NCI_I2C_MIN_SIZE bytes, then > we 'skb_put()' ST_NCI_I2C_MIN_SIZE bytes. > Finally, if

[PATCH] nfc: st-nci: Fix an incorrect skb_buff size in 'st_nci_i2c_read()'

2019-08-06 Thread Christophe JAILLET
In 'st_nci_i2c_read()', we allocate a sk_buff with a size of ST_NCI_I2C_MIN_SIZE + len. However, later on, we first 'skb_reserve()' ST_NCI_I2C_MIN_SIZE bytes, then we 'skb_put()' ST_NCI_I2C_MIN_SIZE bytes. Finally, if 'len' is not 0, we 'skb_put()' 'len' bytes. So we use ST_NCI_I2C_MIN_SIZE*2 +