Re: [PATCH 05/10] virtio: console: update private_data in struct file only on successful open

2013-07-23 Thread Amit Shah
On (Mon) 22 Jul 2013 [15:07:52], Rusty Russell wrote: > Amit Shah writes: > > Mateusz Guzik points out that we update the 'file' struct's private_data > > field before we've successfully done all our checks. This means we can > > return an error with the private_data field updated. This could le

Re: [PATCH 05/10] virtio: console: update private_data in struct file only on successful open

2013-07-22 Thread Rusty Russell
Amit Shah writes: > Mateusz Guzik points out that we update the 'file' struct's private_data > field before we've successfully done all our checks. This means we can > return an error with the private_data field updated. This could lead to > problems. > > Fix by moving the assignment after all c

[PATCH 05/10] virtio: console: update private_data in struct file only on successful open

2013-07-18 Thread Amit Shah
Mateusz Guzik points out that we update the 'file' struct's private_data field before we've successfully done all our checks. This means we can return an error with the private_data field updated. This could lead to problems. Fix by moving the assignment after all checks are done. CC: Reported