Re: [PATCH] Avoid static local variable in fbus-phonet
Pawel Kot <[email protected]> Wed, 22 Jan 2020 23:37:43 +0100
| Newsgroups | gmane.linux.drivers.gnokii |
|---|---|
| Message-ID | <CAHytCw4wrW0LCapLeiDUGcPyTdkjEXRhuUv+m-07tKsAVTxqeQ@mail.gmail.com> |
--===============5908423611092626009== Content-Type: multipart/alternative; boundary="000000000000e86f16059cc22ca1" --000000000000e86f16059cc22ca1 Content-Type: text/plain; charset="UTF-8" Hi, On Wed, Nov 21, 2018 at 10:35 AM Ladislav Michl <[email protected]> wrote: > > Function verify_max_message_len is using static local variable > making it thread unsafe. Move that variable into incoming message > instance. > > Signed-off-by: Ladislav Michl <[email protected]> > Reported-by: Peter Koch <[email protected]> I think it makes sense. I'll apply. The only concern I have is that connection to a phone should be single threaded anyway. Cheers, -- Pawel Kot --000000000000e86f16059cc22ca1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi,<br><br>On Wed, Nov 21, 2018 at 10:35 AM Ladislav Michl= <<a href=3D"mailto:[email protected]">[email protected]</a>> w= rote:<br>><br>> Function verify_max_message_len is using static local= variable<br>> making it thread unsafe. Move that variable into incoming= message<br>> instance.<br>><br>> Signed-off-by: Ladislav Michl &l= t;<a href=3D"mailto:[email protected]">[email protected]</a>><br>&= gt; Reported-by: Peter Koch <<a href=3D"mailto:[email protected]">pk1234@web= .de</a>><div><br></div><div>I think it makes sense. I'll apply. The = only=C2=A0concern I have is that connection to a phone should be single thr= eaded anyway.</div><div><br></div><div>Cheers,</div><div>--<br>Pawel Kot</d= iv></div> --000000000000e86f16059cc22ca1-- --===============5908423611092626009== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZ25va2lpLXVz ZXJzIG1haWxpbmcgbGlzdApnbm9raWktdXNlcnNAbm9uZ251Lm9yZwpodHRwczovL2xpc3RzLm5v bmdudS5vcmcvbWFpbG1hbi9saXN0aW5mby9nbm9raWktdXNlcnMK --===============5908423611092626009==--