Re: [PATCH v4] riscv: Fix permissions for all mm's during mm init

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

 



On Sat, 17 Sep 2022 11:58:48 PDT (-0700), Linus Torvalds wrote:
Sorry for html crud, I'm afk right now.

But no, this does not help at all.

Now you're doing a blocking semaphore operation under a spinning rwlock
instead.

Which also is completely invalid.

Your can't do blocking locks in atomic context, and it doesn't matter
whether the atomic context is a rcu read section or a spin lock.

OK, sorry for screwing up a second time. I'll go try and make sure we get this right before sending anything up. Vladimir: I'll just take this one over and send a v5, I'll find some time this week to make sure I can get it right this time.

Sorry for the mess!

Stop making random locking changes like this. And enable lockdep and the
lock verification that would have told you all this immediately.

       Linus


On Sat, Sep 17, 2022, 11:48 Vladimir Isaev <vladimir.isaev@xxxxxxxxxxxxx>
wrote:

);
+
+       read_lock(&tasklist_lock);
+       for_each_process(t) {
+               if (t->flags & PF_KTHREAD)
+                       continue;
+               for_each_thread(t, s) {
+                       if (s->mm) {
+                               __set_memory_mm(s->mm, start, end,
set_mask,
+                                               clear_mask);
+                       }
+               }
+       }
+       read_unlock(&tasklist_lock);




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux