Skip to content

Commit ee71a29

Browse files
Christophe Lucasdavem330
authored andcommitted
[SCTP]: Audit return code of create_proc_*
From: Christophe Lucas <clucas@rotomalug.org> Audit return of create_proc_* functions. Signed-off-by: Christophe Lucas <clucas@rotomalug.org> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e2bf521 commit ee71a29

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎net/sctp/objcnt.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,12 @@ static int sctp_dbg_objcnt_read(char *buffer, char **start, off_t offset,
127127
/* Initialize the objcount in the proc filesystem. */
128128
void sctp_dbg_objcnt_init(void)
129129
{
130-
create_proc_read_entry("sctp_dbg_objcnt", 0, proc_net_sctp,
130+
struct proc_dir_entry *ent;
131+
ent = create_proc_read_entry("sctp_dbg_objcnt", 0, proc_net_sctp,
131132
sctp_dbg_objcnt_read, NULL);
133+
if (!ent)
134+
printk(KERN_WARNING
135+
"sctp_dbg_objcnt: Unable to create /proc entry.\n");
132136
}
133137

134138
/* Cleanup the objcount entry in the proc filesystem. */

0 commit comments

Comments
 (0)