mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + strstrip-mark-as-as-must_check.patch added to -mm tree
@ 2009-10-08 23:02 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2009-10-08 23:02 UTC (permalink / raw)
  To: mm-commits; +Cc: kosaki.motohiro


The patch titled
     strstrip(): mark as as must_check
has been added to the -mm tree.  Its filename is
     strstrip-mark-as-as-must_check.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: strstrip(): mark as as must_check
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

strstrip() can return a modified value of its input argument, when
removing elading whitesapce.  So it is surely bug for this function's
return value to be ignored.  The caller is probably going to use the
incorrect original pointer.

So mark it __must_check to prevent this frm happening (as it has before).

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---


diff -puN include/linux/string.h~strstrip-mark-as-as-must_check include/linux/string.h
--- a/include/linux/string.h~strstrip-mark-as-as-must_check
+++ a/include/linux/string.h
@@ -62,7 +62,7 @@ extern char * strnchr(const char *, size
 #ifndef __HAVE_ARCH_STRRCHR
 extern char * strrchr(const char *,int);
 #endif
-extern char * strstrip(char *);
+extern char * __must_check strstrip(char *);
 #ifndef __HAVE_ARCH_STRSTR
 extern char * strstr(const char *,const char *);
 #endif
_

Patches currently in -mm which might be from kosaki.motohiro@jp.fujitsu.com are

linux-next.patch
congestion_wait-dont-use-write.patch
oom-dump-stack-and-vm-state-when-oom-killer-panics.patch
readahead-add-blk_run_backing_dev.patch
mm-vsmcan-check-shrink_active_list-sc-isolate_pages-return-value.patch
strstrip-mark-as-as-must_check.patch
fix-strstrip-abuse-in-elv_iosched_store.patch
fs-symlink-write_begin-allocation-context-fix-reiser4-fix.patch
cgroup-fix-strstrip-abuse.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-08 23:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-08 23:02 + strstrip-mark-as-as-must_check.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).