lsm: use lsm_blob_alloc() in lsm_bdev_alloc()
Paul Moore
maintainerPATCH 1/1 lsm: use lsm_blob_alloc() in lsm_bdev_alloc()
Convert the lsm_bdev_alloc() function to use the lsm_blob_alloc() helper like all of the other LSM security blob allocators.
--- security/security.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
security/security.c +2 -10
@@ -823,16 +823,8 @@ static int lsm_msg_msg_alloc(struct msg_msg *mp)*/ static int lsm_bdev_alloc (struct block_device *bdev) { -if (blob_sizes.lbs_bdev ==0 ) { - bdev->bd_security =NULL ; -return 0 ; - } - - bdev->bd_security =kzalloc (blob_sizes.lbs_bdev,GFP_KERNEL ); -if (!bdev->bd_security) -return -ENOMEM ; - -return 0 ; +return lsm_blob_alloc (&bdev->bd_security, blob_sizes.lbs_bdev, +GFP_KERNEL ); }/**
Signature · 1 line
2.50.1
Quoted 4 lines · Paul Moore
Convert the
lsm_bdev_alloc()function to use thelsm_blob_alloc()helper like all of the other LSM security blob allocators.Signed-off-by Paul Moore <[email protected]>
Quoted 27 lines
--- security/security.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)security/security.c +2
-10@@ -823,16 +823,8 @@ static int lsm_msg_msg_alloc(struct msg_msg *mp)*/ static int lsm_bdev_alloc (struct block_device *bdev) { -if (blob_sizes.lbs_bdev ==0 ) { - bdev->bd_security =NULL ; -return 0 ; - } - - bdev->bd_security =kzalloc (blob_sizes.lbs_bdev,GFP_KERNEL ); -if (!bdev->bd_security) -return -ENOMEM ; - -return 0 ; +return lsm_blob_alloc (&bdev->bd_security, blob_sizes.lbs_bdev, +GFP_KERNEL ); }/**
Quoted 4 lines · Paul Moore
Convert the
lsm_bdev_alloc()function to use thelsm_blob_alloc()helper like all of the other LSM security blob allocators.Signed-off-by Paul Moore <[email protected]>
Quoted 30 lines
--- security/security.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)security/security.c +2
-10@@ -823,16 +823,8 @@ static int lsm_msg_msg_alloc(struct msg_msg *mp)*/ static int lsm_bdev_alloc (struct block_device *bdev) { -if (blob_sizes.lbs_bdev ==0 ) { - bdev->bd_security =NULL ; -return 0 ; - } - - bdev->bd_security =kzalloc (blob_sizes.lbs_bdev,GFP_KERNEL ); -if (!bdev->bd_security) -return -ENOMEM ; - -return 0 ; +return lsm_blob_alloc (&bdev->bd_security, blob_sizes.lbs_bdev, +GFP_KERNEL ); }/** Signature · 1 line
2.50.1
Paul Moore
maintainerQuoted 8 lines · Paul Moore
Convert the
lsm_bdev_alloc()function to use thelsm_blob_alloc()helper like all of the other LSM security blob allocators.Signed-off-by Paul Moore <[email protected]>--- security/security.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
Normally I might let this sit a bit longer on the mailing list, but considering how trivial this is along with a Reviewed-by and an ACK I'm going to go ahead and merge this into lsm/dev-staging for testing and lsm/dev once the merge window closes.
Signature · 1 line
paul-moore.com
Paul Moore
maintainerQuoted 10 lines · Paul Moore
Quoted 8 lines · Paul Moore
Convert the
lsm_bdev_alloc()function to use thelsm_blob_alloc()helper like all of the other LSM security blob allocators.Signed-off-by Paul Moore <[email protected]>--- security/security.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
Quoted 4 lines
Normally I might let this sit a bit longer on the mailing list, but considering how trivial this is along with a Reviewed-by and an ACK I'm going to go ahead and merge this into lsm/dev-staging for testing and lsm/dev once the merge window closes.
This is now in lsm/dev, thanks all.
Signature · 1 line
paul-moore.com