re: vmscan: shrinker->nr updates race and go wrong

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

 



Hi Dave,

There is a sign error in e5b94d7463e0 "vmscan: shrinker->nr updates
race and go wrong"

mm/vmscan.c +274 shrink_slab(41)
	warn: unsigned 'total_scan' is never less than zero.

   268                  total_scan = nr;
   269                  max_pass = do_shrinker_shrink(shrinker, shrink, 0);
   270                  delta = (4 * nr_pages_scanned) / shrinker->seeks;
   271                  delta *= max_pass;
   272                  do_div(delta, lru_pages + 1);
   273                  total_scan += delta;
   274                  if (total_scan < 0) {
                            ^^^^^^^^^^^^^^
total_scan is unsigned so it's never less than zero here.

   275                          printk(KERN_ERR "shrink_slab: %pF negative objects to "
   276                                 "delete nr=%ld\n",
   277                                 shrinker->shrink, total_scan);
   278                          total_scan = max_pass;
   279                  }

regards,
dan carpenter

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]