* [PATCH] IB/rxe: constify vm_operations_struct
@ 2017-08-28 4:30 Arvind Yadav
2017-08-28 23:18 ` Doug Ledford
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-28 4:30 UTC (permalink / raw)
To: monis, dledford, sean.hefty, hal.rosenstock; +Cc: linux-kernel, linux-rdma
vm_operations_struct are not supposed to change at runtime.
vm_area_struct structure working with const vm_operations_struct.
So mark the non-const vm_operations_struct structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/infiniband/sw/rxe/rxe_mmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_mmap.c b/drivers/infiniband/sw/rxe/rxe_mmap.c
index bd812e0..d22431e 100644
--- a/drivers/infiniband/sw/rxe/rxe_mmap.c
+++ b/drivers/infiniband/sw/rxe/rxe_mmap.c
@@ -76,7 +76,7 @@ static void rxe_vma_close(struct vm_area_struct *vma)
kref_put(&ip->ref, rxe_mmap_release);
}
-static struct vm_operations_struct rxe_vm_ops = {
+static const struct vm_operations_struct rxe_vm_ops = {
.open = rxe_vma_open,
.close = rxe_vma_close,
};
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] IB/rxe: constify vm_operations_struct
2017-08-28 4:30 [PATCH] IB/rxe: constify vm_operations_struct Arvind Yadav
@ 2017-08-28 23:18 ` Doug Ledford
0 siblings, 0 replies; 2+ messages in thread
From: Doug Ledford @ 2017-08-28 23:18 UTC (permalink / raw)
To: Arvind Yadav, monis, sean.hefty, hal.rosenstock; +Cc: linux-kernel, linux-rdma
On Mon, 2017-08-28 at 10:00 +0530, Arvind Yadav wrote:
> vm_operations_struct are not supposed to change at runtime.
> vm_area_struct structure working with const vm_operations_struct.
> So mark the non-const vm_operations_struct structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Sorry, this bug had already been fixed by a previous patch. Thanks for
your submission though.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-28 23:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28 4:30 [PATCH] IB/rxe: constify vm_operations_struct Arvind Yadav
2017-08-28 23:18 ` Doug Ledford
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).