Re: [PATCH v2 1/2] i2c: core-smbus: fix a potential uninitialization bug

2018-05-18 Thread Wenwen Wang
Yes, this patch does not aim to "fix" all potential driver bugs but adds an additional protection in case the implementation of .master_xfer is incorrect. >From this perspective, it is still necessary to apply this patch, as pointed out by Peter. Thanks, Wenwen On Mon, May 14, 2018 at 3:31 PM,

Re: [PATCH v2 1/2] i2c: core-smbus: fix a potential uninitialization bug

2018-05-18 Thread Wenwen Wang
Yes, this patch does not aim to "fix" all potential driver bugs but adds an additional protection in case the implementation of .master_xfer is incorrect. >From this perspective, it is still necessary to apply this patch, as pointed out by Peter. Thanks, Wenwen On Mon, May 14, 2018 at 3:31 PM,

Re: [PATCH v2 1/2] i2c: core-smbus: fix a potential uninitialization bug

2018-05-14 Thread Peter Rosin
On 2018-05-10 13:17, Wolfram Sang wrote: > On Sat, May 05, 2018 at 07:57:10AM -0500, Wenwen Wang wrote: >> In i2c_smbus_xfer_emulated(), there are two buffers: msgbuf0 and msgbuf1, >> which are used to save a series of messages, as mentioned in the comment. >> According to the value of the

Re: [PATCH v2 1/2] i2c: core-smbus: fix a potential uninitialization bug

2018-05-14 Thread Peter Rosin
On 2018-05-10 13:17, Wolfram Sang wrote: > On Sat, May 05, 2018 at 07:57:10AM -0500, Wenwen Wang wrote: >> In i2c_smbus_xfer_emulated(), there are two buffers: msgbuf0 and msgbuf1, >> which are used to save a series of messages, as mentioned in the comment. >> According to the value of the

Re: [PATCH v2 1/2] i2c: core-smbus: fix a potential uninitialization bug

2018-05-10 Thread Wolfram Sang
On Sat, May 05, 2018 at 07:57:10AM -0500, Wenwen Wang wrote: > In i2c_smbus_xfer_emulated(), there are two buffers: msgbuf0 and msgbuf1, > which are used to save a series of messages, as mentioned in the comment. > According to the value of the variable 'size', msgbuf0 is initialized to > various

Re: [PATCH v2 1/2] i2c: core-smbus: fix a potential uninitialization bug

2018-05-10 Thread Wolfram Sang
On Sat, May 05, 2018 at 07:57:10AM -0500, Wenwen Wang wrote: > In i2c_smbus_xfer_emulated(), there are two buffers: msgbuf0 and msgbuf1, > which are used to save a series of messages, as mentioned in the comment. > According to the value of the variable 'size', msgbuf0 is initialized to > various

[PATCH v2 1/2] i2c: core-smbus: fix a potential uninitialization bug

2018-05-05 Thread Wenwen Wang
In i2c_smbus_xfer_emulated(), there are two buffers: msgbuf0 and msgbuf1, which are used to save a series of messages, as mentioned in the comment. According to the value of the variable 'size', msgbuf0 is initialized to various values. In contrast, msgbuf1 is left uninitialized until the function

[PATCH v2 1/2] i2c: core-smbus: fix a potential uninitialization bug

2018-05-05 Thread Wenwen Wang
In i2c_smbus_xfer_emulated(), there are two buffers: msgbuf0 and msgbuf1, which are used to save a series of messages, as mentioned in the comment. According to the value of the variable 'size', msgbuf0 is initialized to various values. In contrast, msgbuf1 is left uninitialized until the function