Changeset 057656b in rtems-libbsd


Ignore:
Timestamp:
Nov 10, 2017, 10:15:35 AM (20 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
eeb3fd5d9b07ac9a2e280cff60a1b762bd273a8d, 1e989998de954bef51e6c19cc3d64d39f32100aa
Children:
eeeda4b
Parents:
72d5fa1
git-author:
Sebastian Huber <sebastian.huber@…> (11/10/17 10:15:35)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/10/17 10:16:14)
Message:

Disable HHOOK(9) support for sockets

Support was only partly disabled leading to NULL pointer accesses.
Disable it completely.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/kern/uipc_socket.c

    r72d5fa1 r057656b  
    198198            ("%s:%d curvnet is NULL, so=%p", __func__, __LINE__, (so)));
    199199
     200#ifndef __rtems__
    200201VNET_DEFINE(struct hhook_head *, socket_hhh[HHOOK_SOCKET_LAST + 1]);
    201202#define V_socket_hhh            VNET(socket_hhh)
     203#endif /* __rtems__ */
    202204
    203205/*
     
    24562458hhook_run_socket(struct socket *so, void *hctx, int32_t h_id)
    24572459{
     2460#ifndef __rtems__
    24582461        struct socket_hhook_data hhook_data = {
    24592462                .so = so,
     
    24692472        /* Ugly but needed, since hhooks return void for now */
    24702473        return (hhook_data.status);
     2474#else /* __rtems__ */
     2475        return (0);
     2476#endif /* __rtems__ */
    24712477}
    24722478
     
    27362742
    27372743                default:
     2744#ifndef __rtems__
    27382745                        if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0)
    27392746                                error = hhook_run_socket(so, sopt,
    27402747                                    HHOOK_SOCKET_OPT);
    27412748                        else
     2749#endif /* __rtems__ */
    27422750                                error = ENOPROTOOPT;
    27432751                        break;
     
    29312939
    29322940                default:
     2941#ifndef __rtems__
    29332942                        if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0)
    29342943                                error = hhook_run_socket(so, sopt,
    29352944                                    HHOOK_SOCKET_OPT);
    29362945                        else
     2946#endif /* __rtems__ */
    29372947                                error = ENOPROTOOPT;
    29382948                        break;
Note: See TracChangeset for help on using the changeset viewer.