Re: [bug report] ovl: introduce the inodes index dir feature

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

 



On Tue, Jul 11, 2017 at 10:37 AM, Dan Carpenter
<dan.carpenter@xxxxxxxxxx> wrote:
> On Mon, Jul 10, 2017 at 07:15:47PM +0300, Amir Goldstein wrote:
>> >   1064
>> >   1065                  if (ufs->indexdir) {
>> >                             ^^^^^^^^^^^^^
>> > We check for NULL here so the code so that's OK except what do we want to
>> > set the error code to if ovl_workdir_create() fails?  Right now it's
>> > set to a random pointer casted to int.
>>
>> I don't follow.
>> If ovl_workdir_create() fails, ufs->indexdir will be NULL and err will be 0.
>> If it succeeds err will be set here below.
>>
>
> Oh, yeah.  You're right.  My bad.
>

Hmm.. interesting, I think your static analysis was correct and there *is* an
error related to random value of err, but it was not introduced by my patch.
err in not set to a defined value before:

ufs->creator_cred = cred = prepare_creds();
if (!cred)
               goto ...

if (!config.index) err was last set at err = PTR_ERR(mnt);
in the for loop above.

I'll send out a patch.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux