[PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
RnJvbTogSmlhIFpob3UgPHpob3UuamlhMkB6dGUuY29tLmNuPg0KDQptb2RpZmljYXRpb24gaW4g Y29tbWl0IDJhM2Y3MjIxYWNkZCAoIkFMU0E6IGNvcmU6IEZpeCBjYXJkIHJhY2VzIGJldHdlZW4N CnJlZ2lzdGVyIGFuZCBkaXNjb25uZWN0IikgcmVzdWx0aW5nIGluIHRoaXMgcHJvYmxlbS4NCg0K U2lnbmVkLW9mZi1ieTogSmlhIFpob3UgPHpob3UuamlhMkB6dGUuY29tLmNuPg0KU2lnbmVkLW9m Zi1ieTogWWkgV2FuZyA8d2FuZy55aTU5QHp0ZS5jb20uY24+DQotLS0NCiBzb3VuZC9jb3JlL2lu aXQuYyB8IDIgLS0NCiAxIGZpbGUgY2hhbmdlZCwgMiBkZWxldGlvbnMoLSkNCg0KZGlmZiAtLWdp dCBhL3NvdW5kL2NvcmUvaW5pdC5jIGIvc291bmQvY29yZS9pbml0LmMNCmluZGV4IDAxOGNlNGVm MS4uOWY1MjcwYzkwIDEwMDY0NA0KLS0tIGEvc291bmQvY29yZS9pbml0LmMNCisrKyBiL3NvdW5k L2NvcmUvaW5pdC5jDQpAQCAtMzkwLDEwICszOTAsOCBAQCBpbnQgc25kX2NhcmRfZGlzY29ubmVj dChzdHJ1Y3Qgc25kX2NhcmQgKmNhcmQpDQogCQlyZXR1cm4gMDsNCiAJfQ0KIAljYXJkLT5zaHV0 ZG93biA9IDE7DQotCXNwaW5fdW5sb2NrKCZjYXJkLT5maWxlc19sb2NrKTsNCiANCiAJLyogcmVw bGFjZSBmaWxlLT5mX29wIHdpdGggc3BlY2lhbCBkdW1teSBvcGVyYXRpb25zICovDQotCXNwaW5f bG9jaygmY2FyZC0+ZmlsZXNfbG9jayk7DQogCWxpc3RfZm9yX2VhY2hfZW50cnkobWZpbGUsICZj YXJkLT5maWxlc19saXN0LCBsaXN0KSB7DQogCQkvKiBpdCdzIGNyaXRpY2FsIHBhcnQsIHVzZSBl bmRsZXNzIGxvb3AgKi8NCiAJCS8qIHdlIGhhdmUgbm8gcm9vbSB0byBmYWlsICovDQotLSANCjIu MTguNA==
On Mon, 29 Mar 2021 05:36:47 +0200, root wrote:
[1.1.1 <text/plain; UTF-8 (base64)>]
From: Jia Zhou zhou.jia2@zte.com.cn
modification in commit 2a3f7221acdd ("ALSA: core: Fix card races between register and disconnect") resulting in this problem.
Signed-off-by: Jia Zhou zhou.jia2@zte.com.cn Signed-off-by: Yi Wang wang.yi59@zte.com.cn
The code change looks good, but the patch isn't cleanly applicable via git-am. Could you fix your MUA setup, or try to submit via git-send-email?
thanks,
Takashi
sound/core/init.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/sound/core/init.c b/sound/core/init.c index 018ce4ef1..9f5270c90 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -390,10 +390,8 @@ int snd_card_disconnect(struct snd_card *card) return 0; } card->shutdown = 1;
spin_unlock(&card->files_lock);
/* replace file->f_op with special dummy operations */
spin_lock(&card->files_lock); list_for_each_entry(mfile, &card->files_list, list) { /* it's critical part, use endless loop */ /* we have no room to fail */
-- 2.18.4
SGkgVGFrYXNoaSwKClRoYW5rcyBhIGxvdCBmb3IgeW91ciByZXZpZXchCgo+IE9uIE1vbiwgMjkg TWFyIDIwMjEgMDU6MzY6NDcgKzAyMDAsCj4gcm9vdCB3cm90ZToKPiA+Cj4gPiBbMS4xLjEgIDx0 ZXh0L3BsYWluOyBVVEYtOCAoYmFzZTY0KT5dCj4gPgo+ID4gRnJvbTogSmlhIFpob3UgPHpob3Uu amlhMkB6dGUuY29tLmNuPgo+ID4KPiA+IG1vZGlmaWNhdGlvbiBpbiBjb21taXQgMmEzZjcyMjFh Y2RkICgiQUxTQTogY29yZTogRml4IGNhcmQgcmFjZXMgYmV0d2Vlbgo+ID4gcmVnaXN0ZXIgYW5k IGRpc2Nvbm5lY3QiKSByZXN1bHRpbmcgaW4gdGhpcyBwcm9ib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MCArMzkwLDggQEAgaW50IHNuZF9jYXJkX2Rp c2Nvbm5lY3Qoc3RydWN0IHNuZF9jYXJkICpjYXJkKQo+ID4gICAgICAgICAgcmV0dXJuIDA7Cj4g PiAgICAgIH0KPiA+ICAgICAgY2FyZC0+c2h1dGRvd24gPSAxOwo+ID4gLSAgICBzcGluX3VubG9j aygmY2FyZC0+ZmlsZXNfbG9jayk7Cj4gPgo+ID4gICAgICAvKiByZXBsYWNlIGZpbGUtPmZfb3Ag d2l0aCBzcGVjaWFsIGR1bW15IG9wZXJhdGlvbnMgKi8KPiA+IC0gICAgc3Bpbl9sb2NrKCZjYXJk LT5maWxlc19sb2NrKTsKPiA+ICAgICAgbGlzdF9mb3JfZWFjaF9lbnRyeShtZmlsZSwgJmNhcmQt PmZpbGVzX2xpc3QsIGxpc3QpIHsKPiA+ICAgICAgICAgIC8qIGl0J3MgY3JpdGljYWwgcGFydCwg dXNlIGVuZGxlc3MgbG9vcCAqLwo+ID4gICAgICAgICAgLyogd2UgaGF2ZSBubyByb29tIHRvIGZh aWwgKi8KPiA+IC0tCj4gPiAyLjE4LjQKPiA+CgoKCi0tLQpCZXN0IHdpc2hlcwpZaSBXYW5n
On Tue, 30 Mar 2021 04:31:55 +0200, wang.yi59@zte.com.cn wrote:
Hi Takashi,
Thanks a lot for your review!
On Mon, 29 Mar 2021 05:36:47 +0200, root wrote:
[1.1.1 <text/plain; UTF-8 (base64)>]
From: Jia Zhou zhou.jia2@zte.com.cn
modification in commit 2a3f7221acdd ("ALSA: core: Fix card races between register and disconnect") resulting in this problem.
Signed-off-by: Jia Zhou zhou.jia2@zte.com.cn Signed-off-by: Yi Wang wang.yi59@zte.com.cn
The code change looks good, but the patch isn't cleanly applicable via git-am. Could you fix your MUA setup, or try to submit via git-send-email?
Apologise to the inconvenient of the format. This is a bug in the mail system of our company's IT department, which confued us for a long time and will be resolved in next month :(
Would you please do me a favor to accept this patch manually? Many thanks.
OK, now applied manually. Thanks.
Takashi
participants (3)
-
root
-
Takashi Iwai
-
wang.yi59@zte.com.cn