re: mm: frontswap: core code

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

 



Hello Dan Magenheimer,

This is a semi-automatic email to let you know that df0aade19b6a:
"mm: frontswap: core code" leads to the following Smatch complaint.

mm/frontswap.c +250 frontswap_curr_pages(7)
	 error: we previously assumed 'si' could be null (see line 252)

mm/frontswap.c
   249		spin_lock(&swap_lock);
   250		for (type = swap_list.head; type >= 0; type = si->next) {
                                                              ^^^^^^^^
Dereference.

   251			si = swap_info[type];
   252			if (si != NULL)
                            ^^^^^^^^^^
Check for NULL.

   253				totalpages += atomic_read(&si->frontswap_pages);
   254		}

These semi-automatic emails are in testing.  Let me know how they can
be improved.

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]