Patchwork [net] sctp: jsctp_sf_eat_sack: fix jprobes function signature mismatch

login
register
mail settings
Submitter Daniel Borkmann
Date Dec. 15, 2012, 8:12 p.m.
Message ID <a910a63d58d95aed8caeea8a43a21cab863b3bfb.1355602097.git.dborkman@redhat.com>
Download mbox | patch
Permalink /patch/206636/
State Accepted
Delegated to: David Miller
Headers show

Comments

Daniel Borkmann - Dec. 15, 2012, 8:12 p.m.
Commit 24cb81a6a (sctp: Push struct net down into all of the
state machine functions) introduced the net structure into all
state machine functions, but jsctp_sf_eat_sack was not updated,
hence when SCTP association probing is enabled in the kernel,
any simple SCTP client/server program from userspace will panic
the kernel.

Cc: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
 net/sctp/probe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Vlad Yasevich - Dec. 15, 2012, 8:39 p.m.
On 12/15/2012 03:12 PM, Daniel Borkmann wrote:
> Commit 24cb81a6a (sctp: Push struct net down into all of the
> state machine functions) introduced the net structure into all
> state machine functions, but jsctp_sf_eat_sack was not updated,
> hence when SCTP association probing is enabled in the kernel,
> any simple SCTP client/server program from userspace will panic
> the kernel.

Aha!!!  That makes a lot more sense...

Acked-by: Vlad Yasevich <vyasevich@gmail.com>

Thanks
-vlad

>
> Cc: Vlad Yasevich <vyasevich@gmail.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> ---
>   net/sctp/probe.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/sctp/probe.c b/net/sctp/probe.c
> index bc6cd75..5f7518d 100644
> --- a/net/sctp/probe.c
> +++ b/net/sctp/probe.c
> @@ -122,7 +122,8 @@ static const struct file_operations sctpprobe_fops = {
>   	.llseek = noop_llseek,
>   };
>
> -sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
> +sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
> +				     const struct sctp_endpoint *ep,
>   				     const struct sctp_association *asoc,
>   				     const sctp_subtype_t type,
>   				     void *arg,
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
danborkmann@iogearbox.net - Dec. 15, 2012, 9:02 p.m.
On Sat, Dec 15, 2012 at 9:39 PM, Vlad Yasevich <vyasevich@gmail.com> wrote:
> On 12/15/2012 03:12 PM, Daniel Borkmann wrote:
>>
>> Commit 24cb81a6a (sctp: Push struct net down into all of the
>> state machine functions) introduced the net structure into all
>> state machine functions, but jsctp_sf_eat_sack was not updated,
>> hence when SCTP association probing is enabled in the kernel,
>> any simple SCTP client/server program from userspace will panic
>> the kernel.
>
>
> Aha!!!  That makes a lot more sense...

Indeed. ;-)

> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
>
> Thanks
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Dec. 16, 2012, 1:17 a.m.
From: Daniel Borkmann <dborkman@redhat.com>
Date: Sat, 15 Dec 2012 21:12:43 +0100

> Commit 24cb81a6a (sctp: Push struct net down into all of the
> state machine functions) introduced the net structure into all
> state machine functions, but jsctp_sf_eat_sack was not updated,
> hence when SCTP association probing is enabled in the kernel,
> any simple SCTP client/server program from userspace will panic
> the kernel.
> 
> Cc: Vlad Yasevich <vyasevich@gmail.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index bc6cd75..5f7518d 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -122,7 +122,8 @@  static const struct file_operations sctpprobe_fops = {
 	.llseek = noop_llseek,
 };
 
-sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
+sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
+				     const struct sctp_endpoint *ep,
 				     const struct sctp_association *asoc,
 				     const sctp_subtype_t type,
 				     void *arg,