]> Git Repo - J-linux.git/commitdiff
Merge tag 'mm-hotfixes-stable-2024-04-26-13-30' of git://git.kernel.org/pub/scm/linux...
authorLinus Torvalds <[email protected]>
Fri, 26 Apr 2024 20:48:03 +0000 (13:48 -0700)
committerLinus Torvalds <[email protected]>
Fri, 26 Apr 2024 20:48:03 +0000 (13:48 -0700)
Pull misc fixes from Andrew Morton:
 "11 hotfixes. 8 are cc:stable and the remaining 3 (nice ratio!) address
  post-6.8 issues or aren't considered suitable for backporting.

  All except one of these are for MM. I see no particular theme - it's
  singletons all over"

* tag 'mm-hotfixes-stable-2024-04-26-13-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm/hugetlb: fix DEBUG_LOCKS_WARN_ON(1) when dissolve_free_hugetlb_folio()
  selftests: mm: protection_keys: save/restore nr_hugepages value from launch script
  stackdepot: respect __GFP_NOLOCKDEP allocation flag
  hugetlb: check for anon_vma prior to folio allocation
  mm: zswap: fix shrinker NULL crash with cgroup_disable=memory
  mm: turn folio_test_hugetlb into a PageType
  mm: support page_mapcount() on page_has_type() pages
  mm: create FOLIO_FLAG_FALSE and FOLIO_TYPE_OPS macros
  mm/hugetlb: fix missing hugetlb_lock for resv uncharge
  selftests: mm: fix unused and uninitialized variable warning
  selftests/harness: remove use of LINE_MAX

1  2 
tools/testing/selftests/kselftest_harness.h

index ba3ddeda24bf527295acaf32159097c03ac52153,f0ae1f6466db42afaaacf274eb0c9318ca942269..d98702b6955df24e72366f2246ad5b3da7951b5a
@@@ -56,7 -56,6 +56,6 @@@
  #include <asm/types.h>
  #include <ctype.h>
  #include <errno.h>
- #include <limits.h>
  #include <stdbool.h>
  #include <stdint.h>
  #include <stdio.h>
                FIXTURE_DATA(fixture_name) self; \
                pid_t child = 1; \
                int status = 0; \
 +              bool jmp = false; \
                memset(&self, 0, sizeof(FIXTURE_DATA(fixture_name))); \
                if (setjmp(_metadata->env) == 0) { \
                        /* Use the same _metadata. */ \
                                _metadata->exit_code = KSFT_FAIL; \
                        } \
                } \
 +              else \
 +                      jmp = true; \
                if (child == 0) { \
 -                      if (_metadata->setup_completed && !_metadata->teardown_parent) \
 +                      if (_metadata->setup_completed && !_metadata->teardown_parent && !jmp) \
                                fixture_name##_teardown(_metadata, &self, variant->data); \
                        _exit(0); \
                } \
@@@ -1159,7 -1155,7 +1158,7 @@@ void __run_test(struct __fixture_metada
                struct __test_metadata *t)
  {
        struct __test_xfail *xfail;
-       char test_name[LINE_MAX];
+       char *test_name;
        const char *diagnostic;
  
        /* reset test struct */
        t->trigger = 0;
        memset(t->results->reason, 0, sizeof(t->results->reason));
  
-       snprintf(test_name, sizeof(test_name), "%s%s%s.%s",
-                f->name, variant->name[0] ? "." : "", variant->name, t->name);
+       if (asprintf(&test_name, "%s%s%s.%s", f->name,
+               variant->name[0] ? "." : "", variant->name, t->name) == -1) {
+               ksft_print_msg("ERROR ALLOCATING MEMORY\n");
+               t->exit_code = KSFT_FAIL;
+               _exit(t->exit_code);
+       }
  
        ksft_print_msg(" RUN           %s ...\n", test_name);
  
                diagnostic = "unknown";
  
        ksft_test_result_code(t->exit_code, test_name,
 -                            diagnostic ? "%s" : "", diagnostic);
 +                            diagnostic ? "%s" : NULL, diagnostic);
+       free(test_name);
  }
  
  static int test_harness_run(int argc, char **argv)
This page took 0.053999 seconds and 4 git commands to generate.