Skip to contentSkip to conversation

+ ocfs2-punch-hole-should-return-einval-if-the-length-argument-in-ioctl-is-negative.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Dec 20, 2013 OCFS2

lore
Share & tools
lore
#0 lore raw

Subject: + ocfs2-punch-hole-should-return-einval-if-the-length-argument-in-ioctl-is-negative.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 20 Dec 2013 15:29:34 -0800

The patch titled
Subject: ocfs2: punch hole should return EINVAL if the length argument in ioctl is negative
has been added to the -mm tree. Its filename is
ocfs2-punch-hole-should-return-einval-if-the-length-argument-in-ioctl-is-negative.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-punch-hole-should-return-einval-if-the-length-argument-in-ioctl-is-negative.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-punch-hole-should-return-einval-if-the-length-argument-in-ioctl-is-negative.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 ***

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

------------------------------------------------------
From: Tariq Saeed <[email protected]>
Subject: ocfs2: punch hole should return EINVAL if the length argument in ioctl is negative

Orabug:14789508

An unreserve space ioctl OCFS2_IOC_UNRESVSP/64 should reject a negative length.

---

 fs/ocfs2/file.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/ocfs2/file.c renamed from fs/ocfs2/file.c~ocfs2-punch-hole-should-return-einval-if-the-length-argument-in-ioctl-is-negative +2 -1
diff -puN fs/ocfs2/file.c~ocfs2-punch-hole-should-return-einval-if-the-length-argument-in-ioctl-is-negative fs/ocfs2/file.c
@@ -1872,7 +1872,8 @@ static int __ocfs2_change_file_space(str
 	}
 	size = sr->l_start + sr->l_len;
 
-	if (cmd == OCFS2_IOC_RESVSP || cmd == OCFS2_IOC_RESVSP64) {
+	if (cmd == OCFS2_IOC_RESVSP || cmd == OCFS2_IOC_RESVSP64 ||
+	    cmd == OCFS2_IOC_UNRESVSP || cmd == OCFS2_IOC_UNRESVSP64) {
 		if (sr->l_len <= 0) {
 			ret = -EINVAL;
 			goto out_inode_unlock;

_

Patches currently in -mm which might be from [email protected] are

ocfs2-o2net-incorrect-to-terminate-accepting-connections-loop-upon-rejecting-an-invalid-one.patch ocfs2-punch-hole-should-return-einval-if-the-length-argument-in-ioctl-is-negative.patch ocfs2-o2net-o2net_listen_data_ready-should-do-nothing-if-socket-state-is-not-tcp_listen-orabug-17330860.patch