mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + ocfs2-replaced-simple_strtoull-with-kstrtoull.patch added to -mm tree
@ 2021-05-26 23:01 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-05-26 23:01 UTC (permalink / raw)
  To: chenhuang5, gechangwei, ghe, jiangqi903, jlbec, junxiao.bi, mark,
	mm-commits, piaojun


The patch titled
     Subject: ocfs2: replace simple_strtoull() with kstrtoull()
has been added to the -mm tree.  Its filename is
     ocfs2-replaced-simple_strtoull-with-kstrtoull.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/ocfs2-replaced-simple_strtoull-with-kstrtoull.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-replaced-simple_strtoull-with-kstrtoull.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/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Chen Huang <chenhuang5@huawei.com>
Subject: ocfs2: replace simple_strtoull() with kstrtoull()

simple_strtoull() is deprecated in some situation since it does not check
for the range overflow, use kstrtoull() instead.

Link: https://lkml.kernel.org/r/20210526092020.554341-3-chenhuang5@huawei.com
Signed-off-by: Chen Huang <chenhuang5@huawei.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <jiangqi903@gmail.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/ocfs2/cluster/heartbeat.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/fs/ocfs2/cluster/heartbeat.c~ocfs2-replaced-simple_strtoull-with-kstrtoull
+++ a/fs/ocfs2/cluster/heartbeat.c
@@ -1596,12 +1596,13 @@ static ssize_t o2hb_region_start_block_s
 	struct o2hb_region *reg = to_o2hb_region(item);
 	unsigned long long tmp;
 	char *p = (char *)page;
+	ssize_t ret;
 
 	if (reg->hr_bdev)
 		return -EINVAL;
 
-	tmp = simple_strtoull(p, &p, 0);
-	if (!p || (*p && (*p != '\n')))
+	ret = kstrtoull(p, 0, &tmp);
+	if (ret)
 		return -EINVAL;
 
 	reg->hr_start_block = tmp;
_

Patches currently in -mm which might be from chenhuang5@huawei.com are

ocfs2-replaced-simple_strtoull-with-kstrtoull.patch


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

only message in thread, other threads:[~2021-05-26 23:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 23:01 + ocfs2-replaced-simple_strtoull-with-kstrtoull.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).