Re: Fix an uninitialized read in smb3_qfs_tcon()

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

 



Hi Volker,

Volker Lendecke <Volker.Lendecke@xxxxxxxxx> writes:

> Attached find a patch that fixes another case where oparms.mode is
> uninitialized. This patch fixes it with a struct assignment, relying
> on the implicit initialization of unmentioned fields. Please note that
> the assignment does not explicitly mention "reconnect" anymore,
> relying on the implicit "false" value.

OK - thanks.

> Is this kernel-style? Shall we just go through all of the oparms
> initializations, there are quite a few other cases that might have the
> mode uninitialized.

Please go through all of them.

Perhaps initialise those structures as below

        struct cifs_open_parms oparms = {};

and then avoid any uninitialised data to be sent.

Patch looks good.



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux