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

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

 



On (Mon) 22 Jul 2013 [15:07:52], Rusty Russell wrote:
> Amit Shah <amit.shah@xxxxxxxxxx> 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 checks are done.
> 
> No, this is a bit weird, but it's fine.
> 
> If we fail open, filp will be destroyed; we won't be told about it, and
> private_data will never be accessed.

Thanks!  Will drop this.

		Amit
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]