Merge tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / mm / kmemleak.c
index 9857446021af90c14f84dbfbbc8463c1f494a92c..dbbd518fb6b3e91dc298956f7abe842361369952 100644 (file)
@@ -1,23 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * mm/kmemleak.c
  *
  * Copyright (C) 2008 ARM Limited
  * Written by Catalin Marinas <catalin.marinas@arm.com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *
  * For more information on the algorithm and kmemleak usage, please see
  * Documentation/dev-tools/kmemleak.rst.
  *
@@ -588,7 +575,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
        if (in_irq()) {
                object->pid = 0;
                strncpy(object->comm, "hardirq", sizeof(object->comm));
-       } else if (in_softirq()) {
+       } else if (in_serving_softirq()) {
                object->pid = 0;
                strncpy(object->comm, "softirq", sizeof(object->comm));
        } else {
@@ -1879,7 +1866,7 @@ static ssize_t kmemleak_write(struct file *file, const char __user *user_buf,
        }
 
        if (!kmemleak_enabled) {
-               ret = -EBUSY;
+               ret = -EPERM;
                goto out;
        }