Re: WIP more compounding

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

 



Tue, 21 Aug 2018 1:54, ronnie sahlberg <ronniesahlberg@xxxxxxxxx>:
>
> I think this is probably not due to these patches themselves but as
> they may make compounding more common they probably uncover bugs
> introduced in the previous patch sets of mine
> (that did touch a lot of very hairy code I struggled to unwind.)

I suspect that in some conditions the following part of
compound_send_recv is being executed once we process a part of the
compounding chain:

 910 out:
 911 >---for (i = 0; i < num_rqst; i++)
 912 >--->---cifs_delete_mid(midQ[i]);
 913 >---add_credits(ses->server, credits, optype);
 914
 915 >---return rc;
 916 }

cifs_delete_mid() calls list_del() for a mid. So a subsequent
dequeue_mid() may generate the general protection fault reported by
Aurelien.

Actually cifs_delete_mid() and dequeue_mid() doing the same thing
(removing the mid from the MID list) looks scary and this needs to be
revised. The easiest fix would be to change list_del() to
list_del_init() in cifs_delete_mid() but this may just hide the
problem.

--
Best regards,
Pavel Shilovsky



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

  Powered by Linux